From 64175828ead8d50b1e301f58c434a80b5819aa24 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Tue, 31 Aug 2010 16:35:16 +0000 Subject: [PATCH] Makefile: use variables and shorter lines for xgettext MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Ævar Arnfjörð Bjarmason --- Makefile | 21 +++++++++++++++++---- 1 file changed, 17 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 8b895445f..0b2654527 100644 --- a/Makefile +++ b/Makefile @@ -2022,11 +2022,24 @@ cscope: $(RM) cscope* $(FIND) . -name '*.[hcS]' -print | xargs cscope -b -XGETTEXT_OPTIONS = --add-comments --msgid-bugs-address="Git Mailing List " --from-code=UTF-8 +XGETTEXT_OPTIONS = \ + --add-comments \ + --msgid-bugs-address="Git Mailing List " \ + --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)) -- 2.30.2