From ad17ea734770126bfe1027a8a999e9e2d9f62145 Mon Sep 17 00:00:00 2001 From: Alex Riesen Date: Mon, 23 Jan 2012 14:04:29 -0800 Subject: add a Makefile switch to avoid gettext translation in shell scripts Some systems have gettext.sh (GNU gettext) installed, but it is either broken or misconfigured in such a way so its output is not usable. In case the users of these systems are unable or not interested in fixing them, setting the new Makefile switch should help: make USE_GETTEXT_SCHEME=fallthrough This will replace the translation routines with fallthrough versions, that does not use gettext from the platform. Signed-off-by: Alex Riesen Signed-off-by: Junio C Hamano --- Makefile | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 9470a1034..a0f2464a9 100644 --- a/Makefile +++ b/Makefile @@ -47,6 +47,9 @@ all:: # A translated Git requires GNU libintl or another gettext implementation, # plus libintl-perl at runtime. # +# Define USE_GETTEXT_SCHEME and set it to 'fallthrough', if you don't trust +# the installed gettext translation of the shell scripts output. +# # Define HAVE_LIBCHARSET_H if you haven't set NO_GETTEXT and you can't # trust the langinfo.h's nl_langinfo(CODESET) function to return the # current character set. GNU and Solaris have a nl_langinfo(CODESET), @@ -1874,6 +1877,7 @@ sed -e '1s|#!.*/sh|#!$(SHELL_PATH_SQ)|' \ -e 's/@@GIT_VERSION@@/$(GIT_VERSION)/g' \ -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' \ -e 's/@@NO_CURL@@/$(NO_CURL)/g' \ + -e 's/@@USE_GETTEXT_SCHEME@@/$(USE_GETTEXT_SCHEME)/g' \ -e $(BROKEN_PATH_FIX) \ $@.sh >$@+ endef @@ -2251,7 +2255,7 @@ cscope: ### Detect prefix changes TRACK_CFLAGS = $(CC):$(subst ','\'',$(ALL_CFLAGS)):\ $(bindir_SQ):$(gitexecdir_SQ):$(template_dir_SQ):$(prefix_SQ):\ - $(localedir_SQ) + $(localedir_SQ):$(USE_GETTEXT_SCHEME) GIT-CFLAGS: FORCE @FLAGS='$(TRACK_CFLAGS)'; \ -- cgit v1.2.1