OSDN Git Service

git-gui: Ensure msgfmt failure stops GNU make
authorShawn O. Pearce <spearce@spearce.org>
Mon, 3 Sep 2007 22:54:14 +0000 (18:54 -0400)
committerShawn O. Pearce <spearce@spearce.org>
Tue, 4 Sep 2007 03:04:54 +0000 (23:04 -0400)
If we have a failure executing msgfmt (such as the process just
crashes no matter what arguments you supply it because its own
installation is borked) we should stop the build process rather
than letting it continue along its merry way as if the .msg files
were created.

Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Makefile

index 875edac..df6f6b7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -47,8 +47,8 @@ ifndef V
        QUIET_GEN      = $(QUIET)echo '   ' GEN $@ &&
        QUIET_BUILT_IN = $(QUIET)echo '   ' BUILTIN $@ &&
        QUIET_INDEX    = $(QUIET)echo '   ' INDEX $(dir $@) &&
-       QUIET_MSGFMT0  = $(QUIET)printf '    MSGFMT %12s ' $@ &&
-       QUIET_MSGFMT1  = 2>&1 | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages//g'
+       QUIET_MSGFMT0  = $(QUIET)printf '    MSGFMT %12s ' $@ && v=`
+       QUIET_MSGFMT1  = 2>&1` && echo "$$v" | sed -e 's/fuzzy translations/fuzzy/' | sed -e 's/ messages//g'
        QUIET_2DEVNULL = 2>/dev/null
 
        INSTALL_D0 = dir=