]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Make "make dist" work in automake-1.5 projects.
authorBruno Haible <bruno@clisp.org>
Tue, 6 Nov 2001 15:48:00 +0000 (15:48 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 20:53:19 +0000 (22:53 +0200)
po/ChangeLog
po/Makefile.in.in

index 3e77026fa7e73eec39d0d0ae6520833385698fd9..156d208861c84fb7a739ee9032387e47dd5a3a31 100644 (file)
@@ -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.
index 22b55e926d431f293a09dbcb2d2aedca77925354..dee3276a844525321fba9141f9e1de3ad8a64723 100644 (file)
@@ -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