From: Gary V. Vaughan Date: Fri, 1 Apr 2005 12:23:55 +0000 (+0000) Subject: Most of the hair introduced ostensibly to enable testing of X-Git-Tag: release-2-1b~695 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=86a2d89ea5aa5427ceee7da09804830448ea12af;p=thirdparty%2Flibtool.git 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. --- diff --git a/ChangeLog b/ChangeLog index 037fa5bae..839d52b9d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,28 @@ +2005-04-01 Gary V. Vaughan + + 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. + 2005-04-01 Mike Stump * m4/libtool.m4 (LT_CMD_MAX_LEN) [ netbsd, freebsd, openbsd, diff --git a/Makefile.am b/Makefile.am index a405de745..5fd927b11 100644 --- a/Makefile.am +++ b/Makefile.am @@ -42,7 +42,6 @@ edit = sed \ -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 @@ $(top_srcdir)/tests/package.m4: $(top_srcdir)/configure.ac # 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 @@ install-data-local: -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 diff --git a/configure.ac b/configure.ac index dd19d1cf0..d2df8479a 100644 --- a/configure.ac +++ b/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 @@ APIVERSION=`echo "$VERSION" | sed -e 's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'` 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])]) diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 1e2991f58..54af8d265 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -40,7 +40,6 @@ m4_divert_push([SCRIPT])#! /bin/sh # -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 @@ seen_ltdl=false libtoolize_flags= # Locations for important files: +: ${pkgvdatadir="@pkgvdatadir@"} prefix=@prefix@ datadir=@datadir@ -pkgvdatadirs=@pkgvdatadir@ # ltmain.sh et. al. -pkgvltdldirs=@pkgvdatadir@/libltdl # libltdl source tree -pkgvmacrodirs=@pkgvmacrodir@ # libtool.m4 et. al. auxdir= m4dir= ltdldir= @@ -134,25 +131,6 @@ configure_ac=configure.in 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 @@ func_scan_files () 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_included_files () } -# 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_check () } -# 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_serial_update () } -# 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_ltmain_update () } -# 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 @@ func_massage_pkgvltdl_files () # 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_massage_pkgvltdl_files () 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."