Re: [PATCH v4 04/73] Makefile: "pot" target to extract messages marked for translation
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Feb 25, 2011, 21:36 UTC
- Message-ID
- <7vsjvb94p6.fsf@alter.siamese.dyndns.org>
- In-Reply-To
- <20110225212010.GC4580@elie>
Jonathan Nieder <jrnieder@gmail.com> writes:
Show 8 quoted lines
> Hmm, I had been wondering where that message came from. Maybe the > following would help? > ... > po/git.pot: $(LOCALIZED_C) > - $(QUIET_XGETTEXT)$(XGETTEXT) -o$@+ $(XGETTEXT_FLAGS_C) $(LOCALIZED_C) && \ > - mv $@+ $@ > + $(QUIET_XGETTEXT)$(XGETTEXT) -ogit-tmp.pot $(XGETTEXT_FLAGS_C) $(LOCALIZED_C) && \ > + mv git-tmp.pot $@
Yeah, or "tmp-$@".
In either case, I'd prefer to see the above removed the temporary and the target before running the command, following the idiom:
rm -f $@+ $@ && \
$(command that does not remove its output when killed) -o $@+ && \
mv $@+ $@Does xgettext leave output file specified with -o when it gets killed? If not, we don't have to use a temporary. Makefiles in gitk and git-gui do not seem to protect against it either.