libtool-patches
[Top][All Lists]
Advanced

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

119-gary-libtoolize-copy-branch-1-5.patch


From: Gary V. Vaughan
Subject: 119-gary-libtoolize-copy-branch-1-5.patch
Date: Wed, 23 Feb 2005 16:05:09 +0000
User-agent: Mozilla Thunderbird 0.9 (X11/20041103)

Okay to apply?
-- 
Gary V. Vaughan      ())_.  address@hidden,gnu.org}
Research Scientist   ( '/   http://tkd.kicks-ass.net
GNU Hacker           / )=   http://www.gnu.org/software/libtool
Technical Author   `(_~)_   http://sources.redhat.com/autobook
Index: ChangeLog
from  Gary V. Vaughan  <address@hidden>

        Using `libtoolize --copy --ltdl' was not preserving timestamps, so
        parts of the autoconf bootstrap would be rerun spuriously after
        the files had been copied into the source tree:

        * libtoolize.in: Use $tar to copy files to preserve timestamps.
        (tar): New default tar command.
        (cp): Use -p to try and preserve timestamps.
        * libltdl/Makefile.am (ltdldatadir): Installation destination for
        libltdl sources.
        (install-data-local): New rule to install libltdl tree with tar to
        preserve timestamps.
        (local-install-files): Removed.
        Reported by Jeff Squyres <address@hidden>

Index: libtoolize.in
===================================================================
RCS file: /cvsroot/libtool/libtool/Attic/libtoolize.in,v
retrieving revision 1.21.2.8
diff -u -p -r1.21.2.8 libtoolize.in
--- libtoolize.in 10 Feb 2005 15:01:09 -0000 1.21.2.8
+++ libtoolize.in 23 Feb 2005 16:02:24 -0000
@@ -1,7 +1,7 @@
 #! /bin/sh
 # libtoolize - Prepare a package to use libtool.
 # @configure_input@
-# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2005
 # Free Software Foundation, Inc.
 # Originally by Gordon Matzigkeit <address@hidden>, 1996
 #
@@ -46,8 +46,9 @@ dry_run=no
 help="Try \`$progname --help' for more information."
 rm="rm -f"
 ln_s="@LN_S@"
-cp="cp -f"
+cp="cp -f -p"
 mkdir="mkdir"
+tar="tar"
 
 # Global variables.
 automake=
@@ -114,6 +115,7 @@ EOF
       test -n "$ln_s" && ln_s="echo $ln_s"
       cp="echo $cp"
       mkdir="echo mkdir"
+      tar="echo $tar"
     fi
     ;;
 
@@ -291,6 +293,8 @@ for file in $ltdlfiles; do
 
   $rm $file
   if test -n "$ln_s" && $ln_s $pkgdatadir/$file $file; then :
+  elif { ( cd $pkgdatadir && $tar cf - $file 2> /dev/null; ) \
+      | $tar xf - > /dev/null 2>&1; } ; then :
   elif $cp $pkgdatadir/$file $file; then :
   else
     echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
@@ -308,7 +312,9 @@ if test "x$ltdl_tar" = x"yes"; then
     $mkdir libltdl
     ltdlfiles=`cd $pkgdatadir && ls libltdl/*`
     for file in $ltdlfiles; do
-      if $cp $pkgdatadir/$file $file; then :
+      if { ( cd $pkgdatadir && $tar cf - $file 2> /dev/null; ) \
+          | $tar xf - > /dev/null 2>&1; } ; then :
+      elif $cp $pkgdatadir/$file $file; then :
       else
        echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
        status=1
@@ -316,7 +322,9 @@ if test "x$ltdl_tar" = x"yes"; then
       fi
     done
     for file in $files; do
-      if $cp $pkgdatadir/$file libltdl/$file; then :
+      if { ( cd $pkgdatadir && $tar cf - $file 2> /dev/null; ) \
+          | ( cd libltdl && $tar xf - > /dev/null 2>&1; ) } ; then :
+      elif $cp $pkgdatadir/$file libltdl/$file; then :
       else
        echo "$progname: cannot copy \`$pkgdatadir/$file' to \`libltdl/$file'" 
1>&2
        status=1
@@ -343,6 +351,8 @@ for file in $files; do
 
   $rm $file
   if test -n "$ln_s" && $ln_s $pkgdatadir/$file $file; then :
+  elif { ( cd $pkgdatadir && $tar cf - $file 2> /dev/null; ) \
+      | $tar xf - > /dev/null 2>&1; } ; then :
   elif $cp $pkgdatadir/$file $file; then :
   else
     echo "$progname: cannot copy \`$pkgdatadir/$file' to \`$file'" 1>&2
Index: libltdl/Makefile.am
===================================================================
RCS file: /cvsroot/libtool/libtool/libltdl/Makefile.am,v
retrieving revision 1.42.2.2
diff -u -p -r1.42.2.2 Makefile.am
--- libltdl/Makefile.am 5 Feb 2005 15:01:18 -0000 1.42.2.2
+++ libltdl/Makefile.am 23 Feb 2005 16:02:24 -0000
@@ -31,21 +31,11 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJE
 libtool: $(LIBTOOL_DEPS)
        $(SHELL) ./config.status --recheck
 
-## This allows us to install libltdl without using ln and without creating
-## a world writeable directory.
-## FIXME:  Remove this rule once automake can do this properly by itself.
-local-install-files: $(DISTFILES)
-       -rm -rf $(DESTDIR)$(datadir)/libtool/libltdl
-       $(mkinstalldirs) $(DESTDIR)$(datadir)/libtool/libltdl
-       @for file in $(DISTFILES); do \
-         case $$file in \
-           $(srcdir)/*) file=`echo "$$file" | sed "s|^$(srcdir)/||"`;; \
-         esac; \
-         d=$(srcdir); \
-         if test -d $$d/$$file; then \
-           cp -r $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file; \
-         else \
-           test -f $(DESTDIR)$(datadir)/libtool/libltdl/$$file \
-           || cp $$d/$$file $(DESTDIR)$(datadir)/libtool/libltdl/$$file || :; \
-         fi; \
-       done
+## To avoid spurious reconfiguration when the user installs these files
+## with libtoolize, we have to preserve their timestamps carefully:
+ltdldatadir = $(datadir)/libtool/libltdl
+install-data-local:
+       -rm -rf $(DESTDIR)$(ltdldatadir)
+       $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
+       $(AMTAR) cf - $(DISTFILES) \
+         | ( cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

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