+2005-04-01 Gary V. Vaughan <gary@gnu.org>
+
+ 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 <mrs@apple.com>
* m4/libtool.m4 (LT_CMD_MAX_LEN) [ netbsd, freebsd, openbsd,
-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"
# 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
-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
# -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
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=
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
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
}
-# 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.
}
-# 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"`
}
-# 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=:
}
-# 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=:
# 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 ) \
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."