]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libtoolize.m4sh (func_install_pkgconfig_files)
authorGary V. Vaughan <gary@gnu.org>
Sun, 27 Jan 2008 16:35:36 +0000 (16:35 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 27 Jan 2008 16:35:36 +0000 (16:35 +0000)
(func_install_pkgmacro_files, func_install_pkgltdl_files):
Factored out from the 'Main' section of the file.

ChangeLog
libtoolize.m4sh

index b51c83653b36e6e3cbe0eef1f8baabf0293a2368..4c0b07853b0f6ee3c69ae3d1bf91fc062980ddb9 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2008-01-27  Gary V. Vaughan  <gary@gnu.org>
 
+       * libtoolize.m4sh (func_install_pkgconfig_files)
+       (func_install_pkgmacro_files, func_install_pkgltdl_files):
+       Factored out from the 'Main' section of the file.
+
        * libtoolize.m4sh (subproject_auxdir, subproject_macrodir):
        New variables to hold the default locations for auxfiles
        and macrofiles in a subproject libltdl.
index 6078c12772bdef3923136db629ca218fe9ca1fd3..0f41c6432fa2b71fccc1d3c623efc2e4c7404774 100644 (file)
@@ -1075,6 +1075,117 @@ func_massage_pkgconfig_files ()
 }
 
 
+# func_install_pkgconfig_files
+# Install copies of the auxiliary files into this package.
+func_install_pkgconfig_files ()
+{
+    $opt_debug
+    func_massage_pkgconfig_files
+
+    # Unless we share CONFIG_AUX_DIR with the libltdl subproject, then
+    # if they are newer, copy all the installed utility files to the
+    # auxiliary directory if `--install' was passed, or else copy just
+    # ltmain.sh.
+    if test -n "$auxdir"; then
+      if test "$subproject_auxdir" != "$auxdir"; then
+        $opt_quiet || if test "$auxdir" != .; then
+          func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
+        fi
+        if $opt_install; then
+          func_config_update config.guess "$pkgdatadir/config" "$auxdir"
+          func_config_update config.sub   "$pkgdatadir/config" "$auxdir"
+          func_install_update install-sh  "$pkgdatadir/config" "$auxdir"
+        fi
+        func_ltmain_update ltmain.sh "$pkgdatadir/config" "$auxdir"
+      fi
+    else
+      func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool auxiliary files."
+    fi
+}
+
+
+# func_install_pkgmacro_files
+# Install copies of the libtool and libltdl m4 macros into this package.
+func_install_pkgmacro_files ()
+{
+    $opt_debug
+
+    # argz.m4, libtool.m4 and ltdl.m4 were handled specially below:
+    func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
+
+    # Copy libtool's m4 macros to the macro directory, if they are newer
+    # (keep these in alphabetical order to maintain sanity in testsuite):
+    if test -n "$macrodir"; then
+      $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$macrodir'."
+
+      if $opt_ltdl || $seen_ltdl; then
+        func_serial_update argz.m4 "$aclocaldir" "$macrodir" argz.m4
+      else
+        func_verbose "Not copying \`$macrodir/argz.m4', libltdl not used."
+      fi
+
+      func_serial_update  libtool.m4 "$aclocaldir" "$macrodir" \
+        LT_INIT 'A[CM]_PROG_LIBTOOL'
+
+      if $opt_ltdl || $seen_ltdl; then
+        func_serial_update ltdl.m4 "$aclocaldir" "$macrodir" 'LTDL_INIT'
+      else
+        func_verbose "Not copying \`$macrodir/ltdl.m4', libltdl not used."
+      fi
+
+      my_save_IFS="$IFS"
+      IFS=:
+      for file in $pkgmacro_files; do
+        IFS="$my_save_IFS"
+        func_serial_update $file "$aclocaldir" "$macrodir" "$file"
+      done
+      IFS="$my_save_IFS"
+    fi
+}
+
+
+# func_install_pkgltdl_files
+# Install copies of the libltdl files into this package.
+func_install_pkgltdl_files ()
+{
+    $opt_debug
+
+    # These files are handled specially, depending on ltdl_mode:
+    case $ltdl_mode in
+      *recursive)
+        glob_exclude_pkgltdl_files='Makefile.am|Makefile.in*|aclocal.m4|config*'
+        ;;
+      *)
+        glob_exclude_pkgltdl_files='Makefile.inc'
+        ;;
+    esac
+
+    func_massage_pkgltdl_files "$glob_exclude_pkgltdl_files"
+
+    # Copy all the files from installed libltdl to this project, if the
+    # user specified `--ltdl'.
+    if $seen_ltdl || $opt_ltdl; then
+
+      # Unless we share CONFIG_MACRO_DIR with our parent project,
+      # copy macros here.
+      if test "$subproject_macrodir" != "$macrodir"; then
+        func_copy_some_files "argz.m4:libtool.m4:ltdl.m4:$pkgmacro_files" \
+          "$aclocaldir" "$subproject_macrodir"
+      fi
+
+      func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"
+
+      # For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
+      case $ltdl_mode in
+        recursive)    func_fixup_Makefile "Makefile.am" "$pkgltdldir/libltdl" "$ltdldir" ;;
+        nonrecursive) func_fixup_Makefile "Makefile.inc" "$pkgltdldir/libltdl" "$ltdldir" ;;
+      esac
+
+      # Copy config aux files into libltdl.
+      func_copy_some_files "$pkgconfig_files" "$pkgdatadir" "$ltdldir"
+    fi
+}
+
 # func_nonemptydir_p dirvar
 # DIRVAR is the name of a variable to evaluate.  Unless DIRVAR names
 # a directory that exists and is non-empty abort with a diagnostic.
@@ -1120,93 +1231,9 @@ func_nonemptydir_p ()
   subproject_auxdir=${ltdlprefix}config
   subproject_macrodir=${ltdlprefix}m4
 
-  # Unless we share CONFIG_AUX_DIR with the libltdl subproject, then
-  # if they are newer, copy all the installed utility files to the
-  # auxiliary directory if `--install' was passed, or else copy just
-  # ltmain.sh.
-  if test -n "$auxdir"; then
-    if test "$subproject_auxdir" != "$auxdir"; then
-      $opt_quiet || if test "$auxdir" != .; then
-        func_echo "putting files in AC_CONFIG_AUX_DIR, \`$auxdir'."
-      fi
-      if $opt_install; then
-        func_config_update config.guess "$pkgdatadir/config" "$auxdir"
-        func_config_update config.sub   "$pkgdatadir/config" "$auxdir"
-        func_install_update install-sh  "$pkgdatadir/config" "$auxdir"
-      fi
-      func_ltmain_update ltmain.sh "$pkgdatadir/config" "$auxdir"
-    fi
-  else
-    func_verbose "AC_CONFIG_AUX_DIR not defined, not copying libtool auxiliary files."
-  fi
-
-  # argz.m4, libtool.m4 and ltdl.m4 were handled specially above
-  func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
-
-  # Copy libtool's m4 macros to the macro directory, if they are newer
-  # (keep these in alphabetical order to maintain sanity in testsuite):
-  if test -n "$macrodir"; then
-    $opt_quiet || func_echo "putting macros in AC_CONFIG_MACRO_DIR, \`$macrodir'."
-
-    if $opt_ltdl || $seen_ltdl; then
-      func_serial_update argz.m4 "$aclocaldir" "$macrodir" argz.m4
-    else
-      func_verbose "Not copying \`$macrodir/argz.m4', libltdl not used."
-    fi
-
-    func_serial_update  libtool.m4 "$aclocaldir" "$macrodir" \
-      LT_INIT 'A[CM]_PROG_LIBTOOL'
-
-    if $opt_ltdl || $seen_ltdl; then
-      func_serial_update ltdl.m4 "$aclocaldir" "$macrodir" 'LTDL_INIT'
-    else
-      func_verbose "Not copying \`$macrodir/ltdl.m4', libltdl not used."
-    fi
-
-    my_save_IFS="$IFS"
-    IFS=:
-    for file in $pkgmacro_files; do
-      IFS="$my_save_IFS"
-      func_serial_update $file "$aclocaldir" "$macrodir" "$file"
-    done
-    IFS="$my_save_IFS"
-  fi
-
-  # These files are handled specially, depending on ltdl_mode:
-  case $ltdl_mode in
-    *recursive)
-      glob_exclude_pkgltdl_files='Makefile.am|Makefile.in*|aclocal.m4|config*'
-      ;;
-    *)
-      glob_exclude_pkgltdl_files='Makefile.inc'
-      ;;
-  esac
-
-  func_massage_pkgltdl_files "$glob_exclude_pkgltdl_files"
-  func_massage_pkgconfig_files
-
-  # Copy all the files from installed libltdl to this project, if the
-  # user specified `--ltdl'.
-  if $seen_ltdl || $opt_ltdl; then
-
-    # Unless we share CONFIG_MACRO_DIR with our parent project,
-    # copy macros here.
-    if test "$subproject_macrodir" != "$macrodir"; then
-      func_copy_some_files "argz.m4:libtool.m4:ltdl.m4:$pkgmacro_files" \
-        "$aclocaldir" "$subproject_macrodir"
-    fi
-
-    func_copy_some_files "$pkgltdl_files" "$pkgltdldir/libltdl" "$ltdldir"
-
-    # For recursive ltdl modes, copy a suitable Makefile.{am,inc}:
-    case $ltdl_mode in
-      recursive)    func_fixup_Makefile "Makefile.am" "$pkgltdldir/libltdl" "$ltdldir" ;;
-      nonrecursive) func_fixup_Makefile "Makefile.inc" "$pkgltdldir/libltdl" "$ltdldir" ;;
-    esac
-
-    # Copy config aux files into libltdl.
-    func_copy_some_files "$pkgconfig_files" "$pkgdatadir" "$ltdldir"
-  fi
+  func_install_pkgconfig_files
+  func_install_pkgmacro_files
+  func_install_pkgltdl_files
 
   $opt_quiet || func_check_macros
 }