1. Stefan Saasen
  2. git


Shawn O. Pearce  committed 3470ada

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>

  • Participants
  • Parent commits 3ddff72
  • Branches master

Comments (0)

Files changed (1)

File Makefile

View file
  • Ignore whitespace
 	MSGFMT ?= $(TCL_PATH) po/po2msg.sh
 	MSGFMT ?= msgfmt
+	ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127)
+		MSGFMT := $(TCL_PATH) po/po2msg.sh
+	endif
 msgsdir     = $(gg_libdir)/msgs