summaryrefslogtreecommitdiff
path: root/po
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2002-03-10 10:21:55 +0000
committerJim Meyering <jim@meyering.net>2002-03-10 10:21:55 +0000
commit3afb09ac803936e70505f54d9ff77dec143712f3 (patch)
tree2417a8f2fc9d11ecd2c79ae711c72ba5f6c983ae /po
parent1595f1553170c2c1d0c01d36205d262f42fd6e1f (diff)
downloadcoreutils-3afb09ac803936e70505f54d9ff77dec143712f3.tar.xz
(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.
Diffstat (limited to 'po')
-rw-r--r--po/Makefile.in.in11
1 files changed, 8 insertions, 3 deletions
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 2d8baba41..ec31f30b2 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-$@