summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 3ddff72)
raw | patch | inline | side by side (parent: 3ddff72)
author | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 23 Jan 2008 04:44:36 +0000 (23:44 -0500) | ||
committer | Shawn O. Pearce <spearce@spearce.org> | |
Wed, 23 Jan 2008 04:44:36 +0000 (23:44 -0500) |
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>
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>
Makefile | patch | blob | history |
diff --git a/Makefile b/Makefile
index 1baf4b086131a10ab7e33529274ebd15100f375e..5f1023e35fa2733d7f7ebd2b0a28623c2d77fae2 100644 (file)
--- a/Makefile
+++ b/Makefile
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