libtool-patches
[Top][All Lists]
Advanced

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

simplify libtoolize path fiddling [libtool--gary--1.0--patch-11]


From: Gary V. Vaughan
Subject: simplify libtoolize path fiddling [libtool--gary--1.0--patch-11]
Date: Thu, 24 Mar 2005 17:16:33 +0000 (GMT)
User-agent: mailnotify/0.6

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

Okay to commit?

        Most of the hair introduced ostensibly to enable testing of
        uninstalled libtoolize isn't necessary if we allow overriding of
        the libtool master copy directory:

        * configure.ac (pkvmacrodir): No need to substitute this.
        * Makefile.am (edit): No need to substitute pkgvmacrodir.
        (dist_pkgvdata_DATA): Use nobase_ prefix so that these files are
        installed to $(pkgvdatadir)/config.
        (pkgvmacro_DATA): Renamed to...
        (nobase_pkgvdata_DATA): ...this, so that files are installed to
        $(pkgvdatadir)/m4.
        (install-data-hook): Adjust.
        * libtoolize.m4sh: Remove -I processing.
        (func_filename_path_search): No longer required without -I.
        Adjust all callers.
        (pkgvltdldirs, pkgvmacrodirs): Deleted.
        (pkgvdatadir): Allow overriding from the environment so that we
        can write tests for uninstalled libtoolize.
        (func_serial_update, func_ltmain_update, func_config_update):
        Rename srcdirs parameter to srcdir, and don't call the path_search
        function anymore.  Adjust all callers.
        (--install): Don't blindly copy all config 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)

iD8DBQFCQvXwFRMICSmD1gYRAl7cAKCwNaQQyQlwNqPUd3QzygvKkzTqqACgyVBt
lWbQas9gRGul2C0xqVLwrDo=
=J4ee
-----END PGP SIGNATURE-----
* looking for address@hidden/libtool--gary--1.0--patch-10 to compare with
* comparing to address@hidden/libtool--gary--1.0--patch-10
M  Makefile.am
M  configure.ac
M  libtoolize.m4sh
M  ChangeLog

* modified files

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

        Most of the hair introduced ostensibly to enable testing of
        uninstalled libtoolize isn't necessary if we allow overriding of
        the libtool master copy directory:

        * configure.ac (pkvmacrodir): No need to substitute this.
        * Makefile.am (edit): No need to substitute pkgvmacrodir.
        (dist_pkgvdata_DATA): Use nobase_ prefix so that these files are
        installed to $(pkgvdatadir)/config.
        (pkgvmacro_DATA): Renamed to...
        (nobase_pkgvdata_DATA): ...this, so that files are installed to
        $(pkgvdatadir)/m4.
        (install-data-hook): Adjust.
        * libtoolize.m4sh: Remove -I processing.
        (func_filename_path_search): No longer required without -I.
        Adjust all callers.
        (pkgvltdldirs, pkgvmacrodirs): Deleted.
        (pkgvdatadir): Allow overriding from the environment so that we
        can write tests for uninstalled libtoolize.
        (func_serial_update, func_ltmain_update, func_config_update):
        Rename srcdirs parameter to srcdir, and don't call the path_search
        function anymore.  Adjust all callers.
        (--install): Don't blindly copy all config files.

--- orig/Makefile.am
+++ mod/Makefile.am
@@ -42,7 +42,6 @@
        -e 's,@datadir\@,$(datadir),g' \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@pkgvdatadir\@,$(pkgvdatadir),g' \
-       -e 's,@pkgvmacrodir\@,$(pkgvmacrodir),g' \
        -e 's,@prefix\@,$(prefix),g' \
        -e "s,@configure_input\@,Generated from $$input; do not edit by hand,g"
 
@@ -83,12 +82,12 @@
 # These are required by libtoolize and must be executable when installed.
 # Since _SCRIPTS gets the program transform applied we make them
 # executable by hand
-dist_pkgvdata_DATA = config/config.guess config/config.sub config/ltmain.sh \
-       config/install-sh
+nobase_dist_pkgvdata_DATA = config/config.guess config/config.sub \
+       config/ltmain.sh config/install-sh
 
 # Everything that gets picked up by aclocal is automatically distributed,
 # this is the list of macro files we install on the user's system.
-pkgvmacro_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
+nobase_pkgvdata_DATA = m4/argz.m4 m4/libtool.m4 m4/ltdl.m4 \
        m4/ltoptions.m4 m4/ltsugar.m4 m4/ltversion.m4
 
 ## We know that $(top_srcdir)/ChangeLog has been edited if stamp-vcl
@@ -224,9 +223,9 @@
        -rm -rf $(DESTDIR)$(aclocaldir)/libtool.m4
 
 install-data-hook:
-       chmod +x $(DESTDIR)$(pkgvdatadir)/config.guess
-       chmod +x $(DESTDIR)$(pkgvdatadir)/config.sub
-       chmod +x $(DESTDIR)$(pkgvdatadir)/install-sh
+       chmod +x $(DESTDIR)$(pkgvdatadir)/config/config.guess
+       chmod +x $(DESTDIR)$(pkgvdatadir)/config/config.sub
+       chmod +x $(DESTDIR)$(pkgvdatadir)/config/install-sh
 
 ## Make versioned links.  We only run the transform on the root name;
 ## then we make a versioned link with the transformed base name.  This


--- orig/configure.ac
+++ mod/configure.ac
@@ -1,5 +1,5 @@
 ## Process this file with autoconf to create configure. -*- autoconf -*-
-# Copyright (C) 2001, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2004, 2005 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -136,7 +136,6 @@
 AC_SUBST([APIVERSION])
 AC_SUBST([aclocaldir],   ["\${datadir}/aclocal"])
 AC_SUBST([pkgvdatadir],  ["\${datadir}/$PACKAGE-$APIVERSION"])
-AC_SUBST([pkgvmacrodir], ["\${datadir}/$PACKAGE-$APIVERSION/m4"])
 
 AC_ARG_ENABLE(ltdl-install,
     [AS_HELP_STRING([--disable-ltdl-install], [do not install libltdl])])


--- orig/libtoolize.m4sh
+++ mod/libtoolize.m4sh
@@ -40,7 +40,6 @@
 # -f, --force           replace existing files
 # -i, --install         copy missing auxiliary files
 #     --ltdl[=DIR]      install libltdl in a subdirectory [default: libltdl]
-# -I DIR                search DIR for libtoolize master source files
 # -q, --quiet           work silently
 # -v, --verbose         verbosely report processing
 #     --version         print version information and exit
@@ -81,11 +80,9 @@
 libtoolize_flags=
 
 # Locations for important files:
+: ${pkgvdatadir="@pkgvdatadir@"}
 address@hidden@
 address@hidden@
address@hidden@         # ltmain.sh et. al.
address@hidden@/libltdl # libltdl source tree
address@hidden@         # libtool.m4 et. al.
 auxdir=
 m4dir=
 ltdldir=
@@ -134,25 +131,6 @@
                        libtoolize_flags="${libtoolize_flags} --install"
                        ;;
 
-      -I)              test "$#" = 0 && func_missing_arg $opt && break
-                       # for installed share/libtool trees:
-                       test -d "$1" \
-                         && pkgvdatadirs="`cd $1 && pwd`:$pkgvdatadirs"
-                       # for uninstalled ltmain.sh location:
-                       test -d "$1/config" \
-                         && pkgvdatadirs="`cd $1/config && pwd`:$pkgvdatadirs"
-                       # for libltdl source files:
-                       test -d "$1" \
-                         && pkgvltdldirs="`cd $1/libltdl \
-                                             && pwd`:$pkgvltdldirs"
-                       # for libtool.m4 and other macro files:
-                       test -d "$1/m4" \
-                         && pkgvmacrodirs="`cd $1/m4 && pwd`:$pkgvmacrodirs"
-                       func_quote_for_eval "$1"
-                       libtoolize_flags="$libtoolize_flags -I 
$func_quote_for_eval_result"
-                       shift
-                       ;;
-
       --ltdl)          ltdldir=libltdl
                        if test "$#" -gt 0; then
                          case $1 in
@@ -408,9 +386,9 @@
     test -f "$configure_ac" \
         || func_fatal_help "\`$configure_ac' does not exist"
 
-    # TODO: check that existing directories from the list can be ls'ed
-    #test -n "`{ cd $pkgvdatadirs && ls; } 2>dev/null`" \
-    #    || func_fatal_error "can not list files in \`$pkgvdatadirs'"
+    # 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'"
 
     # Set local variables to reflect contents of configure.ac
     my_uses_autoconf=false
@@ -526,23 +504,6 @@
 }
 
 
-# func_filename_path_search filename dirs
-func_filename_path_search ()
-{
-    $opt_debug
-    func_filename_path_search_result=
-
-    my_save_IFS="$IFS"; IFS=:
-    for mydir in $2; do
-      IFS="$my_save_IFS"
-      test -f "$mydir/$1" && break
-    done
-    IFS="$my_save_IFS"
-
-    test -f "$mydir/$1" && func_filename_path_search_result="$mydir/$1"
-}
-
-
 # func_serial filename [macro_regex]
 # Output the value of the serial number comment in FILENAME, where the
 # comment line must also match MACRO_REGEX, if given.
@@ -657,28 +618,28 @@
 }
 
 
-# func_serial_update filename srcdirs destdir [macro_regex] [old_macro_regex]
-# Copy the first file named FILENAME from a directory listed in the
-# ':' delimited SRCDIRS to DESTFILE provided that either FILENAME has
-# a newer serial number, or DESTFILE does not yet exist, or the user
+# func_serial_update filename srcdir destdir [macro_regex] [old_macro_regex]
+# Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
+# has a newer serial number, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.  If given, MACRO_REGEX or
 # OLD_MACRO_REGEX must match any text after "# serial N" in both files.
 func_serial_update ()
 {
     $opt_debug
     my_filename="$1"
-    my_srcdirs="$2"
+    my_srcdir="$2"
     my_destdir="$3"
     my_macro_regex="$4"
     my_old_macro_regex="$5"
 
     my_return_status=1
-    func_filename_path_search "$my_filename" "$my_srcdirs"
-    my_srcfile="$func_filename_path_search_result"
+    my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
-    test -f "$my_srcfile" || \
-      { func_error "\`$my_filename' not found in \`$my_srcdirs'"; return; }
+    test -f "$my_srcfile" || {
+      func_error "\`$my_srcfile' does not exist."
+      return
+    }
 
     if test -f "$my_destfile"; then
       my_src_serial=`func_serial "$my_srcfile" "$my_macro_regex"`
@@ -717,20 +678,18 @@
 }
 
 
-# func_ltmain_update filename srcdirs destdir
-# Copy the first file named FILENAME from a directory listed in the
-# ':' delimited SRCDIRS to DESTFILE provided that either FILENAME has
-# a newer TIMESTAMP, or DESTFILE does not yet exist, or the user
+# func_ltmain_update filename srcdir destdir
+# Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
+# has a newer revision, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.
 func_ltmain_update ()
 {
     $opt_debug
     my_filename="$1"
-    my_srcdirs="$2"
+    my_srcdir="$2"
     my_destdir="$3"
 
-    func_filename_path_search "$my_filename" "$my_srcdirs"
-    my_srcfile="$func_filename_path_search_result"
+    my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
     my_update_p=:
@@ -767,20 +726,18 @@
 }
 
 
-# func_config_update filename srcdirs destdir
-# Copy the first file named FILENAME from a directory listed in the
-# ':' delimited SRCDIRS to DESTFILE provided that either FILENAME has
-# a newer TIMESTAMP, or DESTFILE does not yet exist, or the user
+# func_config_update filename srcdir destdir
+# Copy the FILENAME from a SRCDIR to DESTDIR provided that either FILENAME
+# has a newer timestamp, or DESTFILE does not yet exist, or the user
 # specified `--force' at the command line.
 func_config_update ()
 {
     $opt_debug
     my_filename="$1"
-    my_srcdirs="$2"
+    my_srcdir="$2"
     my_destdir="$3"
 
-    func_filename_path_search "$my_filename" "$my_srcdirs"
-    my_srcfile="$func_filename_path_search_result"
+    my_srcfile="$my_srcdir/$my_filename"
     my_destfile="$my_destdir/$my_filename"
 
     my_update_p=:
@@ -909,7 +866,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_some_files "$pkgvltdl_files" "$pkgvltdldirs" "$ltdldir"
+    func_copy_some_files "$pkgvltdl_files" "$pkgvdatadir/libltdl" "$ltdldir"
 
     # libtoolize the newly copied libltdl tree
     ( cd "$ltdldir" && eval "$progpath" $libtoolize_flags ) \
@@ -922,28 +879,26 @@
     func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
   fi
   if $opt_install; then
-    func_copy_all_from_path . "$pkgvdatadirs" \
-      "$auxdir" "$glob_exclude_pkgaux_files"
-    func_config_update config.guess "$pkgvdatadirs" "$auxdir"
-    func_config_update config.sub   "$pkgvdatadirs" "$auxdir"
-    func_config_update install-sh   "$pkgvdatadirs" "$auxdir"
+    func_config_update config.guess "$pkgvdatadir/config" "$auxdir"
+    func_config_update config.sub   "$pkgvdatadir/config" "$auxdir"
+    func_config_update install-sh   "$pkgvdatadir/config" "$auxdir"
   fi
-  func_ltmain_update ltmain.sh "$pkgvdatadirs" "$auxdir"
+  func_ltmain_update ltmain.sh "$pkgvdatadir/config" "$auxdir"
 
   # Copy libtool's m4 macros to the macro directory, if they are newer.
   if test -n "$m4dir"; then
     $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$m4dir'."
 
-    func_serial_update  libtool.m4 "$pkgvmacrodirs" "$m4dir" \
+    func_serial_update  libtool.m4 "$pkgvdatadir/m4" "$m4dir" \
       LT_INIT 'A[[CM]]_PROG_LIBTOOL'
 
     if $seen_ltdl; then
-      func_serial_update ltdl.m4 "$pkgvmacrodirs" "$m4dir" 'LTDL_INIT'
+      func_serial_update ltdl.m4 "$pkgvdatadir/m4" "$m4dir" 'LTDL_INIT'
     else
       func_verbose "Not copying \`$m4dir/ltdl.m4', libltdl not used."
     fi
 
-    func_copy_some_files "$pkgvmacro_files" "$pkgvmacrodirs" \
+    func_copy_some_files "$pkgvmacro_files" "$pkgvdatadir/m4" \
       "$m4dir" func_serial_update
   else
     func_verbose "AC_CONFIG_MACRO_DIR not defined, not copying libtool macro 
files."




reply via email to

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