Subject: Re: [PATCH v4 04/73] Makefile: "pot" target to extract messages marked for translation

From: Jonathan Nieder <[email-masked]>
Date: Fri, 25 Feb 2011 15:20:10 -0600

(-cc: Jakub)
Ævar Arnfjörð Bjarmason wrote:

> There's also one other (future) issue your `mv $i+ $i` trick confuses
> xgettext, which complains about invalid CHARSET in a later patch when
> there's more than one xgettext call. I.e. it doesn't like to append to
> files that don't end in *.pot for some reason.

Hmm, I had been wondering where that message came from.  Maybe the
following would help?

Signed-off-by: Jonathan Nieder <[email-masked]>
---
 Makefile      |    4 ++--
 po/.gitignore |    2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/Makefile b/Makefile
index 7497835..781af23 100644
--- a/Makefile
+++ b/Makefile
@@ -2068,8 +2068,8 @@ XGETTEXT_FLAGS_C = $(XGETTEXT_FLAGS) --keyword=_ --keyword=N_ --language=C
 LOCALIZED_C := $(C_OBJ:o=c)
 
 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 $@
 
 pot: po/git.pot
 
diff --git a/po/.gitignore b/po/.gitignore
index a242a86..e3a8c5d 100644
--- a/po/.gitignore
+++ b/po/.gitignore
@@ -1 +1 @@
-/git.pot
+*.pot
-- 
1.7.4.1