summaryrefslogtreecommitdiffstats
path: root/po
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2001-11-06 15:48:00 +0000
committerBruno Haible <bruno@clisp.org>2009-06-21 22:53:19 +0200
commit83446a2bc0061ff9c5e7b8566e02659e0c1f2411 (patch)
tree1ef8f08fa2d70286a7b53652effb7a3dbb8a46ee /po
parentf0f633ca47b068ab8c8bb564ea27365d6116bb75 (diff)
downloadexternal_gettext-83446a2bc0061ff9c5e7b8566e02659e0c1f2411.zip
external_gettext-83446a2bc0061ff9c5e7b8566e02659e0c1f2411.tar.gz
external_gettext-83446a2bc0061ff9c5e7b8566e02659e0c1f2411.tar.bz2
Make "make dist" work in automake-1.5 projects.
Diffstat (limited to 'po')
-rw-r--r--po/ChangeLog6
-rw-r--r--po/Makefile.in.in18
2 files changed, 20 insertions, 4 deletions
diff --git a/po/ChangeLog b/po/ChangeLog
index 3e77026..156d208 100644
--- a/po/ChangeLog
+++ b/po/ChangeLog
@@ -1,3 +1,9 @@
+2001-11-06 Paolo Bonzini <bonzini@gnu.org>
+ Bruno Haible <haible@clisp.cons.org>
+
+ * Makefile.in.in (update-po): Avoid writing in $(srcdir) unless
+ absolutely necessary. Writing in the builddir is allowed, though.
+
2001-11-05 Bruno Haible <haible@clisp.cons.org>
* de.po: Update from Karl Eichwalder.
diff --git a/po/Makefile.in.in b/po/Makefile.in.in
index 22b55e9..dee3276 100644
--- a/po/Makefile.in.in
+++ b/po/Makefile.in.in
@@ -184,17 +184,27 @@ dist2: $(DISTFILES)
update-po: Makefile
$(MAKE) $(PACKAGE).pot
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
+ tmpdir=`pwd`; \
cd $(srcdir); \
catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
echo "$$lang:"; \
- if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
- mv -f $$lang.new.po $$lang.po; \
+ if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
+ rm -f $$tmpdir/$$lang.new.po; \
+ else
+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
+ :; \
+ else \
+ echo "msgmerge for $$cat failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+ exit 1; \
+ fi; \
+ fi; \
else \
- echo "msgmerge for $$cat failed!"; \
- rm -f $$lang.new.po; \
+ echo "msgmerge for $$cat failed!" 1>&2; \
+ rm -f $$tmpdir/$$lang.new.po; \
fi; \
done
$(MAKE) update-gmo