]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
libtoolize: massage installed auxiliary script list at make time.
authorGary V. Vaughan <gary@gnu.org>
Fri, 28 Oct 2011 13:45:56 +0000 (20:45 +0700)
committerGary V. Vaughan <gary@gnu.org>
Tue, 8 Nov 2011 14:34:13 +0000 (21:34 +0700)
* Makefile.am (configure_edit): Rename pkgconfig_files
substitution to pkgaux_files, and add pkgaux_install_files and
pkgaux_parent_files substitutions for atlocal.
(pkgauxdir): Where to install pkgaux_files.
(auxfiles): Removed, and replaced by...
(pkgaux_parent_files, pkgaux_install_files, pkgaux_data_files):
...these, which separate the files lists more logically for
easier installation, and use by libtoolize.m4sh.
(uninstall-hook): Adjust.
(tests/atlocal): Adjust.
* bootstrap.conf (libtool_link_libltdl_subdirs): Adjust.
* libtoolize.m4sh (func_install_pkgconfig_files)
(func_install_pkgconfig_subproject)
(func_install_pkgconfig_parent, func_install_pkgconfig_files)
(all_pkgconfig_files): Renamed to...
(func_install_pkgaux_files, unc_install_pkgaux_subproject)
(func_install_pkgaux_parent, func_install_pkgaux_files)
(all_pkgaux_files): ...these, resp. Adjust all callers.
(func_massage_pkgconfig_files): Removed.
(pkgaux_files): List of all auxiliary scripts substituted from
Makefile.

Signed-off-by: Gary V. Vaughan <gary@gnu.org>
Makefile.am
configure.ac
libtoolize.m4sh

index 749df98bdc26022bb06e1db712c579437fb22c8c..a74d854cf2e8a65789122871c19492b549de4a2a 100644 (file)
@@ -282,7 +282,9 @@ configure_edit = $(SED) \
        -e 's,@host_triplet\@,$(host_triplet),g' \
        -e 's,@LN_S\@,$(LN_S),g' \
        -e 's,@macro_dir\@,$(macro_dir),g' \
-       -e "s,@pkgconfig_files\@,$(auxfiles),g" \
+       -e 's,@pkgaux_files\@,$(pkgaux_scripts) $(pkgaux_data_files),g' \
+       -e 's,@pkgaux_install_files\@,$(pkgaux_install_files),g' \
+       -e 's,@pkgaux_parent_files\@,$(pkgaux_parent_files),g' \
        -e 's,@pkgdatadir\@,$(pkgdatadir),g' \
        -e 's,@pkgltdl_files\@,$(pkgltdl_files),g' \
        -e 's,@pkgmacro_files\@,$(pkgmacro_files),g' \
@@ -438,10 +440,13 @@ $(libtoolize_1): $(libtoolize_in)
 ## ------------- ##
 
 ltdldir                = $(srcdir)/libltdl
+pkgauxdir      = $(pkgdatadir)/build-aux
 
 # The timestamps on these files must be preserved carefully so we install,
 # uninstall and set executable with custom rules here.
-auxfiles       = $(pkgaux_scripts) config/ltmain.sh
+pkgaux_parent_files    = ltmain.sh
+pkgaux_install_files   = config.guess config.sub install-sh
+pkgaux_data_files      = $(pkgaux_parent_files)
 
 # Everything that gets picked up by aclocal is automatically distributed,
 # this is the list of macro files we install on the user's system.
@@ -578,7 +583,8 @@ dist-hook: $(changelog) $(dotversion) $(readme)
 
 uninstall-hook:
        @$(NORMAL_UNINSTALL)
-       @list='$(pkgltdl_files) $(auxfiles)'; for f in $$list; do \
+       @list='$(pkgltdl_files) $(pkgaux_scripts) $(pkgaux_data_files)'; \
+       for f in $$list; do \
          echo " rm -f '$(DESTDIR)$(pkgdatadir)/$$f'"; \
          rm -f "$(DESTDIR)$(pkgdatadir)/$$f"; \
        done
index 097361b36ccfc62681a5adb3b5ae02dc7d83dc58..d6906d1b5bf59915d5e26c7db024a79401d68336 100644 (file)
@@ -121,8 +121,7 @@ fi
 # The list of scripts required to build libltdl, and which need to be
 # installed by libtoolize --ltdl, and consequently need to be placed in
 # $pkgdatadir by our make install rule.
-pkgaux_scripts="config/compile config/config.guess config/config.sub \
- config/depcomp config/install-sh config/missing"
+pkgaux_scripts="compile config.guess config.sub depcomp install-sh missing"
 AC_SUBST([pkgaux_scripts])
 
 # All subdirectories that are configured on demand, but that must be
index 85600e7cdaed6f61141531403d861a2cd5a63109..9299a8cbb370943f16ec9e37488b5af89a8cb71c 100644 (file)
@@ -882,7 +882,7 @@ func_install_pkgmacro_files ()
 # func_install_pkgltdl_files
 # Install copies of the libltdl files into this package.  Any auxiliary
 # or m4 macro files needed in the libltdl tree will also be copied by
-# func_install_pkgconfig_files and func_install_pkgmacro_files resp.
+# func_install_pkgaux_files and func_install_pkgmacro_files resp.
 func_install_pkgltdl_files ()
 {
     $debug_cmd
@@ -933,40 +933,10 @@ func_install_pkgltdl_files ()
 }
 
 
-# func_massage_pkgconfig_files [glob_exclude]
-# @pkgconfig_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_pkgconfig_files ()
-{
-    $debug_cmd
-
-    pkgconfig_files=   # GLOBAL VAR
-
-    my_glob_exclude="$1"
-
-    # Massage a value for pkgconfig_files from the value used in Makefile.am
-    for my_filename in @pkgconfig_files@; do
-
-      # ignore excluded filenames
-      if test -n "$my_glob_exclude"; then
-       my_cont=false
-       eval 'case $my_filename in '$my_glob_exclude') my_cont=: ;; esac'
-       $my_cont && continue
-      fi
-
-      # ignore duplicates
-      case " "$pkgconfig_files" " in
-        *" $my_filename "*) ;;
-       *) pkgconfig_files="${pkgconfig_files+$pkgconfig_files }$my_filename" ;;
-      esac
-    done
-}
-
-
-# func_install_pkgconfig_subproject
-# Unless --quiet was passed, display a message. Then copy pkgconfig_files
+# func_install_pkgaux_subproject
+# Unless --quiet was passed, display a message. Then copy pkgaux_files
 # from libtool installation tree to subproject libltdl tree.
-func_install_pkgconfig_subproject ()
+func_install_pkgaux_subproject ()
 {
     $debug_cmd
 
@@ -976,7 +946,7 @@ func_install_pkgconfig_subproject ()
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
-    $opt_force && for file in $all_pkgconfig_files; do
+    $opt_force && for file in $all_pkgaux_files; do
       test -f "$subproject_aux_dir/$file" && func_verbose "rm -f '$subproject_aux_dir/$file'"
       rm -f "$subproject_aux_dir/$file"
     done
@@ -984,23 +954,23 @@ func_install_pkgconfig_subproject ()
     # Copy all the files from installed libltdl to this project, if the
     # user specified an aux_dir.
     $opt_quiet || if test "x$ac_aux_dir" = "x$subproject_aux_dir"; then
-      pkgconfig_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$subproject_aux_dir'."
+      pkgaux_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$subproject_aux_dir'."
     elif test -n "$ac_aux_dir"; then
-      pkgconfig_header="putting auxiliary files in \`$aux_dir'."
+      pkgaux_header="putting auxiliary files in \`$aux_dir'."
     else
-      pkgconfig_header="putting auxiliary files in \`$subproject_aux_dir'."
+      pkgaux_header="putting auxiliary files in \`$subproject_aux_dir'."
     fi
 
-    func_copy_some_files "$pkgconfig_files" \
-      "$pkgdatadir" "$ltdl_dir" pkgconfig_header
+    func_copy_some_files "$pkgaux_files" \
+      "$pkgdatadir/config" "$ltdl_dir/config" pkgaux_header
 }
 
 
-# func_install_pkgconfig_parent
+# func_install_pkgaux_parent
 # Unless --quiet was passed, or AC_CONFIG_AUX_DIR was not seen, display a
 # message.  Then update appropriate auxiliary files if newer ones are
 # available from the libtool installation tree.
-func_install_pkgconfig_parent ()
+func_install_pkgaux_parent ()
 {
     $debug_cmd
 
@@ -1009,35 +979,35 @@ func_install_pkgconfig_parent ()
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
-    $opt_force && for file in $all_pkgconfig_files; do
+    $opt_force && for file in $all_pkgaux_files; do
       test -f "$aux_dir/$file" && func_verbose "rm -f '$aux_dir/$file'"
       rm -f "$aux_dir/$file"
     done
 
     if test -n "$ac_aux_dir"; then
-      pkgconfig_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$ac_aux_dir'."
+      pkgaux_header="putting auxiliary files in AC_CONFIG_AUX_DIR, \`$ac_aux_dir'."
     else
-      pkgconfig_header="putting auxiliary files in \`$aux_dir'."
+      pkgaux_header="putting auxiliary files in \`$aux_dir'."
     fi
 
     if $opt_install; then
       func_config_update config.guess \
-        "$pkgdatadir/config" "$aux_dir" pkgconfig_header
+        "$pkgdatadir/config" "$aux_dir" pkgaux_header
       func_config_update config.sub \
-        "$pkgdatadir/config" "$aux_dir" pkgconfig_header
+        "$pkgdatadir/config" "$aux_dir" pkgaux_header
       func_install_update install-sh \
-        "$pkgdatadir/config" "$aux_dir" pkgconfig_header
+        "$pkgdatadir/config" "$aux_dir" pkgaux_header
     fi
     func_ltmain_update ltmain.sh \
-      "$pkgdatadir/config" "$aux_dir" pkgconfig_header
+      "$pkgdatadir/config" "$aux_dir" pkgaux_header
 }
 
 
-# func_install_pkgconfig_files
+# func_install_pkgaux_files
 # Install copies of the auxiliary files into this package according to
 # the whether libltdl is included as a subproject, and whether the parent
 # shares the AC_CONFIG_AUX_DIR setting.
-func_install_pkgconfig_files ()
+func_install_pkgaux_files ()
 {
     $debug_cmd
 
@@ -1045,26 +1015,24 @@ func_install_pkgconfig_files ()
     $require_configure_ac
     $require_ltdl_mode
 
-    func_massage_pkgconfig_files
-
   # 1. Parent shares aux_dir with subproject ltdl:
     if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" &&
        test "x$aux_dir" = "x$subproject_aux_dir"
     then
-      func_install_pkgconfig_subproject
+      func_install_pkgaux_subproject
 
   # 2. Parent has separate aux_dir to subproject ltdl:
     elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject"
        # && test "x$aux_dir" != "x$subproject_aux_dir" is implied
     then
       if test -n "$configure_ac"; then
-       func_install_pkgconfig_parent
+       func_install_pkgaux_parent
       fi
-      func_install_pkgconfig_subproject
+      func_install_pkgaux_subproject
 
   # 3. Not subproject, but AC_CONFIG_AUX_DIR was used in parent:
     elif test -n "$ac_aux_dir" || test "x$aux_dir" = "x."; then
-      func_install_pkgconfig_parent
+      func_install_pkgaux_parent
 
   # 4. AC_CONFIG_AUX_DIR was not specified:
     else
@@ -1629,13 +1597,14 @@ func_require_seen_libtool ()
   # ensure a clean upgrade.
   # Do not remove config.guess nor config.sub, we don't install them
   # without --install, and the project may not be using Automake.
-  all_pkgconfig_files="ltmain.sh"
+  all_pkgaux_files="compile install-sh depcomp missing ltmain.sh snippet/_Noreturn.h snippet/arg-nonnull.h snippet/c++defs.h snippet/warn-on-use.h"
   all_pkgmacro_files="argz.m4 libtool.m4 ltdl.m4 ltoptions.m4 ltsugar.m4 ltversion.in ltversion.m4 lt~obsolete.m4"
   all_pkgltdl_files="COPYING.LIB Makefile Makefile.in Makefile.inc Makefile.am README acinclude.m4 aclocal.m4 argz_.h argz.c config.h.in config-h.in configure configure.ac configure.in libltdl/lt__alloc.h libltdl/lt__dirent.h libltdl/lt__glibc.h libltdl/lt__private.h libltdl/lt__strl.h libltdl/lt_dlloader.h libltdl/lt_error.h libltdl/lt_system.h libltdl/slist.h loaders/dld_link.c loaders/dlopen.c loaders/dyld.c loaders/load_add_on.c loaders/loadlibrary.c loaders/preopen.c loaders/shl_load.c lt__alloc.c lt__dirent.c lt__strl.c lt_dlloader.c lt_error.c ltdl.c ltdl.h slist.c"
 
   # Files installed by func_install_*, some files are missing from these
   # lists deliberately because their respective func_install has to handle
   # the missing filenames specially.
+  pkgaux_files="@pkgaux_files@"
   pkgltdl_files="@pkgltdl_files@"
   pkgmacro_files="@pkgmacro_files@"
 
@@ -1688,7 +1657,7 @@ func_require_seen_libtool ()
   $require_seen_ltdl
   $seen_ltdl && opt_ltdl=:
 
-  func_install_pkgconfig_files
+  func_install_pkgaux_files
   func_install_pkgmacro_files
   func_install_pkgltdl_files