From: Bruno Haible Date: Tue, 6 Nov 2001 15:48:00 +0000 (+0000) Subject: Make "make dist" work in automake-1.5 projects. X-Git-Tag: v0.11~326 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83446a2bc0061ff9c5e7b8566e02659e0c1f2411;p=thirdparty%2Fgettext.git Make "make dist" work in automake-1.5 projects. --- diff --git a/po/ChangeLog b/po/ChangeLog index 3e77026fa..156d20886 100644 --- a/po/ChangeLog +++ b/po/ChangeLog @@ -1,3 +1,9 @@ +2001-11-06 Paolo Bonzini + Bruno Haible + + * Makefile.in.in (update-po): Avoid writing in $(srcdir) unless + absolutely necessary. Writing in the builddir is allowed, though. + 2001-11-05 Bruno Haible * de.po: Update from Karl Eichwalder. diff --git a/po/Makefile.in.in b/po/Makefile.in.in index 22b55e926..dee3276a8 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