Thread (20 messages) flat view 20 messages, 10 authors, 2016-06-15

Re: What's not in 'master', and likely not to be until 1.5.4

From: Johannes Schindelin <hidden>
Date: 2016-06-15 22:44:06
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

Hi,

On Fri, 18 Jan 2008, Johannes Schindelin wrote:
- d6596ed(gitk: Disable msgfmt on MinGW) and
  004fb4b(Fix renaming .gitk-new to .gitk on Windows if there is already a 
	  .gitk)
  are gitk patches.

  Further, I think that d6596ed would be better done as an automatic 
  detection of msgfmt's presence; on my Eee PC, there is no msgfmt 
  either...
IOW I think something like this:

-- snipsnap --
[PATCH] Fall back to po2msg when msgfmt is unavailable

At least on my Eee PC I do not have msgfmt.

This should be split into two patches, one for git-gui and one for gitk.
---
 git-gui/Makefile  |    6 ++++--
 gitk-git/Makefile |    7 +++++--
 2 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/git-gui/Makefile b/git-gui/Makefile
index c109eab..c7921e7 100644
--- a/git-gui/Makefile
+++ b/git-gui/Makefile
@@ -193,8 +193,9 @@ $(GITGUI_MAIN): git-gui.sh GIT-VERSION-FILE GIT-GUI-VARS
 	mv $@+ $@
 
 XGETTEXT   ?= xgettext
+PO2MSG = $(TCL_PATH) po/po2msg.sh
 ifdef NO_MSGFMT
-	MSGFMT ?= $(TCL_PATH) po/po2msg.sh
+	MSGFMT ?= $(PO2MSG)
 else
 	MSGFMT ?= msgfmt
 endif
@@ -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)
 
 lib/tclIndex: $(ALL_LIBFILES) GIT-GUI-VARS
 	$(QUIET_INDEX)if echo \
diff --git a/gitk-git/Makefile b/gitk-git/Makefile
index ae2b80b..669ab0e 100644
--- a/gitk-git/Makefile
+++ b/gitk-git/Makefile
@@ -8,6 +8,7 @@ gitk_libdir   ?= $(sharedir)/gitk/lib
 msgsdir    ?= $(gitk_libdir)/msgs
 msgsdir_SQ  = $(subst ','\'',$(msgsdir))
 
+TCL_PATH ?= tclsh
 TCLTK_PATH ?= wish
 INSTALL ?= install
 RM ?= rm -f
@@ -18,8 +19,9 @@ TCLTK_PATH_SQ = $(subst ','\'',$(TCLTK_PATH))
 
 ## po-file creation rules
 XGETTEXT   ?= xgettext
+PO2MSG = $(TCL_PATH) po/po2msg.sh
 ifdef NO_MSGFMT
-	MSGFMT ?= $(TCL_PATH) po/po2msg.sh
+	MSGFMT ?= $(PO2MSG)
 else
 	MSGFMT ?= msgfmt
 endif
@@ -59,5 +61,6 @@ update-po:: $(PO_TEMPLATE)
 	$(foreach p, $(ALL_POFILES), echo Updating $p ; msgmerge -U $p $(PO_TEMPLATE) ; )
 $(ALL_MSGFILES): %.msg : %.po
 	@echo Generating catalog $@
-	$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
+	$(MSGFMT) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@) || \
+	$(PO2MSG) --statistics --tcl $< -l $(basename $(notdir $<)) -d $(dir $@)
 
-- 
1.5.4.rc3.30.g1de144
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help