From: Gary V. Vaughan Date: Fri, 24 Sep 2010 14:12:18 +0000 (+0700) Subject: maint: use macro_dir consistently in all files. X-Git-Tag: v2.4.2.418~329 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e1398280b6c54b4d5cb7f9c2a98483264379710d;p=thirdparty%2Flibtool.git maint: use macro_dir consistently in all files. * Makefile.am: Replace all uses of m4dir with macrodir to match AC_CONFIG_MACRO_DIR. * libltdl/config/libtoolize.m4sh: Replace all uses of macrodir with macro_dir. * tests/defs.m4sh, tests/sh.test: Likewise. Signed-off-by: Gary V. Vaughan --- diff --git a/ChangeLog b/ChangeLog index d53ace579..3f32b0d3e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -7,6 +7,13 @@ 2010-09-23 Gary V. Vaughan + maint: use macro_dir consistently in all files. + * Makefile.am: Replace all uses of m4dir with macrodir to + match AC_CONFIG_MACRO_DIR. + * libltdl/config/libtoolize.m4sh: Replace all uses of macrodir + with macro_dir. + * tests/defs.m4sh, tests/sh.test: Likewise. + maint: use aux_dir consistently in all files. * Makefile.am, Makefile.maint: Replace all uses of auxdir with aux_dir to match AC_CONFIG_AUX_DIR. diff --git a/Makefile.am b/Makefile.am index 4e757d938..a0135edf9 100644 --- a/Makefile.am +++ b/Makefile.am @@ -44,7 +44,7 @@ lib_LTLIBRARIES = EXTRA_LTLIBRARIES = aux_dir = libltdl/config -m4dir = libltdl/m4 +macro_dir = libltdl/m4 LT_M4SH = $(M4SH) -B '$(srcdir)/$(aux_dir)' @@ -86,8 +86,8 @@ libtoolize_in = $(srcdir)/libtoolize.in libtoolize_m4sh = $(srcdir)/libtoolize.m4sh ltmain_m4sh = $(srcdir)/$(aux_dir)/ltmain.m4sh ltmain_sh = $(srcdir)/$(aux_dir)/ltmain.sh -ltversion_in = $(srcdir)/$(m4dir)/ltversion.in -ltversion_m4 = $(srcdir)/$(m4dir)/ltversion.m4 +ltversion_in = $(srcdir)/$(macro_dir)/ltversion.in +ltversion_m4 = $(srcdir)/$(macro_dir)/ltversion.m4 EXTRA_DIST += $(libtoolize_in) $(libtoolize_m4sh) $(ltmain_m4sh) \ $(ltmain_sh) $(ltversion_in) $(ltversion_m4) @@ -311,7 +311,7 @@ lt_config_h_in = $(srcdir)/libltdl/config-h.in lt_configure = $(srcdir)/libltdl/configure stamp_mk = $(srcdir)/libltdl/stamp-mk -lt_obsolete_m4 = $(srcdir)/$(m4dir)/lt~obsolete.m4 +lt_obsolete_m4 = $(srcdir)/$(macro_dir)/lt~obsolete.m4 EXTRA_DIST += $(stamp_mk) $(lt_obsolete_m4) @@ -329,11 +329,11 @@ $(stamp_mk): $(lt_Makefile_in) lt_aclocal_m4_deps = \ $(lt_obsolete_m4) \ $(ltversion_m4) \ - $(m4dir)/libtool.m4 \ - $(m4dir)/ltoptions.m4 \ - $(m4dir)/ltdl.m4 \ - $(m4dir)/ltsugar.m4 \ - $(m4dir)/argz.m4 \ + $(macro_dir)/libtool.m4 \ + $(macro_dir)/ltoptions.m4 \ + $(macro_dir)/ltdl.m4 \ + $(macro_dir)/ltsugar.m4 \ + $(macro_dir)/argz.m4 \ $(srcdir)/libltdl/configure.ac lt_configure_deps = $(lt_aclocal_m4) $(lt_aclocal_m4_deps) @@ -431,8 +431,8 @@ install-data-local: $(lt_Makefile_in) $(mkinstalldirs) $(DESTDIR)$(aclocaldir) @list='$(aclocalfiles)'; for p in $$list; do \ f=`echo "$$p" |'$(SED') 's|^.*/||'`; \ - echo " $(INSTALL_DATA) '$(srcdir)/$(m4dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \ - $(INSTALL_DATA) "$(srcdir)/$(m4dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \ + echo " $(INSTALL_DATA) '$(srcdir)/$(macro_dir)/$$f' '$(DESTDIR)$(aclocaldir)/$$f'"; \ + $(INSTALL_DATA) "$(srcdir)/$(macro_dir)/$$f" "$(DESTDIR)$(aclocaldir)/$$f"; \ done ## install the helper scripts $(mkinstalldirs) '$(DESTDIR)$(pkgdatadir)' diff --git a/bootstrap b/bootstrap index 753fc50be..ed630f903 100755 --- a/bootstrap +++ b/bootstrap @@ -64,14 +64,14 @@ test -f ./configure.ac || { } -# Extract aux_dir and m4dir from configure.ac: +# Extract aux_dir and macro_dir from configure.ac: lt_tab=' ' my_sed_traces='s,#.*$,,; s,^dnl .*$,,; s, dnl .*$,,; /AC_CONFIG_AUX_DIR[^_]/ { s,^.*AC_CONFIG_AUX_DIR([[ '"$lt_tab"']*\([^])]*\).*$,aux_dir=\1,; p; }; /AC_CONFIG_MACRO_DIR/ { - s,^.*AC_CONFIG_MACRO_DIR([[ '"$lt_tab"']*\([^])]*\).*$,m4dir=\1,; p; + s,^.*AC_CONFIG_MACRO_DIR([[ '"$lt_tab"']*\([^])]*\).*$,macro_dir=\1,; p; }; d;' eval `cat configure.ac 2>/dev/null | $SED "$my_sed_traces"` diff --git a/libtoolize.m4sh b/libtoolize.m4sh index 50acbb412..69fd37f39 100644 --- a/libtoolize.m4sh +++ b/libtoolize.m4sh @@ -410,7 +410,7 @@ func_scan_files () p } /AC_CONFIG_MACRO_DIR(/ { - s,^.*AC_CONFIG_MACRO_DIR([[ ]*\([^])]*\).*$,ac_macrodir=\1, + s,^.*AC_CONFIG_MACRO_DIR([[ ]*\([^])]*\).*$,ac_macro_dir=\1, p } /_LT_CONFIG_LTDL_DIR(/d @@ -562,30 +562,30 @@ func_scan_files () } d' if test -f Makefile.am; then - my_macrodir_is_next=false + my_macro_dir_is_next=false for arg in `$SED "$my_sed_aclocal_flags" Makefile.am`; do - if $my_macrodir_is_next; then - am_macrodir="$arg" + if $my_macro_dir_is_next; then + am_macro_dir="$arg" break else case $arg in - -I) my_macrodir_is_next=: ;; + -I) my_macro_dir_is_next=: ;; -I*) - am_macrodir=`$ECHO "$arg" | sed 's,^-I,,'` + am_macro_dir=`$ECHO "$arg" | sed 's,^-I,,'` break ;; - *) my_macrodir_is_next=false ;; + *) my_macro_dir_is_next=false ;; esac fi done fi - macrodir="$ac_macrodir" - test -z "$macrodir" && macrodir="$am_macrodir" + macro_dir="$ac_macro_dir" + test -z "$macro_dir" && macro_dir="$am_macro_dir" - if test -n "$am_macrodir" && test -n "$ac_macrodir"; then - test "$am_macrodir" = "$ac_macrodir" \ - || func_fatal_error "AC_CONFIG_MACRO_DIR([$ac_macrodir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macrodir." + if test -n "$am_macro_dir" && test -n "$ac_macro_dir"; then + test "$am_macro_dir" = "$ac_macro_dir" \ + || func_fatal_error "AC_CONFIG_MACRO_DIR([$ac_macro_dir]) conflicts with ACLOCAL_AMFLAGS=-I $am_macro_dir." fi } @@ -728,7 +728,7 @@ func_serial_update_check () if test "X$my_dest_serial" = "X$func_serial_max_result"; then func_verbose "\`$my_srcfile' is serial $my_src_serial, less than $my_dest_serial in \`$my_destfile'" - $opt_force || if test -n "$ac_macrodir$ac_ltdldir"; then + $opt_force || if test -n "$ac_macro_dir$ac_ltdldir"; then func_error "\`$my_destfile' is newer: use \`--force' to overwrite" fi fi @@ -1000,20 +1000,20 @@ func_install_pkgmacro_subproject () # Remove any lingering files that my have been installed by some # previous libtoolize release: $opt_force && for file in $all_pkgmacro_files; do - test -f "$subproject_macrodir/$file" && func_verbose "rm -f '$subproject_macrodir/$file'" - rm -f "$subproject_macrodir/$file" + test -f "$subproject_macro_dir/$file" && func_verbose "rm -f '$subproject_macro_dir/$file'" + rm -f "$subproject_macro_dir/$file" done # Copy all the files from installed libltdl to this project, if the - # user specified a macrodir. - $opt_quiet || if test "x$macrodir" != "x$subproject_macrodir"; then - pkgmacro_header="putting macros in \`$subproject_macrodir'." - elif test -n "$subproject_macrodir"; then - pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$subproject_macrodir'." + # user specified a macro_dir. + $opt_quiet || if test "x$macro_dir" != "x$subproject_macro_dir"; then + pkgmacro_header="putting macros in \`$subproject_macro_dir'." + elif test -n "$subproject_macro_dir"; then + pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$subproject_macro_dir'." fi func_copy_some_files "argz.m4:libtool.m4:ltdl.m4:$pkgmacro_files" \ - "$aclocaldir" "$subproject_macrodir" pkgmacro_header + "$aclocaldir" "$subproject_macro_dir" pkgmacro_header } @@ -1028,40 +1028,40 @@ func_install_pkgmacro_parent () # Remove any lingering files that my have been installed by some # previous libtoolize release: $opt_force && for file in $all_pkgmacro_files; do - test -f "$macrodir/$file" && func_verbose "rm -f '$macrodir/$file'" - rm -f "$macrodir/$file" + test -f "$macro_dir/$file" && func_verbose "rm -f '$macro_dir/$file'" + rm -f "$macro_dir/$file" done # Copy all the files from installed libltdl to this project, if the - # user specified a macrodir. - $opt_quiet || if test -n "$ac_macrodir"; then - my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$ac_macrodir'." - elif test -n "$macrodir"; then - my_pkgmacro_header="putting macros in \`$macrodir'." + # user specified a macro_dir. + $opt_quiet || if test -n "$ac_macro_dir"; then + my_pkgmacro_header="putting macros in AC_CONFIG_MACRO_DIR, \`$ac_macro_dir'." + elif test -n "$macro_dir"; then + my_pkgmacro_header="putting macros in \`$macro_dir'." fi if $opt_ltdl; then - func_serial_update argz.m4 "$aclocaldir" "$macrodir" \ + func_serial_update argz.m4 "$aclocaldir" "$macro_dir" \ my_pkgmacro_header argz.m4 else - func_verbose "Not copying \`$macrodir/argz.m4', libltdl not used." + func_verbose "Not copying \`$macro_dir/argz.m4', libltdl not used." fi - func_serial_update libtool.m4 "$aclocaldir" "$macrodir" \ + func_serial_update libtool.m4 "$aclocaldir" "$macro_dir" \ my_pkgmacro_header LT_INIT 'A[CM]_PROG_LIBTOOL' if $opt_ltdl; then - func_serial_update ltdl.m4 "$aclocaldir" "$macrodir" \ + func_serial_update ltdl.m4 "$aclocaldir" "$macro_dir" \ my_pkgmacro_header 'LTDL_INIT' else - func_verbose "Not copying \`$macrodir/ltdl.m4', libltdl not used." + func_verbose "Not copying \`$macro_dir/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" \ + func_serial_update "$file" "$aclocaldir" "$macro_dir" \ my_pkgmacro_header "$file" done IFS="$my_save_IFS" @@ -1077,21 +1077,21 @@ func_install_pkgmacro_files () # argz.m4, libtool.m4 and ltdl.m4 are handled specially: func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4' - # 1. Parent has separate macrodir to subproject ltdl: + # 1. Parent has separate macro_dir to subproject ltdl: if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && - test -n "$macrodir" && test "x$macrodir" != "x$subproject_macrodir" + test -n "$macro_dir" && test "x$macro_dir" != "x$subproject_macro_dir" then func_install_pkgmacro_parent func_install_pkgmacro_subproject - # 2. Parent shares macrodir with subproject ltdl: + # 2. Parent shares macro_dir with subproject ltdl: elif $opt_ltdl && test "x$ltdl_mode" = "xsubproject" - # && test "x$macrodir" = "x$subproject_macrodir" + # && test "x$macro_dir" = "x$subproject_macro_dir" then func_install_pkgmacro_subproject - # 3. Not a subproject, but macrodir was specified in parent: - elif test -n "$macrodir"; then + # 3. Not a subproject, but macro_dir was specified in parent: + elif test -n "$macro_dir"; then func_install_pkgmacro_parent # 4. AC_CONFIG_MACRO_DIR was not specified: @@ -1339,10 +1339,10 @@ func_check_macros () ac_config_macro_dir_advised=false - if test -n "$ac_macrodir$ltdldir" && test -z "$macrodir"; then + if test -n "$ac_macro_dir$ltdldir" && test -z "$macro_dir"; then my_ac_config_macro_srcdir="$aclocaldir" - if $opt_ltdl && test "$macrodir" != "$subproject_macrodir"; then - my_ac_config_macro_srcdir="$subproject_macrodir" + if $opt_ltdl && test "$macro_dir" != "$subproject_macro_dir"; then + my_ac_config_macro_srcdir="$subproject_macro_dir" fi my_needed="libtool.m4 ltoptions.m4 ltversion.m4 ltsugar.m4 lt~obsolete.m4" @@ -1364,7 +1364,7 @@ func_check_macros () done if test "$my_ac_config_macro_srcdir" != "$aclocaldir"; then - func_echo "or else add \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' to $configure_ac." + func_echo "or else add \`AC_CONFIG_MACRO_DIR([$subproject_macro_dir])' to $configure_ac." ac_config_macro_dir_advised=: fi fi @@ -1399,32 +1399,32 @@ func_check_macros () if test "x$ltdl_mode" = "xsubproject"; then test "$subproject_aux_dir" = "$aux_dir" || func_echo "Consider using \`AC_CONFIG_AUX_DIR([$subproject_aux_dir])' in $configure_ac." - $ac_config_macro_dir_advised || test "$subproject_macrodir" = "$macrodir" || - func_echo "Consider using \`AC_CONFIG_MACRO_DIR([$subproject_macrodir])' in $configure_ac." + $ac_config_macro_dir_advised || test "$subproject_macro_dir" = "$macro_dir" || + func_echo "Consider using \`AC_CONFIG_MACRO_DIR([$subproject_macro_dir])' in $configure_ac." ac_config_macro_dir_advised=: fi fi # Suggest modern idioms for storing autoconf macros: - $ac_config_macro_dir_advised || if test -z "$ac_macrodir" || test x"$macrodir" = x.; then + $ac_config_macro_dir_advised || if test -z "$ac_macro_dir" || test x"$macro_dir" = x.; then func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([m4])' to $configure_ac and" func_echo "rerunning $progname, to keep the correct libtool macros in-tree." ac_config_macro_dir_advised=: - elif test -z "$ac_macrodir$ltdldir"; then - func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macrodir])' to $configure_ac," + elif test -z "$ac_macro_dir$ltdldir"; then + func_echo "Consider adding \`AC_CONFIG_MACRO_DIR([$macro_dir])' to $configure_ac," func_echo "and rerunning $progname and aclocal." ac_config_macro_dir_advised=: fi - if test -z "$am_macrodir$macrodir"; then + if test -z "$am_macro_dir$macro_dir"; then func_echo "Consider adding \`-I m4' to ACLOCAL_AMFLAGS in Makefile.am." - elif test -z "$am_macrodir"; then - if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && test "$subproject_macrodir" != "$macrodir"; then - func_echo "Consider adding \`-I $subproject_macrodir' to ACLOCAL_AMFLAGS in Makefile.am." + elif test -z "$am_macro_dir"; then + if $opt_ltdl && test "x$ltdl_mode" = "xsubproject" && test "$subproject_macro_dir" != "$macro_dir"; then + func_echo "Consider adding \`-I $subproject_macro_dir' to ACLOCAL_AMFLAGS in Makefile.am." else - func_echo "Consider adding \`-I $macrodir' to ACLOCAL_AMFLAGS in Makefile.am." + func_echo "Consider adding \`-I $macro_dir' to ACLOCAL_AMFLAGS in Makefile.am." fi fi @@ -1458,7 +1458,7 @@ func_check_macros () pkgltdldir=@pkgdatadir@ aclocaldir=@aclocaldir@ aux_dir= - macrodir= + macro_dir= configure_ac=configure.in seen_autoconf=false @@ -1495,7 +1495,7 @@ func_check_macros () *) ltdlprefix=$ltdldir/ ;; esac subproject_aux_dir=${ltdlprefix}config - subproject_macrodir=${ltdlprefix}m4 + subproject_macro_dir=${ltdlprefix}m4 # :::BE CAREFUL HERE::: # func_check_macros needs to check whether --ltdl was specified when diff --git a/tests/defs.m4sh b/tests/defs.m4sh index 59101d9f3..6a4807914 100644 --- a/tests/defs.m4sh +++ b/tests/defs.m4sh @@ -342,7 +342,7 @@ func_exec () # Shared global variables for test scripts prefix=./_inst-`echo "$0" | sed 's,.*/,,; s,-.*,,'` srcdir=`cd $srcdir && pwd` -m4dir=$srcdir/libltdl/m4 +macro_dir=$srcdir/libltdl/m4 aux_dir=$srcdir/libltdl/config scripts="$aux_dir/ltmain.m4sh $srcdir/libtoolize.m4sh" diff --git a/tests/sh.test b/tests/sh.test index 5324b318d..4fd3bb3e6 100755 --- a/tests/sh.test +++ b/tests/sh.test @@ -121,7 +121,7 @@ done # Check for correct usage of $cc_basename. # redirect stderr so we also barf when sed issues diagnostics. -for s in "$m4dir/libtool.m4" +for s in "$macro_dir/libtool.m4" do if $SED -n '/case \$cc_basename in/,/esac/ { /^[ ]*[a-zA-Z][a-zA-Z0-9+]*[^*][ ]*)/p