@matheusbsbs / matheus-bagliano / commits / 7276607886
Fork 0

git-gui: Simplify MSGFMT setting in Makefile

To prepare msg files for Tcl scripts, the command that is set to MSGFMT make variable needs to be able to grok "--tcl -l <lang> -d <here>" options correctly. This patch simplifies the tests done in git-gui's Makefile to directly test this condition. If the test run does not exit properly with zero status (either because you do not have "msgfmt" itself, or your "msgfmt" is too old to grok --tcl option --- the reason does not matter), have it fall back to po/po2msg.sh Signed-off-by: Junio C Hamano <gitster@pobox.com> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>

Junio C Hamano committed Mar 11, 2008 at 22:29 UTC 7276607886e99fa3bb5f0ddadb9f0daeb3958d2d
1 file changed +1 -6
Makefile
+1 -6
@@ -221,14 +221,9 @@ ifdef NO_MSGFMT
221 MSGFMT ?= $(TCL_PATH) po/po2msg.sh
222 else
223 MSGFMT ?= msgfmt
224 - ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
224 + ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0)
225 MSGFMT := $(TCL_PATH) po/po2msg.sh
226 endif
227 - ifeq (msgfmt,$(MSGFMT))
228 - ifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null || echo $?),1)
229 - MSGFMT := $(TCL_PATH) po/po2msg.sh
230 - endif
231 - endif
227 endif
228
229 msgsdir = $(gg_libdir)/msgs