]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(gmsgfmt_cmd): New variable.
authorJim Meyering <jim@meyering.net>
Sun, 10 Mar 2002 10:21:55 +0000 (10:21 +0000)
committerJim Meyering <jim@meyering.net>
Sun, 10 Mar 2002 10:21:55 +0000 (10:21 +0000)
(.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

index 2d8baba41b5b6336243a8413b42761437fb5f71a..ec31f30b2d9f1872a18b13a0fd1e2e742e508862 100644 (file)
@@ -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-$@