[PATCH/RFC v4 4/7] Makefile: Don't install Gettext .mo files if NO_GETTEXT
- From
Ævar Arnfjörð Bjarmason <avarab@gmail.com>
- Date
- Jun 2, 2010, 01:06 UTC
- Message-ID
- <1275440764-26153-5-git-send-email-avarab@gmail.com>
- In-Reply-To
- <AANLkTimhxqGRPjYz-k5f-LTIk6KajEwUuGJWt-dAKZQT@mail.gmail.com>
Change the Makefile not to build/install .mo files as part of the default target if NO_GETTEXT=1 is given.
This was both redundant, and meant that the Perl and Shell programs would use the Gettext strings, since they don't use the git_setup_gettext() function in gettext.c, which is compiled to a stub if NO_GETTEXT=1 is set.
Reported-by: Jakub Narebski <jnareb@gmail.com> Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> --- Makefile | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index 3f0e305..40eb1a2 100644 --- a/Makefile +++ b/Makefile @@ -1891,7 +1891,9 @@ pot: POFILES := $(wildcard po/*.po) MOFILES := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/git.mo,$(POFILES)) MODIRS := $(patsubst po/%.po,share/locale/%/LC_MESSAGES/,$(POFILES)) +ifndef NO_GETTEXT all:: $(MOFILES) +endif share/locale/%/LC_MESSAGES/git.mo: po/%.po @mkdir -p $(dir $@) $(QUIET_MSGFMT)$(MSGFMT) -o $@ $< @@ -2008,9 +2010,11 @@ install: all $(INSTALL) $(ALL_PROGRAMS) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) -m 644 $(SCRIPT_LIB) '$(DESTDIR_SQ)$(gitexec_instdir_SQ)' $(INSTALL) $(install_bindir_programs) '$(DESTDIR_SQ)$(bindir_SQ)' +ifndef NO_GETTEXT $(INSTALL) -d -m 755 '$(DESTDIR_SQ)$(sharedir_SQ)/locale' (cd share && tar cf - locale) | \ (cd '$(DESTDIR_SQ)$(sharedir_SQ)' && umask 022 && tar xof -) +endif $(MAKE) -C templates DESTDIR='$(DESTDIR_SQ)' install ifndef NO_PERL $(MAKE) -C perl prefix='$(prefix_SQ)' DESTDIR='$(DESTDIR_SQ)' install
-- 1.7.1.251.gec7f5.dirty