libtool-patches
[Top][All Lists]
Advanced

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

[PATCH 10/10] bootstrap: remove support for `-r' and `reconf_dirs'.


From: Gary V. Vaughan
Subject: [PATCH 10/10] bootstrap: remove support for `-r' and `reconf_dirs'.
Date: Fri, 25 Nov 2011 16:11:01 +0700

With all those extra demo directories out of the way, we can
revert to a more canonical bootstrap process, and jettison the
cruft that was only there to work around the pain of
needing to autoreconf 11 directories.  Bootstrap is now an order
of magnitude faster.
* bootstrap.conf (require_ltdl_dir): New function. Factored out
of `libtool_build_prerequisites'.
(libtool_build_prerequisites): Adjust.
(func_reconfigure): Use `require_ltdl_dir' to determine the name
of the other directory we need to autoreconf during bootstrap.
(libtool_options_prep, libtool_parse_options)
(libtool_validate_options): Remove.

Signed-off-by: Gary V. Vaughan <address@hidden>
---
 bootstrap.conf |  175 +++++++++++++-------------------------------------------
 1 files changed, 41 insertions(+), 134 deletions(-)

diff --git a/bootstrap.conf b/bootstrap.conf
index f7bc1ac..8763a33 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -1,4 +1,4 @@
-# bootstrap.conf (GNU Libtool) version 2011-11-21
+# bootstrap.conf (GNU Libtool) version 2011-11-24
 #
 # Copyright (C) 2010, 2011 Free Software Foundation, Inc.
 # Written by Gary V. Vaughan, 2010
@@ -109,15 +109,16 @@ require_bootstrap_uptodate=:
 
 # func_reconfigure
 # ------------------
-# In addition to needing to autoreconf several directories, Libtool
-# provides `libtoolize' and doesn't use `autopoint', so we can use a
-# somewhat simpler `func_reconfigure' implementation.
+# In addition to needing to autoreconf two directories, Libtool provides
+# `libtoolize' and doesn't use `autopoint', so we can use a somewhat
+# simpler `func_reconfigure' implementation than bootstrap's version.
 func_reconfigure ()
 {
     $debug_cmd
 
     $require_autoheader
     $require_build_aux
+    $require_ltdl_dir
     $require_macro_dir
 
     # Only need this from the top level directory
@@ -126,127 +127,19 @@ func_reconfigure ()
     export LIBTOOLIZE
     func_verbose "export LIBTOOLIZE='$LIBTOOLIZE'"
 
-    # Also bootstrap any additional directories that were specified with
-    # `reconfdirs' in the environment.
-    save_IFS=$IFS
-    IFS=,
-    for sub in $opt_reconf_dirs; do
-      IFS=$save_IFS
-      my_autoreconf_options=
-      $opt_copy || func_append my_autoreconf_options " --symlink"
-      $opt_force && func_append my_autoreconf_options " --force"
-      $opt_verbose && func_append my_autoreconf_options " --verbose"
-      func_show_eval "$AUTORECONF$my_autoreconf_options --install $sub" \
-        'exit $?'
-    done
-    IFS=$save_IFS
-}
-
-
-
-## --------------- ##
-## Hook functions. ##
-## --------------- ##
-
-# `bootstrap' itself takes care of the arguments it recognises, so we only
-# have to handle additional options here.  Setting exit_cmd to anything
-# other than `:', will tell `bootstrap' to exit after printing it's own
-# option loop parser errors.  Best not to use any time-consuming $require_
-# functions here, otherwise they will be run even if we only need to
-# process `--version'.
-
-# libtool_options_prep [ARG...]
-# -----------------------------
-# Preparation for supporting additional options in Libtool bootstrap,
-# before the option parsing loop.
-libtool_options_prep ()
-{
-    $debug_cmd
-
-    # Extend the existing usage message
-    usage_message=$usage_message'
-Libtool Specific Options:
-  -r, --reconf-dirs=DIR1,DIR2,...
-                          limit the directories to be bootstrapped to
-                          the comma-delimited list of DIR1,DIR2,...
-'
-
-    # autoreconf all directories by default
-    test -n "$reconfdirs" \
-      || reconfdirs=". libltdl `ls -1d tests/*demo tests/*demo[0-9]`"
-
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_options_prep_result=$func_quote_for_eval_result
-}
-func_add_hook func_options_prep libtool_options_prep
+    my_autoreconf_options=
+    $opt_copy || func_append my_autoreconf_options " --symlink"
+    $opt_force && func_append my_autoreconf_options " --force"
+    $opt_verbose && func_append my_autoreconf_options " --verbose"
 
+    func_show_eval "$AUTORECONF$my_autoreconf_options --install ." \
+      'exit $?'
 
-# libtool_parse_options [ARG...]
-# ------------------------------
-# Provide handling for additional Libtool options inside the main option
-# parsing loop.
-libtool_parse_options ()
-{
-    $debug_cmd
-
-    # this inner loop lets us handle `-r.' in a single iteration
-    while test $# -gt 0; do
-      opt=$1
-      shift
-
-      case $opt in
-        --reconf-dirs|--reconfdirs|-r)
-              test $# = 0 && func_missing_arg $opt && break
-              # squash spaces so that delimiter is just `,' and nothing else
-              opt_reconf_dirs=`echo "$1" |$SED 's|,  *|,|g'`
-              shift
-              ;;
-
-        # Separate arguments to short options:
-        -r*)  func_split_short_opt "$opt"
-              set dummy "$func_split_short_opt_name" 
"$func_split_short_opt_arg" ${1+"$@"}
-              shift
-              ;;
-
-        *)    set dummy "$opt" ${1+"$@"}; shift; break ;;
-      esac
-    done
-
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_parse_options_result=$func_quote_for_eval_result
+    # Also bootstrap libltdl ready for installation.
+    func_show_eval "$AUTORECONF$my_autoreconf_options --install $ltdl_dir" \
+      'exit $?'
 }
-func_add_hook func_parse_options libtool_parse_options
-
-
-# libtool_validate_options [ARG...]
-# ---------------------------------
-# Validation of additional Libtool bootstrap options, after the main option
-# parsing loop.
-libtool_validate_options ()
-{
-    # support the old interface too: `reconfdirs='. libltdl' ./bootstrap'
-    test -n "$opt_reconf_dirs" \
-      || opt_reconf_dirs=`echo $reconfdirs |$SED 's|  *|,|g'`
-
-    # validate $opt_reconf_dirs
-    save_IFS=$IFS
-    IFS=,
-    for reconfdir in $opt_reconf_dirs; do
-      IFS=$save_IFS
-      test -d "$reconfdir" || {
-        func_error "bad reconf directory \`$reconfdir': directory does not 
exist"
-        exit_cmd=exit
-      }
-    done
-    IFS=$save_IFS
 
-    # pass back the list of options we consumed
-    func_quote_for_eval ${1+"$@"}
-    libtool_validate_options_result=$func_quote_for_eval_result
-}
-func_add_hook func_validate_options libtool_validate_options
 
 
 ## ---------------------------- ##
@@ -293,6 +186,7 @@ libtool_build_prerequisites ()
     $debug_cmd
 
     $require_build_aux
+    $require_ltdl_dir
     $require_macro_dir
     $require_package
     $require_package_bugreport
@@ -300,19 +194,6 @@ libtool_build_prerequisites ()
     $require_package_url
     $require_package_version
 
-    func_extract_trace LT_CONFIG_LTDL_DIR
-
-    save_ifs=$IFS
-    IFS=:
-    set dummy $func_extract_trace_result
-    IFS=$save_ifs
-    shift
-
-    ltdl_dir=$1
-    func_check_configuration ltdl_dir \
-        "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
-    func_verbose "ltdl_dir='$ltdl_dir'"
-
     # Whip up a dirty Makefile:
     makes='Makefile.am libltdl/ltdl.mk'
     rm -f Makefile
@@ -435,6 +316,32 @@ func_add_hook func_fini libtool_cleanup_empty_dirs
 ## Resource management. ##
 ## -------------------- ##
 
+# require_ltdl_dir
+# ----------------
+# Extract libtool's ltdl directory from configure.ac.
+require_ltdl_dir=func_require_ltdl_dir
+func_require_ltdl_dir ()
+{
+    $require_configure_ac
+
+    func_extract_trace LT_CONFIG_LTDL_DIR
+
+    save_ifs=$IFS
+    IFS=:
+    set dummy $func_extract_trace_result
+    IFS=$save_ifs
+    shift
+
+    ltdl_dir=$1
+    func_check_configuration ltdl_dir \
+        "LT_CONFIG_LTDL_DIR([name of your libltdl directory])"
+
+    func_verbose "ltdl_dir='$ltdl_dir'"
+
+    require_ltdl_dir=:
+}
+
+
 # require_package_url
 # -------------------
 # Ensure that package_url has a sensible default.
-- 
1.7.7.4

Cheers,
-- 
Gary V. Vaughan (gary AT gnu DOT org)



reply via email to

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