Skip to content

Commit 8719f12

Browse files
committed
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 <[email protected]>
1 parent 494d3b8 commit 8719f12

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ gitk_libdir ?= $(sharedir)/gitk/lib
88
msgsdir ?= $(gitk_libdir)/msgs
99
msgsdir_SQ = $(subst ','\'',$(msgsdir))
1010

11+
TCL_PATH ?= tclsh
1112
TCLTK_PATH ?= wish
1213
INSTALL ?= install
1314
RM ?= rm -f
@@ -22,6 +23,9 @@ ifdef NO_MSGFMT
2223
MSGFMT ?= $(TCL_PATH) po/po2msg.sh
2324
else
2425
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
2529
endif
2630

2731
PO_TEMPLATE = po/gitk.pot

0 commit comments

Comments
 (0)