bug-gnu-utils
[Top][All Lists]
Advanced

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

fix for `make distcheck' failure in gettextized packages


From: Jim Meyering
Subject: fix for `make distcheck' failure in gettextized packages
Date: Sun, 17 Feb 2002 17:26:45 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.2.50 (i686-pc-linux-gnu)

Hi Bruno!

Thanks for all your hard work on gettext!

I have a make distcheck rule (in sh-utils, fileutils, textutils)
that ensures a read-only source tree is not modified by a `make dist' command.
I've just upgraded to gettext-0.11 and found only one problem:
that check failed when `make dist' tried to remove and recreate
the po/textutils.pot file in a read-only hierarchy.

Here's a non-portable patch -- it relies on GNU diff's -I option.
If you make a change like this, I suppose you'll want to do
something more portable.

2002-02-17  Jim Meyering  <address@hidden>

        * Makefile.in.in ($(DOMAIN).pot-update): Remove/replace the .pot
        file only if the new one is different (modulo the creation date).

Index: Makefile.in.in
===================================================================
RCS file: /fetish/textutils/po/Makefile.in.in,v
retrieving revision 1.37
diff -u -p -u -p -r1.37 Makefile.in.in
--- Makefile.in.in      2002/02/16 14:39:44     1.37
+++ Makefile.in.in      2002/02/17 16:19:22
@@ -82,8 +82,13 @@ $(DOMAIN).pot-update: $(POTFILES) $(srcd
          --files-from=$(srcdir)/POTFILES.in \
          --copyright-holder='$(COPYRIGHT_HOLDER)' \
        && test ! -f $(DOMAIN).po \
-          || ( rm -f $(srcdir)/$(DOMAIN).pot \
-               && mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot )
+          || ( if diff -IPOT-Creation-Date: \
+                    $(DOMAIN).po $(srcdir)/$(DOMAIN).pot>/dev/null 2>&1;then \
+                 rm -f $(DOMAIN).po; \
+               else \
+                 rm -f $(srcdir)/$(DOMAIN).pot; \
+                 mv $(DOMAIN).po $(srcdir)/$(DOMAIN).pot; \
+               fi )
 
 $(srcdir)/$(DOMAIN).pot:
        $(MAKE) $(DOMAIN).pot-update



reply via email to

[Prev in Thread] Current Thread [Next in Thread]