#
# Define NO_REGEX if you have no or inferior regex support in your C library.
#
+# Define GETTEXT_POISON if you are debugging the choice of strings marked
+# for translation. This will turn all strings that use gettext into gibberish.
+#
# Define JSMIN to point to JavaScript minifier that functions as
# a filter to have gitweb.js minified.
#
ifdef NO_SYMLINK_HEAD
BASIC_CFLAGS += -DNO_SYMLINK_HEAD
endif
+ifdef GETTEXT_POISON
+ BASIC_CFLAGS += -DGETTEXT_POISON
+endif
ifdef NO_STRCASESTR
COMPAT_CFLAGS += -DNO_STRCASESTR
COMPAT_OBJS += compat/strcasestr.o
ifdef GIT_TEST_CMP_USE_COPIED_CONTEXT
@echo GIT_TEST_CMP_USE_COPIED_CONTEXT=YesPlease >>$@
endif
+ @echo GETTEXT_POISON=\''$(subst ','\'',$(subst ','\'',$(GETTEXT_POISON)))'\' >>$@
### Detect Tck/Tk interpreter path changes
ifndef NO_TCLTK
#define FORMAT_PRESERVING(n) __attribute__((format_arg(n)))
+#ifdef GETTEXT_POISON
+#define use_gettext_poison() 1
+#else
+#define use_gettext_poison() 0
+#endif
+
static inline FORMAT_PRESERVING(1) const char *_(const char *msgid)
{
- return msgid;
+ return use_gettext_poison() ? "# GETTEXT POISON #" : msgid;
}
/* Mark msgid for translation but do not translate it. */
test -z "$NO_PERL" && test_set_prereq PERL
test -z "$NO_PYTHON" && test_set_prereq PYTHON
+# Can we rely on git's output in the C locale?
+test -z "$GETTEXT_POISON" && test_set_prereq C_LOCALE_OUTPUT
+
# test whether the filesystem supports symbolic links
ln -s x y 2>/dev/null && test -h y 2>/dev/null && test_set_prereq SYMLINKS
rm -f y