libtool-patches
[Top][All Lists]
Advanced

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

don't rely on recursive copy for libtoolize --ltdl [libtool--gary--1.0--


From: Gary V. Vaughan
Subject: don't rely on recursive copy for libtoolize --ltdl [libtool--gary--1.0--patch-4]
Date: Sun, 20 Mar 2005 14:02:36 +0000 (GMT)
User-agent: mailnotify/0.6

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Okay to commit?

        As a prerequisite for being able to test an uninstalled libtoolize
        for copying files correctly from the source tree, we must know
        exactly which files should be copied by the --ltdl option to avoid
        accidentally picking up compilation objects and other noise when
        $builddir == $srcdir:

        * libltdl/loaders/Makefile.am (ltdldatadir, ltdldatafiles)
        (install-data-local): Removed...
        * libltdl/Makefile.am (ltdldatafiles): ...and consolidated here.
        (show-ltdldatafiles): New rule...
        * Makefile.am (ltdldatafiles, libtoolize): ...used to substitute
        exactly which files are installed by libtoolize --ltdl.
        (edit): Move pkgvmacro_DATA substitution expression...
        (libtoolize): ...to here.
        * libtoolize.m4sh: Use func_copy_some_files() instead of
        func_copy_all_from_path() to copy the --ltdl option installed
        files.
        (pkgvltdldirs): New path variable to search for files installed by
        --ltdl option.
        (func_massage_pkgvltdl_files): New function to calculate the list
        of ltdl installation files.

- -- 
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
_________________________________________________________
This patch notification generated by tlaapply version 0.9
http://tkd.kicks-ass.net/arch/address@hidden/cvs-utils--tla--1.0
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (Darwin)

iD8DBQFCPYJ6FRMICSmD1gYRAnv8AKC2tPyxa4qlsfZPXo7IQE9btnQUUQCdF7Sn
E5UwcxPbv30kq0E+izSF0ZI=
=NMHK
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--gary--1.0--patch-3 to compare with
* comparing to address@hidden/libtool--gary--1.0--patch-3
M  Makefile.am
M  libltdl/Makefile.am
M  libtoolize.m4sh
M  ChangeLog
M  libltdl/loaders/Makefile.am

* modified files

Index: Changelog
from  Gary V. Vaughan  <address@hidden>

        As a prerequisite for being able to test an uninstalled libtoolize
        for copying files correctly from the source tree, we must know
        exactly which files should be copied by the --ltdl option to avoid
        accidentally picking up compilation objects and other noise when
        $builddir == $srcdir:

        * libltdl/loaders/Makefile.am (ltdldatadir, ltdldatafiles)
        (install-data-local): Removed...
        * libltdl/Makefile.am (ltdldatafiles): ...and consolidated here.
        (show-ltdldatafiles): New rule...
        * Makefile.am (ltdldatafiles, libtoolize): ...used to substitute
        exactly which files are installed by libtoolize --ltdl.
        (edit): Move pkgvmacro_DATA substitution expression...
        (libtoolize): ...to here.
        * libtoolize.m4sh: Use func_copy_some_files() instead of
        func_copy_all_from_path() to copy the --ltdl option installed
        files.
        (pkgvltdldirs): New path variable to search for files installed by
        --ltdl option.
        (func_massage_pkgvltdl_files): New function to calculate the list
        of ltdl installation files.

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -43,7 +43,6 @@
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@pkgvdatadir\@,$(pkgvdatadir),g' \
        -e 's,@pkgvmacrodir\@,$(pkgvmacrodir),g' \
-       -e 's,@pkgvmacro_DATA\@,$(pkgvmacro_DATA),g' \
        -e 's,@prefix\@,$(prefix),g' \
        -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
 
@@ -163,7 +162,10 @@
        rm -f libtoolize.tmp libtoolize
        $(timestamp); \
        input="libtoolize.m4sh"; \
+       ltdldatafiles=`cd libltdl; make show-ltdldatafiles`; \
        $(edit) -e "s,@TIMESTAMP\@,$$TIMESTAMP,g" \
+               -e 's,@pkgvmacro_DATA\@,$(pkgvmacro_DATA),g' \
+               -e "s,@pkgvltdl_files\@,`echo $$ltdldatafiles`,g" \
                $(top_srcdir)/libtoolize.in > libtoolize.tmp
        chmod a+x libtoolize.tmp
        chmod a-w libtoolize.tmp


--- orig/libltdl/Makefile.am
+++ mod/libltdl/Makefile.am
@@ -73,7 +73,14 @@
                          $(libltdl_la_SOURCES) \
                          lt__dirent.c libltdl/lt__dirent.h \
                          lt__strl.c libltdl/lt__strl.h \
-                         argz_.h argz.c
+                         argz_.h argz.c \
+                         loaders/Makefile.am loaders/Makefile.in \
+                         loaders/dld_link.c \
+                         loaders/dlopen.c \
+                         loaders/dyld.c \
+                         loaders/load_add_on.c \
+                         loaders/loadlibrary.c \
+                         loaders/shl_load.c
 
 ## To avoid spurious reconfiguration when the user installs these files
 ## with libtoolize, we have to preserve their timestamps carefully:
@@ -82,6 +89,11 @@
        ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
          | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )
 
+## This rule is used by the top Makefile.am to get the list of ltdl
+## files that libtoolize will use to implement 'libtoolize --ltdl':
+show-ltdldatafiles:
+       @echo "$(ltdldatafiles)"
+
 ## Make sure these will be cleaned even when they're not built by default:
 CLEANFILES             = libltdl.la libltdlc.la libdlloader.la
 


--- orig/libltdl/loaders/Makefile.am
+++ mod/libltdl/loaders/Makefile.am
@@ -42,18 +42,3 @@
 dlopen_la_LIBADD       = $(LIBADD_DLOPEN)
 shl_load_la_LIBADD     = $(LIBADD_SHL_LOAD)
 dld_link_la_LIBADD     = -ldld
-
-
-## These are installed as a subdirectory of pkgdatadir so that
-## libtoolize --ltdl can find them later:
-ltdldatadir            = $(pkgvdatadir)/libltdl/loaders
-ltdldatafiles          = Makefile.am Makefile.in \
-                         dld_link.c dlopen.c dyld.c \
-                         load_add_on.c loadlibrary.c shl_load.c
-
-## To avoid spurious reconfiguration when the user installs these files
-## with libtoolize, we have to preserve their timestamps carefully:
-install-data-local:
-       $(mkinstalldirs) $(DESTDIR)$(ltdldatadir)
-       ( cd $(srcdir) && $(AMTAR) chf - $(ltdldatafiles); ) \
-         | ( umask 0 && cd $(DESTDIR)$(ltdldatadir) && $(AMTAR) xf -; )


--- orig/libtoolize.m4sh
+++ mod/libtoolize.m4sh
@@ -84,6 +84,7 @@
 address@hidden@
 address@hidden@
 address@hidden@
address@hidden@/libltdl
 address@hidden@
 auxdir=
 m4dir=
@@ -143,7 +144,10 @@
 
       -I)              test "$#" = 0 && func_missing_arg $opt && break
                        test -d "$1" \
-                         && pkgvdatadirs="`cd $1 && pwd`:$pkgvdatadirs"
+                         && pkgvdatadirs="`cd $1 && pwd`:$pkgvltdldirs"
+                       test -d "$1" \
+                         && pkgvltdldirs="`cd $1/libltdl \
+                                             && pwd`:$pkgvltdldirs"
                        test -d "$1/m4" \
                          && pkgvmacrodirs="`cd $1/m4 && pwd`:$pkgvmacrodirs"
                        func_quote_for_eval "$1"
@@ -396,8 +400,8 @@
         || func_fatal_help "\`$configure_ac' does not exist"
 
     # TODO: check that existing directories from the list can be ls'ed
-    #test -n "`{ cd $pkgvdatadir && ls; } 2>dev/null`" \
-    #    || func_fatal_error "can not list files in \`$pkgvdatadir'"
+    #test -n "`{ cd $pkgvdatadirs && ls; } 2>dev/null`" \
+    #    || func_fatal_error "can not list files in \`$pkgvdatadirs'"
 
     # Set local variables to reflect contents of configure.ac
     my_uses_autoconf=false
@@ -834,7 +838,7 @@
     for my_filename in @pkgvmacro_DATA@; do
       my_filename=`$ECHO "X$my_filename" | $Xsed -e "$basename"`
 
-       # ignore excluded filenames
+      # ignore excluded filenames
       if test -n "$my_glob_exclude"; then
         eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
       fi
@@ -847,6 +851,35 @@
 }
 
 
+# func_massage_pkgvltdl_files [glob_exclude]
+# @pkgvltdl_files\@ is substituted as per its value in Makefile.am; this
+# function massages it into a suitable format for func_copy_some_files.
+func_massage_pkgvltdl_files ()
+{
+    pkgvltdl_files=    # GLOBAL VAR
+
+    my_glob_exclude="$1"
+
+    # Massage a value for pkgvltdl_files from the value used in Makefile.am
+    for my_filename in @pkgvltdl_files@; do
+
+      # ignore excluded filenames
+      if test -n "$my_glob_exclude"; then
+        eval 'case $my_filename in '$my_glob_exclude') continue ;; esac'
+      fi
+
+      # ignore duplicates
+      case :$pkgvltdl_files: in
+        *:$my_filename:*) ;;
+       *) pkgvltdl_files="$pkgvltdl_files:$my_filename" ;;
+      esac
+    done
+
+    # strip spurious leading `:'
+    pkgvltdl_files=`$ECHO "X$pkgvltdl_files" | $Xsed -e 's,^:*,,'`
+}
+
+
 ## ----------- ##
 ##    Main.    ##
 ## ----------- ##
@@ -854,6 +887,8 @@
 {
   rerun_aclocal=false
 
+  func_massage_pkgvltdl_files
+
   # libtool.m4 and ltdl.m4 are handled specially below
   func_massage_pkgvmacro_DATA 'libtool.m4|ltdl.m4'
 
@@ -865,7 +900,7 @@
   # Copy all the files from installed (or specified, if `-I' was used)
   # libltdl to this project, if the user specified `--ltdl'.
   if test -n "$ltdldir"; then
-    func_copy_all_from_path -r libltdl "$pkgvdatadirs" "$ltdldir"
+    func_copy_some_files "$pkgvltdl_files" "$pkgvltdldirs" "$ltdldir"
 
     # libtoolize the newly copied libltdl tree
     ( cd "$ltdldir" && eval "$progpath" $libtoolize_flags ) \




reply via email to

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