Re: msgmft segfaulting on tiger
- From
Shawn O. Pearce <spearce@spearce.org>
- Date
- Feb 28, 2008, 00:32 UTC
- Message-ID
- <20080228003212.GP8410@spearce.org>
- In-Reply-To
- <7vablmqc7q.fsf@gitster.siamese.dyndns.org>
Junio C Hamano <gitster@pobox.com> wrote:
Show 12 quoted lines
> Johannes Schindelin <Johannes.Schindelin@gmx.de> writes: > >> $ msgfmt --tcl; echo $? > >> msgfmt: unrecognized option `--tcl' > >> Try `msgfmt --help' for more information. > >> 1 > > > > Darn. I think that's the same exit code as for any other invocation > > without filename. > > How about... > > $ msgfmt --tcl -l C -d . /dev/null; echo $?
I can't test this, my msgfmt --tcl works properly. Can someone who has a msgfmt lacking tcl support confirm this will work?
--8<-- [PATCH] git-gui: Gracefully fall back to po2msg.sh if msgfmt --tcl fails
Mac OS X Tiger may have a msgfmt available but it doesn't understand how to implement --tcl. Falling back to po2msg.sh on such systems is a reasonable behavior.
Signed-off-by: Shawn O. Pearce <spearce@spearce.org> --- Makefile | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Makefile b/Makefile index 01e0a46..1bd11eb 100644 --- a/Makefile +++ b/Makefile @@ -224,6 +224,11 @@ else ifeq ($(shell $(MSGFMT) >/dev/null 2>&1 || echo $$?),127) MSGFMT := $(TCL_PATH) po/po2msg.sh endif + ifeq (msgfmt,$(MSGFMT)) + ifeq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null || echo $?),1) + MSGFMT := $(TCL_PATH) po/po2msg.sh + endif + endif endif msgsdir = $(gg_libdir)/msgs
-- 1.5.4.3.295.g6b554 -- Shawn.