From: Junio C Hamano Date: Wed, 1 Feb 2012 06:24:23 +0000 (-0800) Subject: Merge branch 'ar/i18n-no-gettext' X-Git-Tag: v1.7.10-rc0~124 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/2a2aa8e5561d4cfc00c8e021b1231958f6d4d2fa?ds=inline;hp=-c Merge branch 'ar/i18n-no-gettext' * ar/i18n-no-gettext: i18n: Do not force USE_GETTEXT_SCHEME=fallthrough on NO_GETTEXT i18n: Make NO_GETTEXT imply fallthrough scheme in shell l10n add a Makefile switch to avoid gettext translation in shell scripts git-sh-i18n: restructure the logic to compute gettext.sh scheme --- 2a2aa8e5561d4cfc00c8e021b1231958f6d4d2fa diff --combined Makefile index a782409306,634b2ece05..c457c34fe9 --- a/Makefile +++ b/Makefile @@@ -47,6 -47,9 +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), @@@ -245,9 -248,6 +248,9 @@@ # # Define NO_REGEX if you have no or inferior regex support in your C library. # +# Define HAVE_DEV_TTY if your system can open /dev/tty to interact with the +# user. +# # Define GETTEXT_POISON if you are debugging the choice of strings marked # for translation. In a GETTEXT_POISON build, you can turn all strings marked # for translation into gibberish by setting the GIT_GETTEXT_POISON variable @@@ -546,7 -546,6 +549,7 @@@ LIB_H += compat/bswap. LIB_H += compat/cygwin.h LIB_H += compat/mingw.h LIB_H += compat/obstack.h +LIB_H += compat/terminal.h LIB_H += compat/win32/pthread.h LIB_H += compat/win32/syslog.h LIB_H += compat/win32/poll.h @@@ -589,7 -588,6 +592,7 @@@ LIB_H += parse-options. LIB_H += patch-ids.h LIB_H += pkt-line.h LIB_H += progress.h +LIB_H += prompt.h LIB_H += quote.h LIB_H += reflog-walk.h LIB_H += refs.h @@@ -637,7 -635,6 +640,7 @@@ LIB_OBJS += color. LIB_OBJS += combine-diff.o LIB_OBJS += commit.o LIB_OBJS += compat/obstack.o +LIB_OBJS += compat/terminal.o LIB_OBJS += config.o LIB_OBJS += connect.o LIB_OBJS += connected.o @@@ -700,7 -697,6 +703,7 @@@ LIB_OBJS += pkt-line. LIB_OBJS += preload-index.o LIB_OBJS += pretty.o LIB_OBJS += progress.o +LIB_OBJS += prompt.o LIB_OBJS += quote.o LIB_OBJS += reachable.o LIB_OBJS += read-cache.o @@@ -863,7 -859,6 +866,7 @@@ ifeq ($(uname_S),Linux NO_MKSTEMPS = YesPlease HAVE_PATHS_H = YesPlease LIBC_CONTAINS_LIBINTL = YesPlease + HAVE_DEV_TTY = YesPlease endif ifeq ($(uname_S),GNU/kFreeBSD) NO_STRLCPY = YesPlease @@@ -925,7 -920,6 +928,7 @@@ ifeq ($(uname_S),Darwin endif NO_MEMMEM = YesPlease USE_ST_TIMESPEC = YesPlease + HAVE_DEV_TTY = YesPlease endif ifeq ($(uname_S),SunOS) NEEDS_SOCKET = YesPlease @@@ -1521,6 -1515,7 +1524,7 @@@ ifdef GETTEXT_POISO endif ifdef NO_GETTEXT BASIC_CFLAGS += -DNO_GETTEXT + USE_GETTEXT_SCHEME ?= fallthrough endif ifdef NO_STRCASESTR COMPAT_CFLAGS += -DNO_STRCASESTR @@@ -1694,10 -1689,6 +1698,10 @@@ ifdef HAVE_LIBCHARSET_ BASIC_CFLAGS += -DHAVE_LIBCHARSET_H endif +ifdef HAVE_DEV_TTY + BASIC_CFLAGS += -DHAVE_DEV_TTY +endif + ifdef DIR_HAS_BSD_GROUP_SEMANTICS COMPAT_CFLAGS += -DDIR_HAS_BSD_GROUP_SEMANTICS endif @@@ -1887,6 -1878,7 +1891,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 @@@ -2264,7 -2256,7 +2269,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)'; \