libtool-patches
[Top][All Lists]
Advanced

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

FYI: maint: rename the debug shell-command variable to `debug_cmd'.


From: Gary V. Vaughan
Subject: FYI: maint: rename the debug shell-command variable to `debug_cmd'.
Date: Sat, 5 Nov 2011 18:29:52 +0700

Applied as an obvious refactoring.

Not only does it make more sense, it also matches bootstrap and
others.
* libtoolize.m4sh, libltdl/config/ltmain.m4sh,
libltdl/config/getopt.m4sh, tests/defs.m4sh (opt_debug): Rename
to debug_cmd.

Signed-off-by: Gary V. Vaughan <address@hidden>
---
 libltdl/config/getopt.m4sh |   14 +++---
 libltdl/config/ltmain.m4sh |  122 +++++++++++++++++++++++++++++---------------
 libtoolize.m4sh            |   78 ++++++++++++++++++----------
 tests/defs.m4sh            |   45 ++++++++++------
 4 files changed, 167 insertions(+), 92 deletions(-)

diff --git a/libltdl/config/getopt.m4sh b/libltdl/config/getopt.m4sh
index e9363bc..e727c06 100644
--- a/libltdl/config/getopt.m4sh
+++ b/libltdl/config/getopt.m4sh
@@ -465,7 +465,7 @@ m4_define([m4go_optional_file_arg],
 m4_define([m4go_printopts],
 [
 # Option defaults:
-opt_debug=:
+debug_cmd="${debug_cmd-:}"
 m4go_defaults
 
 # Parse options once, thoroughly.  This comes as soon as possible in the
@@ -476,9 +476,9 @@ m4go_defaults
     opt="[$]1"
     shift
     case $opt in
-      --debug|-x)      opt_debug='set -x'
+      --debug|-x)      debug_cmd='set -x'
                        func_echo "enabling shell trace mode"
-                       $opt_debug
+                       $debug_cmd
                        ;;
 m4go_branches
       -\?|-h)          func_usage                              ;;
@@ -538,7 +538,7 @@ m4_divert_pop([KILL])M4SH_VERBATIM([[
 # Echo version message to standard output and exit.
 func_version ()
 {
-    $opt_debug
+    $debug_cmd
 
     $SED -n '/(C)/!b go
        :more
@@ -561,7 +561,7 @@ func_version ()
 # Echo short help message to standard output and exit.
 func_usage ()
 {
-    $opt_debug
+    $debug_cmd
 
     $SED -n '/^# Usage:/,/^#  *.*--help/ {
         s/^# //
@@ -579,7 +579,7 @@ func_usage ()
 # unless 'noexit' is passed as argument.
 func_help ()
 {
-    $opt_debug
+    $debug_cmd
 
     $SED -n '/^# Usage:/,/# Report bugs to/ {
        :print
@@ -611,7 +611,7 @@ func_help ()
 # exit_cmd.
 func_missing_arg ()
 {
-    $opt_debug
+    $debug_cmd
 
     func_error "missing argument for $1."
     exit_cmd=exit
diff --git a/libltdl/config/ltmain.m4sh b/libltdl/config/ltmain.m4sh
index e8c7d51..ca67c8a 100644
--- a/libltdl/config/ltmain.m4sh
+++ b/libltdl/config/ltmain.m4sh
@@ -394,7 +394,7 @@ M4SH_GETOPTS(
   fi
 
   # preserve --debug
-  test "$opt_debug" = : || func_append preserve_args " --debug"
+  test "$debug_cmd" = : || func_append preserve_args " --debug"
 
   case $host in
     *cygwin* | *mingw* | *pw32* | *cegcc*)
@@ -520,7 +520,8 @@ func_ltwrapper_p ()
 # FAIL_CMD may read-access the current command in variable CMD!
 func_execute_cmds ()
 {
-    $opt_debug
+    $debug_cmd
+
     save_ifs=$IFS; IFS='~'
     for cmd in $1; do
       IFS=$save_ifs
@@ -539,7 +540,8 @@ func_execute_cmds ()
 # `FILE.' does not work on cygwin managed mounts.
 func_source ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $1 in
     */* | *\\*)        . "$1" ;;
     *)         . "./$1" ;;
@@ -586,7 +588,8 @@ func_replace_sysroot ()
 # arg is usually of the form 'gcc ...'
 func_infer_tag ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -n "$available_tags" && test -z "$tagname"; then
       CC_quoted=
       for arg in $CC; do
@@ -694,7 +697,8 @@ EOF
 # be empty on error (or when ARG is empty)
 func_convert_core_file_wine_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_convert_core_file_wine_to_w32_result="$1"
   if test -n "$1"; then
     # Unfortunately, winepath does not exit with a non-zero error code, so we
@@ -726,7 +730,8 @@ func_convert_core_file_wine_to_w32 ()
 # are convertible, then the result may be empty.
 func_convert_core_path_wine_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # unfortunately, winepath doesn't convert paths, only file names 
   func_convert_core_path_wine_to_w32_result=""
   if test -n "$1"; then
@@ -766,7 +771,8 @@ func_convert_core_path_wine_to_w32 ()
 # environment variable; do not put it in $PATH.
 func_cygpath ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then
     func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null`
     if test "$?" -ne 0; then
@@ -786,7 +792,8 @@ func_cygpath ()
 # result in func_convert_core_msys_to_w32_result.
 func_convert_core_msys_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   # awkward: cmd appends spaces to result
   func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null |
     $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"`
@@ -800,7 +807,8 @@ func_convert_core_msys_to_w32 ()
 # func_to_host_file_result to ARG1).
 func_convert_file_check ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$2" && test -n "$1" ; then
     func_error "Could not determine host file name corresponding to"
     func_error "  \`$1'"
@@ -818,7 +826,8 @@ func_convert_file_check ()
 # func_to_host_file_result to a simplistic fallback value (see below).
 func_convert_path_check ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$4" && test -n "$3"; then
     func_error "Could not determine the host path corresponding to"
     func_error "  \`$3'"
@@ -842,7 +851,8 @@ func_convert_path_check ()
 # and appending REPL if ORIG matches BACKPAT.
 func_convert_path_front_back_pathsep ()
 {
-  $opt_debug
+  $debug_cmd
+
   case $4 in
   $1 ) func_to_host_path_result="$3$func_to_host_path_result"
     ;;
@@ -869,7 +879,8 @@ func_convert_path_front_back_pathsep ()
 # in func_to_host_file_result.
 func_to_host_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   $to_host_file_cmd "$1"
 }
 # end func_to_host_file
@@ -881,7 +892,8 @@ func_to_host_file ()
 # in (the comma separated) LAZY, no conversion takes place.
 func_to_tool_file ()
 {
-  $opt_debug
+  $debug_cmd
+
   case ,$2, in
     *,"$to_tool_file_cmd",*)
       func_to_tool_file_result=$1
@@ -910,7 +922,8 @@ func_convert_file_noop ()
 # func_to_host_file_result.
 func_convert_file_msys_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
@@ -926,7 +939,8 @@ func_convert_file_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_file_cygwin_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_file_result="$1"
   if test -n "$1"; then
     # because $build is cygwin, we call "the" cygpath in $PATH; no need to use
@@ -943,7 +957,8 @@ func_convert_file_cygwin_to_w32 ()
 # and a working winepath. Returns result in func_to_host_file_result.
 func_convert_file_nix_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_file_wine_to_w32 "$1"
@@ -959,7 +974,8 @@ func_convert_file_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_file_msys_to_cygwin ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_file_result="$1"
   if test -n "$1"; then
     func_convert_core_msys_to_w32 "$1"
@@ -977,7 +993,8 @@ func_convert_file_msys_to_cygwin ()
 # in func_to_host_file_result.
 func_convert_file_nix_to_cygwin ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_file_result="$1"
   if test -n "$1"; then
     # convert from *nix to w32, then use cygpath to convert from w32 to cygwin.
@@ -1017,7 +1034,8 @@ func_convert_file_nix_to_cygwin ()
 to_host_path_cmd=
 func_init_to_host_path_cmd ()
 {
-  $opt_debug
+  $debug_cmd
+
   if test -z "$to_host_path_cmd"; then
     func_stripname 'func_convert_file_' '' "$to_host_file_cmd"
     to_host_path_cmd="func_convert_path_${func_stripname_result}"
@@ -1030,7 +1048,8 @@ func_init_to_host_path_cmd ()
 # in func_to_host_path_result.
 func_to_host_path ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_init_to_host_path_cmd
   $to_host_path_cmd "$1"
 }
@@ -1052,7 +1071,8 @@ func_convert_path_noop ()
 # func_to_host_path_result.
 func_convert_path_msys_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_path_result="$1"
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from ARG.  MSYS
@@ -1075,7 +1095,8 @@ func_convert_path_msys_to_w32 ()
 # func_to_host_file_result.
 func_convert_path_cygwin_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
@@ -1095,7 +1116,8 @@ func_convert_path_cygwin_to_w32 ()
 # a working winepath.  Returns result in func_to_host_file_result.
 func_convert_path_nix_to_w32 ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
@@ -1116,7 +1138,8 @@ func_convert_path_nix_to_w32 ()
 # Returns result in func_to_host_file_result.
 func_convert_path_msys_to_cygwin ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_path_result="$1"
   if test -n "$1"; then
     # See func_convert_path_msys_to_w32:
@@ -1139,7 +1162,8 @@ func_convert_path_msys_to_cygwin ()
 # func_to_host_file_result.
 func_convert_path_nix_to_cygwin ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_host_path_result="$1"
   if test -n "$1"; then
     # Remove leading and trailing path separator characters from
@@ -1161,7 +1185,8 @@ func_convert_path_nix_to_cygwin ()
 # func_mode_compile arg...
 func_mode_compile ()
 {
-    $opt_debug
+    $debug_cmd
+
     # Get the compilation command and the source file.
     base_compile=
     srcfile="$nonopt"  #  always keep a non-empty value in "srcfile"
@@ -1728,7 +1753,8 @@ fi
 # func_mode_execute arg...
 func_mode_execute ()
 {
-    $opt_debug
+    $debug_cmd
+
     # The first argument is the command name.
     cmd="$nonopt"
     test -z "$cmd" && \
@@ -1861,7 +1887,8 @@ test "$opt_mode" = execute && func_mode_execute ${1+"$@"}
 # func_mode_finish arg...
 func_mode_finish ()
 {
-    $opt_debug
+    $debug_cmd
+
     libs=
     libdirs=
     admincmds=
@@ -1980,7 +2007,8 @@ test "$opt_mode" = finish && func_mode_finish ${1+"$@"}
 # func_mode_install arg...
 func_mode_install ()
 {
-    $opt_debug
+    $debug_cmd
+
     # There may be an optional sh(1) argument at the beginning of
     # install_prog (especially on Windows NT).
     if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
@@ -2447,7 +2475,8 @@ test "$opt_mode" = install && func_mode_install ${1+"$@"}
 # a dlpreopen symbol table.
 func_generate_dlsyms ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_outputname="$1"
     my_originator="$2"
     my_pic_p="${3-no}"
@@ -2753,7 +2782,8 @@ static const void *lt_preloaded_setup() {
 # Despite the name, also deal with 64 bit binaries.
 func_win32_libid ()
 {
-  $opt_debug
+  $debug_cmd
+
   win32_libid_type="unknown"
   win32_fileres=`file -L $1 2>/dev/null`
   case $win32_fileres in
@@ -2805,7 +2835,8 @@ func_win32_libid ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib ()
 {
-  $opt_debug
+  $debug_cmd
+
   sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"`
 }
 
@@ -2822,7 +2853,8 @@ func_cygming_dll_for_implib ()
 # specified import library.
 func_cygming_dll_for_implib_fallback_core ()
 {
-  $opt_debug
+  $debug_cmd
+
   match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"`
   $OBJDUMP -s --section "$1" "$2" 2>/dev/null |
     $SED '/^Contents of section '"$match_literal"':/{
@@ -2876,7 +2908,8 @@ func_cygming_dll_for_implib_fallback_core ()
 # with nonzero status (FALSE) otherwise.
 func_cygming_gnu_implib_p ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_tool_file "$1" func_convert_file_msys_to_w32
   func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval 
"$global_symbol_pipe" | $EGREP ' 
(_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'`
   test -n "$func_cygming_gnu_implib_tmp"
@@ -2888,7 +2921,8 @@ func_cygming_gnu_implib_p ()
 # with nonzero status (FALSE) otherwise.
 func_cygming_ms_implib_p ()
 {
-  $opt_debug
+  $debug_cmd
+
   func_to_tool_file "$1" func_convert_file_msys_to_w32
   func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval 
"$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'`
   test -n "$func_cygming_ms_implib_tmp"
@@ -2907,7 +2941,8 @@ func_cygming_ms_implib_p ()
 #    $sharedlib_from_linklib_result
 func_cygming_dll_for_implib_fallback ()
 {
-  $opt_debug
+  $debug_cmd
+
   if func_cygming_gnu_implib_p "$1" ; then
     # binutils import library
     sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core 
'.idata$7' "$1"`
@@ -2924,7 +2959,8 @@ func_cygming_dll_for_implib_fallback ()
 # func_extract_an_archive dir oldlib
 func_extract_an_archive ()
 {
-    $opt_debug
+    $debug_cmd
+
     f_ex_an_ar_dir="$1"; shift
     f_ex_an_ar_oldlib="$1"
     if test "$lock_old_archive_extraction" = yes; then
@@ -2950,7 +2986,8 @@ func_extract_an_archive ()
 # func_extract_archives gentop oldlib ...
 func_extract_archives ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_gentop="$1"; shift
     my_oldlibs=${1+"$@"}
     my_oldobjs=""
@@ -4294,7 +4331,8 @@ EOF
 # True if ARG is an import lib, as indicated by $file_magic_cmd
 func_win32_import_lib_p ()
 {
-    $opt_debug
+    $debug_cmd
+
     case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in
     *import*) : ;;
     *) false ;;
@@ -4304,7 +4342,8 @@ func_win32_import_lib_p ()
 # func_mode_link arg...
 func_mode_link ()
 {
-    $opt_debug
+    $debug_cmd
+
     case $host in
     *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*)
       # It is impossible to link a dll without this setting, and
@@ -8653,7 +8692,8 @@ relink_command=\"$relink_command\""
 # func_mode_uninstall arg...
 func_mode_uninstall ()
 {
-    $opt_debug
+    $debug_cmd
+
     RM="$nonopt"
     files=
     rmforce=
diff --git a/libtoolize.m4sh b/libtoolize.m4sh
index 4489b57..e41ab3c 100644
--- a/libtoolize.m4sh
+++ b/libtoolize.m4sh
@@ -170,7 +170,8 @@ M4SH_VERBATIM([[
 # that subsequent calls have no effect.
 func_echo_once ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -n "$1"; then
       eval my_msg=\$$1
 
@@ -187,7 +188,7 @@ func_echo_once ()
 # as the cp(1) shell command.
 func_copy ()
 {
-    $opt_debug
+    $debug_cmd
 
     test -f "$1" || \
       { func_error "\`$1' not copied:  not a regular file"; return 1; }
@@ -225,7 +226,8 @@ func_copy ()
 # possible).
 func_copy_cb ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_file="$1"
     my_srcdir="$2"
     my_destdir="$3"
@@ -282,7 +284,8 @@ func_copy_cb ()
 # spaces in file and directory names.
 func_copy_some_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_srcfile_spec="$1"
     my_srcdir="$2"
     my_destdir="$3"
@@ -316,7 +319,8 @@ func_copy_some_files ()
 # func_fixup_Makefile srcfile srcdir destdir
 func_fixup_Makefile ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_filename="$1"
     my_srcdir="$2"
     my_destdir="$3"
@@ -370,7 +374,8 @@ func_fixup_Makefile ()
 # configure.(ac|in) and aclocal.m4.
 func_scan_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     # Prefer configure.ac to configure.in
     test -f configure.ac && configure_ac=configure.ac
     test -f "$configure_ac" || configure_ac=
@@ -594,7 +599,8 @@ func_scan_files ()
 # Output INCLUDEFILE if SEARCHFILE m4_includes it, else output SEARCHFILE.
 func_included_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_searchfile="$1"
 
     my_include_regex=
@@ -622,7 +628,8 @@ func_included_files ()
 # comment line must also match MACRO_REGEX, if given.
 func_serial ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_filename="$1"
     my_macro_regex="$2"
     my_sed_serial='
@@ -661,7 +668,8 @@ func_serial ()
 # same, func_serial_max_result will be empty.
 func_serial_max ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_serial1="$1"
     my_serial2="$2"
 
@@ -707,7 +715,8 @@ func_serial_max ()
 # to 'false'.
 func_serial_update_check ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_srcfile="$1"
     my_src_serial="$2"
     my_destfile="$3"
@@ -744,7 +753,8 @@ func_serial_update_check ()
 # in aclocal.m4, set $func_aclocal_update_check to 'false'.
 func_aclocal_update_check ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_srcfile="$aclocaldir/$1"
     my_destfile="aclocal.m4"
 
@@ -784,7 +794,8 @@ func_aclocal_update_check ()
 # OLD_MACRO_REGEX must match any text after "# serial N" in both files.
 func_serial_update ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_filename="$1"
     my_srcdir="$2"
     my_destdir="$3"
@@ -860,7 +871,8 @@ func_serial_update ()
 # `--force' at the command line.
 func_keyword_update ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_filename="$1"
     my_srcdir="$2"
     my_destdir="$3"
@@ -904,7 +916,8 @@ func_keyword_update ()
 # specified `--force' at the command line.
 func_ltmain_update ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_sed_ltmain='
        /^package_revision='\''*[0-9][1-9.]*'\''*/ {
            s,^package_revision='\''*\([0-9.]*\)'\''*[   ]*$,\1,
@@ -924,7 +937,8 @@ func_ltmain_update ()
 # specified `--force' at the command line.
 func_config_update ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_sed_config='
        /^timestamp='\''*[0-9][1-9-]*'\''*/ {
            s,^timestamp='\''*\([0-9-]*\)'\''*,\1,
@@ -945,7 +959,8 @@ func_config_update ()
 # specified `--force' at the command line.
 func_install_update ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_sed_install='
        /^scriptversion='\''*[0-9][1-9.-]*'\''*/ {
            s,[#;].*,,
@@ -966,7 +981,8 @@ func_install_update ()
 # this function massages it into a suitable format for func_copy_some_files.
 func_massage_aclocal_DATA ()
 {
-    $opt_debug
+    $debug_cmd
+
     pkgmacro_files=     # GLOBAL VAR
 
     my_glob_exclude="$1"
@@ -996,7 +1012,7 @@ func_massage_aclocal_DATA ()
 # from libtool installation tree to subproject libltdl tree.
 func_install_pkgmacro_subproject ()
 {
-    $opt_debug
+    $debug_cmd
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -1024,7 +1040,7 @@ func_install_pkgmacro_subproject ()
 # from the libtool installation tree.
 func_install_pkgmacro_parent ()
 {
-    $opt_debug
+    $debug_cmd
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -1073,7 +1089,7 @@ func_install_pkgmacro_parent ()
 # Install copies of the libtool and libltdl m4 macros into this package.
 func_install_pkgmacro_files ()
 {
-    $opt_debug
+    $debug_cmd
 
     # argz.m4, libtool.m4 and ltdl.m4 are handled specially:
     func_massage_aclocal_DATA 'argz.m4|libtool.m4|ltdl.m4'
@@ -1107,7 +1123,8 @@ func_install_pkgmacro_files ()
 # function massages it into a suitable format for func_copy_some_files.
 func_massage_pkgltdl_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     pkgltdl_files=     # GLOBAL VAR
 
     my_glob_exclude="$1"
@@ -1143,7 +1160,8 @@ func_massage_pkgltdl_files ()
 # func_install_pkgconfig_files and func_install_pkgmacro_files resp.
 func_install_pkgltdl_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     $opt_ltdl || return
 
     # Remove any lingering files that my have been installed by some
@@ -1188,7 +1206,8 @@ func_install_pkgltdl_files ()
 # function massages it into a suitable format for func_copy_some_files.
 func_massage_pkgconfig_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     pkgconfig_files=   # GLOBAL VAR
 
     my_glob_exclude="$1"
@@ -1220,7 +1239,7 @@ func_massage_pkgconfig_files ()
 # from libtool installation tree to subproject libltdl tree.
 func_install_pkgconfig_subproject ()
 {
-    $opt_debug
+    $debug_cmd
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -1248,7 +1267,7 @@ func_install_pkgconfig_subproject ()
 # available from the libtool installation tree.
 func_install_pkgconfig_parent ()
 {
-    $opt_debug
+    $debug_cmd
 
     # Remove any lingering files that my have been installed by some
     # previous libtoolize release:
@@ -1282,7 +1301,8 @@ func_install_pkgconfig_parent ()
 # shares the AC_CONFIG_AUX_DIR setting.
 func_install_pkgconfig_files ()
 {
-    $opt_debug
+    $debug_cmd
+
     func_massage_pkgconfig_files
 
   # 1. Parent shares aux_dir with subproject ltdl:
@@ -1316,7 +1336,8 @@ func_install_pkgconfig_files ()
 # a directory that exists and is non-empty abort with a diagnostic.
 func_nonemptydir_p ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_dirvar="$1"
     my_dir=`eval echo "\\\$$my_dirvar"`
 
@@ -1334,7 +1355,8 @@ func_nonemptydir_p ()
 # Sanity check macros from aclocal.m4 against installed versions.
 func_check_macros ()
 {
-    $opt_debug
+    $debug_cmd
+
     $opt_quiet && return
     $seen_autoconf || return
 
diff --git a/tests/defs.m4sh b/tests/defs.m4sh
index 25bab38..9d8136e 100644
--- a/tests/defs.m4sh
+++ b/tests/defs.m4sh
@@ -44,11 +44,11 @@ fi
 
 # How verbose should we be?  Default is test output in log file.
 # Setting VERBOSE=debug puts the shell in debug mode.
-opt_debug=:
+debug_cmd=:
 case "$VERBOSE" in
 DEBUG | debug )
-  opt_debug='set -x'
-  $opt_debug
+  debug_cmd='set -x'
+  $debug_cmd
   ;;
 esac
 
@@ -77,7 +77,8 @@ func_fail ()
 # func_get_config varname_list src [failp] [regex]
 func_get_config ()
 {
-  $opt_debug
+  $debug_cmd
+
   my_varname_list="$1"
   my_src="$2"
   my_failp="false";  test -z "$3" || my_failp=:
@@ -128,7 +129,8 @@ build_alias" "$LIBTOOL --config" ": fatal"
 # func_mkprefixdir
 func_mkprefixdir ()
 {
-    $opt_debug
+    $debug_cmd
+
     # An absolute path to a test installation directory.
     func_mkdir_p "$prefix"
     prefix=`cd $prefix && pwd`
@@ -137,7 +139,8 @@ func_mkprefixdir ()
 # func_rmprefixdir
 func_rmprefixdir ()
 {
-    $opt_debug
+    $debug_cmd
+
     test -d $prefix && rm -rf $prefix
     prefix=NONE
 }
@@ -146,7 +149,8 @@ func_rmprefixdir ()
 # Make sure a directory exists, and then change to it.
 func_cd ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_dir="$1"
 
     # Maybe we have a VPATH build, in which case, create a new subdir.
@@ -161,7 +165,8 @@ func_cd ()
 # If FILE does not exist, give a fatal error regarding running PREREQ first.
 func_require ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_prereq="$1"; shift
     my_files=${1+"$@"}
 
@@ -175,7 +180,8 @@ func_require ()
 # Configure the demonstration.
 func_configure_nofail ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_args=${1+"$@"}
     func_dirname_and_basename "`pwd`"
     my_dir=$func_basename_result
@@ -217,7 +223,8 @@ func_configure ()
 # for the expected STATICP and SHAREDP library building
 func_check_static_shared ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_staticp="$1"
     my_sharedp="$2"
 
@@ -234,7 +241,8 @@ func_check_static_shared ()
 # Do the actual build.
 func_make ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_args=${1+"$@"}
     func_dirname_and_basename "`pwd`"
     func_msg "Running \`$MAKE $my_args' in $func_basename_result"
@@ -247,7 +255,8 @@ func_make ()
 # Possibly clean up the distribution.
 func_make_distclean ()
 {
-    $opt_debug
+    $debug_cmd
+
     if test -f Makefile; then
       func_make distclean
     fi
@@ -260,7 +269,8 @@ func_make_distclean ()
 # Ignore dotfiles, so that .nfsXXX files don't screw up the test.
 func_make_uninstall ()
 {
-    $opt_debug
+    $debug_cmd
+
     func_make uninstall
 
     leftovers=`find $prefix ! -type d ! -name '.*' -print`
@@ -275,7 +285,8 @@ func_make_uninstall ()
 # func_exec_init mode
 func_exec_init ()
 {
-    $opt_debug
+    $debug_cmd
+
     func_dirname_and_basename "`pwd`"
     func_msg "Executing $1 programs in $func_basename_result"
 
@@ -289,7 +300,8 @@ func_exec_init ()
 # Check to see if PROGRAM was built. If not display MSG.
 func_exec_check ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_program="$1"
 
     if test -f "$my_program"; then :
@@ -305,7 +317,8 @@ func_exec_check ()
 # If not display MSG.
 func_exec ()
 {
-    $opt_debug
+    $debug_cmd
+
     my_program="$1"
     my_exp_output="$2"
     func_dirname_and_basename "`pwd`"
-- 
1.7.7.2

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


reply via email to

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