From 3afb09ac803936e70505f54d9ff77dec143712f3 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sun, 10 Mar 2002 10:21:55 +0000 Subject: [PATCH] (gmsgfmt_cmd): New variable. (.po.gmo): Use it here. (.po.mo): Don't create target directly -- otherwise a failed gmsgfmt command would leave a corrupt, yet up-to-date, .gmo file. (.po.gmo): Likewise. --- po/Makefile.in.in | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 2d8baba..ec31f30 100644 --- a/po/Makefile.in.in +++ b/po/Makefile.in.in @@ -58,13 +58,18 @@ CATALOGS = @CATALOGS@ .SUFFIXES: .po .gmo .mo .sed .sin .nop .po-update .po.mo: - $(MSGFMT) -c -o $@ $< + $(MSGFMT) -c -o t-$@ $< + mv t-$@ $@ + +gmsgfmt_cmd = \ + rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o t-$${lang}.gmo \ + $${lang}.po && mv t-$${lang}.gmo $${lang}.gmo .po.gmo: @lang=`echo $* | sed -e 's,.*/,,'`; \ test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \ - echo "$${cdcmd}rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po"; \ - cd $(srcdir) && rm -f $${lang}.gmo && $(GMSGFMT) -c --statistics -o $${lang}.gmo $${lang}.po + echo "$(gmsgfmt_cmd)"; \ + cd $(srcdir) && $(gmsgfmt_cmd) .sin.sed: sed -e '/^#/d' $< > t-$@ -- 2.7.4