gitk: Default to using po2msg.sh if msgfmt doesn't grok --tcl, -l and -d
This is a similar change to that submitted by Junio C Hamano for git-gui. It tests whether the msgfmt command can be run successfully with --tcl, -l and -d, and if not, falls back to using po/po2msg.sh. Signed-off-by: Paul Mackerras <paulus@samba.org>
Paul Mackerras committed
Mar 14, 2008 at 20:24 UTC
8719f1286eb7ccaeaca301619d0d75e14df769ca
1 file changed
+4
Makefile
+4
@@ -8,6 +8,7 @@ gitk_libdir ?= $(sharedir)/gitk/lib
8
msgsdir ?= $(gitk_libdir)/msgs
9
msgsdir_SQ = $(subst ','\'',$(msgsdir))
10
11
+TCL_PATH ?= tclsh
12
TCLTK_PATH ?= wish
13
INSTALL ?= install
14
RM ?= rm -f
@@ -22,6 +23,9 @@ ifdef NO_MSGFMT
23
MSGFMT ?= $(TCL_PATH) po/po2msg.sh
24
else
25
MSGFMT ?= msgfmt
26
+ ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $$?),0)
27
+ MSGFMT := $(TCL_PATH) po/po2msg.sh
28
+ endif
29
endif
30
31
PO_TEMPLATE = po/gitk.pot