Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShawn O. Pearce <spearce@spearce.org>2008-01-23 07:44:36 +0300
committerShawn O. Pearce <spearce@spearce.org>2008-01-23 07:44:36 +0300
commit3470adabad8c02be152a8d536d23df692eb386d6 (patch)
treeaedfdd78a8139d563130d7550933d3d1fb3bc6c5 /Makefile
parent3ddff72e581e5c7477aaeb8b97a17691f7ff55bf (diff)
git-gui: Fallback to Tcl based po2msg.sh if msgfmt isn't available
If msgfmt fails with exit code 127 that typically means the program is not found in the user's PATH and thus cannot be executed by make. In such a case we can try to fallback to the Tcl based po2msg program that we distributed with git-gui, as it does a "good enough" job. We still don't default to po2msg.sh however as it does not perform a lot of the sanity checks that msgfmt does, and quite a few of those are too useful to give up. Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 1baf4b0861..5f1023e35f 100644
--- a/Makefile
+++ b/Makefile
@@ -198,6 +198,9 @@ ifdef NO_MSGFMT
MSGFMT ?= $(TCL_PATH) po/po2msg.sh
else
MSGFMT ?= msgfmt
+ ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
+ MSGFMT := $(TCL_PATH) po/po2msg.sh
+ endif
endif
msgsdir = $(gg_libdir)/msgs