From: Gary V. Vaughan Date: Thu, 24 Feb 2005 12:06:04 +0000 (+0000) Subject: Using `libtoolize --copy --ltdl' was not preserving timestamps, so X-Git-Tag: release-1-5-16~38 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3ef8b2428a7cdef66c1adafb2927a731d538eb7f;p=thirdparty%2Flibtool.git 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 --- diff --git a/ChangeLog b/ChangeLog index 9a87ac980..904ffcd70 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,19 @@ +2005-02-24 Gary V. Vaughan + + 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 + 2005-02-12 Alexandre Duret-Lutz , Peter O'Gorman @@ -45,7 +61,7 @@ 2005-02-04 Ralf Wildenhues - * ltmain.in (link mode): Allow five digits in version-info + * ltmain.in (link mode): Allow five digits in version-info * NEWS: s/Linux/GNU &/. @@ -173,21 +189,21 @@ symmetry. 2005-01-21 Ralf Wildenhues (tiny change) - + * libltdl.c (try_dlopen): Fix memleak. Savannah BTS patch #3670 by Lennart Poettering. 2005-01-16 Peter O'Gorman * ltmain.in: Don't pass through compiler-like thread flags when - using $LD to do the linking. Use compiler_flags instead. + using $LD to do the linking. Use compiler_flags instead. Reported by Mark_Andrews@isc.org. * libtool.m4 (LT_CMD_MAX_LEN) [osf]: On Tru64 there could be a kernel panic when testing the maximum command line length - if exec_disable_arg_limit=1. Don't do the tests to figure it + if exec_disable_arg_limit=1. Don't do the tests to figure it out on *-osf*. - Reported by Dr. Hans Ekkehard Plesser + Reported by Dr. Hans Ekkehard Plesser 2005-01-14 Guido Draheim (tiny change) diff --git a/libltdl/Makefile.am b/libltdl/Makefile.am index 0a9331788..3c4e604ad 100644 --- a/libltdl/Makefile.am +++ b/libltdl/Makefile.am @@ -31,21 +31,11 @@ $(libltdl_la_OBJECTS) $(libltdlc_la_OBJECTS): libtool 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 -; ) diff --git a/libtoolize.in b/libtoolize.in index 8eaae01fa..5efcc8f60 100644 --- a/libtoolize.in +++ b/libtoolize.in @@ -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 , 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