From: Shawn O. Pearce Date: Mon, 21 Jan 2008 04:46:32 GMT Subject: Re: What's not in 'master', and likely not to be until 1.5.4 Message-ID: <20080121044632.GH24004@spearce.org> In-Reply-To: Johannes Schindelin wrote: > [PATCH] Fall back to po2msg when msgfmt is unavailable > > diff --git a/git-gui/Makefile b/git-gui/Makefile > index c109eab..c7921e7 100644 > --- a/git-gui/Makefile > +++ b/git-gui/Makefile > @@ -210,7 +211,8 @@ $(PO_TEMPLATE): $(SCRIPT_SH) $(ALL_LIBFILES) > update-po:: $(PO_TEMPLATE) > $(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; ) > $(ALL_MSGFILES): %.msg : %.po > - $(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1) > + $(QUIET_MSGFMT0)$(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1) || \ > + $(QUIET_MSGFMT0)$(PO2MSG) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< $(QUIET_MSGFMT1) That will cause the QUIET_MSGFMT0 script to echo twice; once when we try to run msgfmt and again when we fallback to po2msg. That messes with the user's display and won't look very nice coming out of a supposedly quiet make. In other words this is probably better: + $(QUIET_MSGFMT0)($(MSGFMT) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< || \ + $(PO2MSG) --statistics --tcl -l $(basename $(notdir $<)) -d $(dir $@) $< )$(QUIET_MSGFMT1) But it is a lot uglier to read, and I tend to not like subshells. -- Shawn.