summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 13c6527)
raw | patch | inline | side by side (parent: 13c6527)
author | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Tue, 31 Aug 2010 16:35:16 +0000 (16:35 +0000) | ||
committer | Ævar Arnfjörð Bjarmason <avarab@gmail.com> | |
Sat, 30 Oct 2010 07:10:06 +0000 (07:10 +0000) |
Change the xgettext(1) invocations to use variables for the
C/Shell/Perl files and their options. This makes it easy for users to
override invidivial options from the command-line.
Suggested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
C/Shell/Perl files and their options. This makes it easy for users to
override invidivial options from the command-line.
Suggested-by: Jonathan Nieder <jrnieder@gmail.com>
Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index 8b895445f621aee87a9f3ebca9e3ffa15229f792..0b265452781dec2d1b7dc7562b8c8446fa864dd3 100644 (file)
--- a/Makefile
+++ b/Makefile
$(RM) cscope*
$(FIND) . -name '*.[hcS]' -print | xargs cscope -b
-XGETTEXT_OPTIONS = --add-comments --msgid-bugs-address="Git Mailing List <git@vger.kernel.org>" --from-code=UTF-8
+XGETTEXT_OPTIONS = \
+ --add-comments \
+ --msgid-bugs-address="Git Mailing List <git@vger.kernel.org>" \
+ --from-code=UTF-8 \
+ --output=po/git.pot
+
+XGETTEXT_OPTIONS_C = $(XGETTEXT_OPTIONS) --keyword=_ --keyword=N_ --language=C
+XGETTEXT_OPTIONS_SH = $(XGETTEXT_OPTIONS) --language=Shell
+XGETTEXT_OPTIONS_PERL = $(XGETTEXT_OPTIONS) --keyword=__ --language=Perl
+
+LOCALIZED_C = $(C_OBJ:o=c) t/t0200/test.c
+LOCALIZED_SH = $(SCRIPT_SH) t/t0200/test.sh
+LOCALIZED_PERL = $(SCRIPT_PERL) t/t0200/test.perl
+
pot:
- $(XGETTEXT) $(XGETTEXT_OPTIONS) --keyword=_ --keyword=N_ --output=po/git.pot --language=C $(C_OBJ:o=c) t/t0200/test.c
- $(XGETTEXT) $(XGETTEXT_OPTIONS) --join-existing --output=po/git.pot --language=Shell $(SCRIPT_SH) t/t0200/test.sh
- $(XGETTEXT) $(XGETTEXT_OPTIONS) --join-existing --keyword=__ --output=po/git.pot --language=Perl $(SCRIPT_PERL) t/t0200/test.perl
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_C) $(LOCALIZED_C)
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_SH) --join-existing $(LOCALIZED_SH)
+ $(XGETTEXT) $(XGETTEXT_OPTIONS_PERL) --join-existing $(LOCALIZED_PERL)
POFILES := $(wildcard po/*.po)
MOFILES := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/git.mo,$(POFILES))