Re: [PATCH v4 04/73] Makefile: "pot" target to extract messages marked for translation
From: Junio C Hamano <hidden>
Date: 2016-06-15 22:50:39
Jonathan Nieder [off-list ref] writes:
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.