po/Makefile.in.in patch for glib-2-2 branch



I have split out the po/Makefile.in.in changes from my previous patch, for merging with the glib-2-2 branch. This will help other packages that use glib-gettextize that want to upgrade to newer automakes. Of course, the patch won't break anything for packages stil using automake 1.4 (including glib 2.2).

The actual Makefile changes are identical to the ones on the head branch

One other area of concern is packages using intltool + glib-gettextize. This isn't a problem, since yesterday I got approval and checked in a patch to get intltool to work with glib 2.3's glib-gettextize.

James.

--
Email: james daa com au
WWW:   http://www.daa.com.au/~james/


Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/glib/ChangeLog,v
retrieving revision 1.1255.2.25
diff -u -p -r1.1255.2.25 ChangeLog
--- ChangeLog	25 Feb 2003 21:26:01 -0000	1.1255.2.25
+++ ChangeLog	4 Mar 2003 17:06:08 -0000
@@ -1,3 +1,9 @@
+2003-03-05  James Henstridge  <james daa com au>
+
+	* po/Makefile.in.in: merge changes from trunk, to allow "make
+	distcheck" to pass with newer automakes.  This helps packages
+	using glib-gettextize that want to upgrade to automake > 1.4.
+
 2003-02-25  Tor Lillqvist  <tml iki fi>
 
 	* glib/glib.def: Add a couple of missing entries, thanks to Cedric
Index: po/Makefile.in.in
===================================================================
RCS file: /cvs/gnome/glib/po/Makefile.in.in,v
retrieving revision 1.12
diff -u -p -r1.12 Makefile.in.in
--- po/Makefile.in.in	11 Dec 2002 19:43:22 -0000	1.12
+++ po/Makefile.in.in	4 Mar 2003 17:06:09 -0000
@@ -169,7 +169,9 @@ uninstall:
 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT); \
 	  rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(GETTEXT_PACKAGE)$(INSTOBJEXT).m; \
 	done
-	rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
+	if test "$(PACKAGE)" = "glib"; then \
+	  rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
+	fi
 
 check: all
 
@@ -199,19 +201,28 @@ dist distdir: update-po $(DISTFILES)
 
 update-po: Makefile
 	$(MAKE) $(GETTEXT_PACKAGE).pot
+	tmpdir=`pwd`; \
 	cd $(srcdir); \
 	catalogs='$(CATALOGS)'; \
 	for cat in $$catalogs; do \
 	  cat=`basename $$cat`; \
 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
-	  mv $$lang.po $$lang.old.po; \
 	  echo "$$lang:"; \
-	  if $(MSGMERGE) $$lang.old.po $(GETTEXT_PACKAGE).pot -o $$lang.po; then \
-	    rm -f $$lang.old.po; \
+	  if $(MSGMERGE) $$lang.po $(GETTEXT_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 $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
+	        rm -f $$tmpdir/$$lang.new.po; \
+	        exit 1; \
+	      fi; \
+	    fi; \
 	  else \
 	    echo "msgmerge for $$cat failed!"; \
-	    rm -f $$lang.po; \
-	    mv $$lang.old.po $$lang.po; \
+	    rm -f $$tmpdir/$$lang.new.po; \
 	  fi; \
 	done
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]