Re: What's not in 'master', and likely not to be until 1.5.4
- From
Johannes Schindelin <johannes.schindelin@gmx.de>
- Date
- Jan 21, 2008, 10:37 UTC
- Message-ID
- <alpine.LSU.1.00.0801211034040.5731@racer.site>
- In-Reply-To
- <20080121044632.GH24004@spearce.org>
Hi,
On Sun, 20 Jan 2008, Shawn O. Pearce wrote:
Show 27 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> 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.
It was exactly this ugliness which made me not do it.
Note: There might be yet a better way. Instead of trying each and every time, we could detect the presence of msgfmt with something like this:
+ifeq $(shell msgfmt2 2>/dev/null >/dev/null; echo $?) = 127 + MSGFMT = $(TCL_PATH) po/po2msg.sh +endif
This is not tested, yet, tough,
Ciao, Dscho