Re: msgmft segfaulting on tiger

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Junio C Hamano
Date: Thursday, March 6, 2008 - 1:40 am

"Shawn O. Pearce" <spearce@spearce.org> writes:


I looked at what you have in your Makefile.  

It makes me wonder, however, if it makes more sense to squash the two
invocations of msgfmt you make into one, like the attached patch.

The point is that msgfmt you guys want to use _must_ understand --tcl,
and a msgfmt new enough to be usable would exit with 0 on the above
command line.

-- >8 --
gitk i18n: Fall back to po2msg.sh if msgfmt --tcl fails

Some platforms may have a msgfmt that doesn't understand --tcl.  Mac OS X
Tiger is an example.

Falling back to po2msg.sh on such systems is a reasonable behavior.

Signed-off-by: Junio C Hamano <gitster@pobox.com>
---
 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index ae2b80b..c72e7f7 100644
--- a/Makefile
+++ b/Makefile
@@ -22,6 +22,9 @@ ifdef NO_MSGFMT
 	MSGFMT ?= $(TCL_PATH) po/po2msg.sh
 else
 	MSGFMT ?= msgfmt
+	ifneq ($(shell $(MSGFMT) --tcl -l C -d . /dev/null 2>/dev/null; echo $?),0)
+		MSGFMT = $(TCL_PATH) po/po2msg.sh 
+	endif
 endif
 
 PO_TEMPLATE = po/gitk.pot

--
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
msgmft segfaulting on tiger, Martin Langhoff, (Thu Feb 21, 4:53 pm)
Re: msgmft segfaulting on tiger, Martin Langhoff, (Thu Feb 21, 4:59 pm)
Re: msgmft segfaulting on tiger, Shawn O. Pearce, (Thu Feb 21, 11:58 pm)
Re: msgmft segfaulting on tiger, Martin Langhoff, (Fri Feb 22, 10:57 am)
Re: msgmft segfaulting on tiger, Gabriel Saldaña, (Wed Feb 27, 11:18 am)
Re: msgmft segfaulting on tiger, Johannes Schindelin, (Wed Feb 27, 11:26 am)
Re: msgmft segfaulting on tiger, Gabriel Saldaña, (Wed Feb 27, 11:42 am)
Re: msgmft segfaulting on tiger, Johannes Schindelin, (Wed Feb 27, 3:04 pm)
Re: msgmft segfaulting on tiger, Junio C Hamano, (Wed Feb 27, 3:14 pm)
Re: msgmft segfaulting on tiger, Shawn O. Pearce, (Wed Feb 27, 5:32 pm)
Re: msgmft segfaulting on tiger, Gabriel Saldaña, (Thu Feb 28, 11:40 am)
msgmft segfaulting on ubuntu gutsy (clean), Gabriel Saldaña, (Tue Mar 4, 12:02 am)
Re: msgmft segfaulting on ubuntu gutsy (clean), Shawn O. Pearce, (Tue Mar 4, 12:07 am)
Re: msgmft segfaulting on tiger, Shawn O. Pearce, (Wed Mar 5, 12:19 am)
Re: msgmft segfaulting on tiger, Junio C Hamano, (Thu Mar 6, 1:40 am)
[PATCH] Simplify MSGFMT setting in Makefile, Junio C Hamano, (Tue Mar 11, 10:29 pm)
Re: [PATCH] Simplify MSGFMT setting in Makefile, Shawn O. Pearce, (Tue Mar 11, 10:51 pm)
Re: [PATCH] Simplify MSGFMT setting in Makefile, Charles Bailey, (Wed Mar 12, 3:19 am)
Re: [PATCH] Simplify MSGFMT setting in Makefile, Paul Mackerras, (Thu Mar 13, 9:44 pm)
Re: [PATCH] Simplify MSGFMT setting in Makefile, Junio C Hamano, (Thu Mar 13, 9:50 pm)
Re: [PATCH] Simplify MSGFMT setting in Makefile, Andreas Ericsson, (Fri Mar 14, 6:07 am)