From: Gary V. Vaughan Date: Sun, 27 Jan 2008 16:35:36 +0000 (+0000) Subject: * libtoolize.m4sh (func_install_pkgconfig_files) X-Git-Tag: release-2-1b~10 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ade9259489e7216fd0b1fc1fcb67c6f9621c990;p=thirdparty%2Flibtool.git * libtoolize.m4sh (func_install_pkgconfig_files) (func_install_pkgmacro_files, func_install_pkgltdl_files): Factored out from the 'Main' section of the file. --- diff --git a/ChangeLog b/ChangeLog index b51c83653..4c0b07853 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2008-01-27 Gary V. Vaughan + * 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. diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 6078c1277..0f41c6432 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -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 }