autoconf-commit
[Top][All Lists]
Advanced

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

[SCM] GNU Autoconf source repository branch, master, updated. v2.67-31-g


From: Eric Blake
Subject: [SCM] GNU Autoconf source repository branch, master, updated. v2.67-31-gae1cc9f
Date: Wed, 25 Aug 2010 23:30:25 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Autoconf source repository".

http://git.sv.gnu.org/gitweb/?p=autoconf.git;a=commitdiff;h=ae1cc9f03fb60ee3ab686642ac7faa4279bbcfc4

The branch, master has been updated
       via  ae1cc9f03fb60ee3ab686642ac7faa4279bbcfc4 (commit)
       via  bbf53dd459fc6d6d9e1dabdd8aa9eca7fe63fb07 (commit)
       via  cb27df430d86d5a16bc1f210d36e29400369dbc2 (commit)
       via  e0ac12089ea4c934029baf77741e659f0bebd653 (commit)
      from  9b7d0212e792d6cd5e5c447dc8696efd4da67a91 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit ae1cc9f03fb60ee3ab686642ac7faa4279bbcfc4
Author: Eric Blake <address@hidden>
Date:   Wed Aug 25 16:22:45 2010 -0600

    m4sh: reduce size of AS_VAR_TEST_SET
    
    * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.
    
    Signed-off-by: Eric Blake <address@hidden>

commit bbf53dd459fc6d6d9e1dabdd8aa9eca7fe63fb07
Author: Eric Blake <address@hidden>
Date:   Wed Aug 25 16:25:15 2010 -0600

    tests: improve some shell assumption testing
    
    * tests/m4sh.at (Functions Support, Functions and return Support)
    (Negated classes in globbing): Update comments.
    (AS@&address@hidden basics): Test comparison to empty string.

commit cb27df430d86d5a16bc1f210d36e29400369dbc2
Author: Eric Blake <address@hidden>
Date:   Wed Aug 25 16:54:42 2010 -0600

    docs: mention cost of globbing during variable expansion
    
    * doc/autoconf.texi (Shell Substitutions) <${var=literal}>:
    Recommend quoting substitutions that might trigger globbing.
    (Limitations of Builtins) <:>: Likewise.
    * bin/autoconf.as: Follow our own advice.
    * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise.
    * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise.
    * lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
    * lib/autotest/general.m4 (_AT_FINISH): Likewise.
    * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise.
    * tests/autotest.at (parallel autotest and signal handling):
    Likewise.
    * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise.
    * tests/foreign.at (shtool): Likewise.
    * tests/fortran.at: Likewise.
    * tests/tools.at (autom4te preselections): Likewise.
    * tests/torture.at (VPATH): Likewise.
    
    Signed-off-by: Eric Blake <address@hidden>

commit e0ac12089ea4c934029baf77741e659f0bebd653
Author: Eric Blake <address@hidden>
Date:   Wed Aug 25 16:21:39 2010 -0600

    m4sh: fix some namespace safety issues
    
    * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if
    as_myself is inherited from environment.
    (AS_TMPDIR): Be namespace clean.
    
    Signed-off-by: Eric Blake <address@hidden>

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                 |   33 +++++++++++++++++++++++++++++++++
 bin/autoconf.as           |    2 +-
 doc/autoconf.texi         |   45 ++++++++++++++++++++++++++++++++++++++-------
 lib/autoconf/functions.m4 |    2 +-
 lib/autoconf/general.m4   |    2 +-
 lib/autoconf/status.m4    |    2 +-
 lib/autotest/general.m4   |    2 +-
 lib/m4sugar/m4sh.m4       |   20 +++++++++++---------
 tests/autotest.at         |    2 +-
 tests/c.at                |    4 ++--
 tests/foreign.at          |    2 +-
 tests/fortran.at          |   28 ++++++++++++++--------------
 tests/m4sh.at             |   25 +++++++++++++++++++------
 tests/tools.at            |    2 +-
 tests/torture.at          |    2 +-
 15 files changed, 126 insertions(+), 47 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index c7ef728..dbb2fbf 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,36 @@
+2010-08-25  Eric Blake  <address@hidden>
+
+       m4sh: reduce size of AS_VAR_TEST_SET
+       * lib/m4sugar/m4sh.m4 (AS_VAR_TEST_SET): Make more compact.
+
+       tests: improve some shell assumption testing
+       * tests/m4sh.at (Functions Support, Functions and return Support)
+       (Negated classes in globbing): Update comments.
+       (AS@&address@hidden basics): Test comparison to empty string.
+
+       docs: mention cost of globbing during variable expansion
+       * doc/autoconf.texi (Shell Substitutions) <${var=literal}>:
+       Recommend quoting substitutions that might trigger globbing.
+       (Limitations of Builtins) <:>: Likewise.
+       * bin/autoconf.as: Follow our own advice.
+       * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise.
+       * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise.
+       * lib/autoconf/status.m4 (AC_OUTPUT): Likewise.
+       * lib/autotest/general.m4 (_AT_FINISH): Likewise.
+       * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise.
+       * tests/autotest.at (parallel autotest and signal handling):
+       Likewise.
+       * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise.
+       * tests/foreign.at (shtool): Likewise.
+       * tests/fortran.at: Likewise.
+       * tests/tools.at (autom4te preselections): Likewise.
+       * tests/torture.at (VPATH): Likewise.
+
+       m4sh: fix some namespace safety issues
+       * lib/m4sugar/m4sh.m4 (_AS_SHELL_SANITIZE): Avoid problems if
+       as_myself is inherited from environment.
+       (AS_TMPDIR): Be namespace clean.
+
 2010-08-24  Ralf Wildenhues  <address@hidden>
 
        tests: fix AC_CACHE_CHECK to skip with bad shells.
diff --git a/bin/autoconf.as b/bin/autoconf.as
index aa7fe6b..dca4606 100644
--- a/bin/autoconf.as
+++ b/bin/autoconf.as
@@ -85,7 +85,7 @@ exit_missing_arg='
 # restore font-lock: '
 
 # Variables.
-: ${AUTOM4TE='@bindir@/@autom4te-name@'}
+: "${AUTOM4TE='@bindir@/@autom4te-name@'}"
 autom4te_options=
 outfile=
 verbose=false
diff --git a/doc/autoconf.texi b/doc/autoconf.texi
index a20be76..28637c5 100644
--- a/doc/autoconf.texi
+++ b/doc/autoconf.texi
@@ -15398,10 +15398,36 @@ Similarly for 
address@hidden@var{var}:address@hidden@}, 
address@hidden@var{var}:address@hidden@}, etc.
 
 @item address@hidden@address@hidden@}
 @cindex address@hidden@address@hidden@}
-Be sure to quote:
+When using @address@hidden@address@hidden@}} to assign a default value
+to @var{var}, remember that even though the assignment to @var{var} does
+not undergo file name expansion, the result of the variable expansion
+does.  In particular, when using @command{:} followed by unquoted
+variable expansion for the side effect of setting a default value, if
+either @samp{value} or the prior contents of @samp{$var} contains
+globbing characters, the shell has to spend time performing file name
+expansion and field splitting even though those results will not be
+used.  Therefore, it is a good idea to use double quotes when performing
+default initialization.
 
 @example
-: address@hidden'Some words'@}
+$ time bash -c ': "address@hidden/usr/bin/address@hidden"; echo "$a"'
+/usr/bin/*
+
+real   0m0.005s
+user   0m0.002s
+sys    0m0.003s
+$ time bash -c ': address@hidden/usr/bin/address@hidden; echo "$a"'
+/usr/bin/*
+
+real   0m0.039s
+user   0m0.026s
+sys    0m0.009s
address@hidden example
+
+Use quotes if @var{literal} contains more than one shell word:
+
address@hidden
+: "address@hidden'Some words'@}"
 @end example
 
 @noindent
@@ -15441,7 +15467,7 @@ running
 
 @example
 default="yu,yaa"
-: address@hidden"$default"@}
+: "address@hidden"$default"@}"
 @end example
 
 @noindent
@@ -15467,7 +15493,7 @@ One classic incarnation of this bug is:
 
 @example
 default="a b c"
-: address@hidden"$default"@}
+: "address@hidden"$default"@}"
 for c in $list; do
   echo $c
 done
@@ -15720,7 +15746,7 @@ If the default value is a literal and does not contain 
any closing
 brace, use:
 
 @example
-: address@hidden'my literal'@}
+: "address@hidden'my literal'@}"
 @end example
 
 @item
@@ -15729,7 +15755,7 @@ the variable being initialized is not intended to be 
IFS-split
 (i.e., it's not a list), then use:
 
 @example
-: address@hidden"$default"@}
+: "address@hidden"$default"@}"
 @end example
 
 @item
@@ -17432,6 +17458,11 @@ exit status of failure, which is correct for 
@command{false}, but not
 for @command{true}.
 @end quotation
 
+Remember that even though @samp{:} ignores its arguments, it still takes
+time to compute those arguments.  It is a good idea to use double quotes
+around any arguments to @samp{:} to avoid time spent in field splitting
+and file name expansion.
+
 
 @anchor{unset}
 @item @command{unset}
@@ -18259,7 +18290,7 @@ Here is sample code to create a new temporary directory 
safely:
 # Create a temporary directory $tmp in $TMPDIR (default /tmp).
 # Use mktemp if possible; otherwise fall back on mkdir,
 # with $RANDOM to make collisions less likely.
-: address@hidden/address@hidden
+: "address@hidden/address@hidden"
 @{
   tmp=`
     (umask 077 && mktemp -d "$TMPDIR/fooXXXXXX") 2>/dev/null
diff --git a/lib/autoconf/functions.m4 b/lib/autoconf/functions.m4
index d7058c8..7e69d46 100644
--- a/lib/autoconf/functions.m4
+++ b/lib/autoconf/functions.m4
@@ -1453,7 +1453,7 @@ AC_CACHE_CHECK([types of arguments for select],
  done
 done
 # Provide a safe default value.
-: ${ac_cv_func_select_args='int,int *,struct timeval *'}
+: "${ac_cv_func_select_args='int,int *,struct timeval *'}"
 ])
 ac_save_IFS=$IFS; IFS=','
 set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'`
diff --git a/lib/autoconf/general.m4 b/lib/autoconf/general.m4
index 99cc326..c6f3980 100644
--- a/lib/autoconf/general.m4
+++ b/lib/autoconf/general.m4
@@ -900,7 +900,7 @@ Try `$[0] --help' for more information])
     AC_MSG_WARN([you should use --build, --host, --target])
     expr "x$ac_option" : "[.*[^-._$as_cr_alnum]]" >/dev/null &&
       AC_MSG_WARN([invalid host type: $ac_option])
-    : ${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}
+    : "${build_alias=$ac_option} ${host_alias=$ac_option} 
${target_alias=$ac_option}"
     ;;
 
   esac
diff --git a/lib/autoconf/status.m4 b/lib/autoconf/status.m4
index 56190a4..9bd0a50 100644
--- a/lib/autoconf/status.m4
+++ b/lib/autoconf/status.m4
@@ -1271,7 +1271,7 @@ m4_ifdef([_AC_SEEN_CONFIG(HEADERS)], 
[DEFS=-DHAVE_CONFIG_H], [AC_OUTPUT_MAKE_DEF
 dnl Commands to run before creating config.status.
 AC_OUTPUT_COMMANDS_PRE()dnl
 
-: ${CONFIG_STATUS=./config.status}
+: "${CONFIG_STATUS=./config.status}"
 ac_write_fail=0
 ac_clean_files_save=$ac_clean_files
 ac_clean_files="$ac_clean_files $CONFIG_STATUS"
diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4
index ef76e63..e639ce6 100644
--- a/lib/autotest/general.m4
+++ b/lib/autotest/general.m4
@@ -847,7 +847,7 @@ do
 done
 
 # Autoconf <=2.59b set at_top_builddir instead of at_top_build_prefix:
-: ${at_top_build_prefix=$at_top_builddir}
+: "${at_top_build_prefix=$at_top_builddir}"
 
 # Perform any assignments requested during argument parsing.
 eval "$at_debug_args"
diff --git a/lib/m4sugar/m4sh.m4 b/lib/m4sugar/m4sh.m4
index 3cc868c..facd70d 100644
--- a/lib/m4sugar/m4sh.m4
+++ b/lib/m4sugar/m4sh.m4
@@ -425,6 +425,7 @@ _AS_PATH_SEPARATOR_PREPARE
 IFS=" ""       $as_nl"
 
 # Find who we are.  Look in the path if we contain no directory separator.
+as_myself=
 case $[0] in @%:@((
   *[[\\/]]* ) as_myself=$[0] ;;
   *) _AS_PATH_WALK([],
@@ -1616,14 +1617,15 @@ m4_define([_AS_LITERAL_HEREDOC_IF_NO], [$2])
 # which name is inspired by PREFIX (should be 2-4 chars max).
 m4_define([AS_TMPDIR],
 [# Create a (secure) tmp directory for tmp files.
-m4_if([$2], [], [: ${TMPDIR=/tmp}])
+m4_if([$2], [], [: "${TMPDIR=/tmp}"])
 {
-  tmp=`(umask 077 && mktemp -d "m4_default([$2], [$TMPDIR])/$1XXXXXX") 
2>/dev/null` &&
-  test -n "$tmp" && test -d "$tmp"
+  as_tmp=`(umask 077 && mktemp -d "m4_default([$2],
+    [$TMPDIR])/$1XXXXXX") 2>/dev/null` &&
+  test -d "$as_tmp"
 }  ||
 {
-  tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
-  (umask 077 && mkdir "$tmp")
+  as_tmp=m4_default([$2], [$TMPDIR])/$1$$-$RANDOM
+  (umask 077 && mkdir "$as_tmp")
 } || AS_ERROR([cannot create a temporary directory in m4_default([$2],
              [$TMPDIR])])])# AS_TMPDIR
 
@@ -2061,13 +2063,13 @@ m4_define([AS_VAR_SET_IF],
 
 # AS_VAR_TEST_SET(VARIABLE)
 # -------------------------
-# Expands into the `test' expression which is true if VARIABLE
+# Expands into an expression which is true if VARIABLE
 # is set.  Polymorphic.
 m4_define([AS_VAR_TEST_SET],
 [AS_LITERAL_WORD_IF([$1],
-              [test "${$1+set}" = set],
-              [{ as_var=$1; eval "test \"\${$as_var+set}\" = set"; }],
-              [eval "test \"\${$1+set}\"" = set])])
+  [${$1+:} false],
+  [{ as_var=$1; eval \${$as_var+:} false; }],
+  [eval \${$1+:} false])])
 
 
 ## -------------------- ##
diff --git a/tests/autotest.at b/tests/autotest.at
index 04524a5..811417b 100644
--- a/tests/autotest.at
+++ b/tests/autotest.at
@@ -1502,7 +1502,7 @@ for signal in 2 15; do
   # AT_CHECK([[grep '[iI]nterrupt[      ]' stderr]], [1])
 
   # Ditto with `make' in the loop.
-  : ${MAKE=make}
+  : "${MAKE=make}"
   unset MAKEFLAGS
   # Need to eliminate outer TESTSUITEFLAGS here.
   # Need to normalize exit status here: some make implementations
diff --git a/tests/c.at b/tests/c.at
index 8e77233..0e09798 100644
--- a/tests/c.at
+++ b/tests/c.at
@@ -368,7 +368,7 @@ int main ()
 }
 ]])
 
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
 AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
 AT_CHECK([$MAKE], [], [ignore], [ignore])
@@ -411,7 +411,7 @@ AT_DATA([foo.cpp],
 }
 ]])
 
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
 AT_CHECK([./configure $configure_options], [], [ignore], [ignore])
 AT_CHECK([$MAKE], [], [ignore], [ignore])
diff --git a/tests/foreign.at b/tests/foreign.at
index b223d20..08cb8b1 100644
--- a/tests/foreign.at
+++ b/tests/foreign.at
@@ -122,7 +122,7 @@ copy-shtool:
 : >file1
 : >file2
 chmod +x file1
-: ${MAKE=make}
+: "${MAKE=make}"
 mkdir build-aux inst
 instdir=`pwd`/inst
 AT_CHECK_AUTOCONF
diff --git a/tests/fortran.at b/tests/fortran.at
index c723748..4397e35 100644
--- a/tests/fortran.at
+++ b/tests/fortran.at
@@ -107,7 +107,7 @@ AT_DATA([foo.f],
       end
 ]])
 
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
 AT_CHECK_CONFIGURE
 AT_CHECK([$MAKE], [], [ignore], [ignore])
@@ -147,7 +147,7 @@ AT_DATA([foo.f],
       end
 ]])
 
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([env ACLOCAL=true autoreconf -vi], [], [ignore], [ignore])
 AT_CHECK_CONFIGURE
 AT_CHECK([$MAKE], [], [ignore], [ignore])
@@ -240,7 +240,7 @@ int main(int argc, char *argv[])
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram])
 
@@ -321,7 +321,7 @@ int main (int argc, char *argv[])
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram])
 
@@ -400,7 +400,7 @@ int F77_MAIN (int argc, char *argv[])
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram], [], [output from C main
 dnl  some output from Fortran sources
@@ -482,7 +482,7 @@ int FC_MAIN (int argc, char *argv[])
 AT_CHECK_AUTOCONF
 AT_CHECK_AUTOHEADER
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram], [], [output from C main
 dnl  some output from Fortran sources
@@ -559,7 +559,7 @@ int main(int argc, char *argv[])
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram])
 
@@ -633,7 +633,7 @@ int main(int argc, char *argv[])
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./cprogram])
 AT_CLEANUP
@@ -718,7 +718,7 @@ end
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 
 AT_CLEANUP
@@ -754,7 +754,7 @@ end
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./prog])
 
@@ -792,7 +792,7 @@ end
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./prog])
 
@@ -830,7 +830,7 @@ C      fixed-form style comment
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./prog])
 
@@ -869,7 +869,7 @@ C      fixed-form style comment
 
 AT_CHECK_AUTOCONF
 AT_CHECK_CONFIGURE
-: ${MAKE=make}
+: "${MAKE=make}"
 AT_CHECK([$MAKE], [], [ignore], [ignore])
 dnl AT_CHECK([./prog])
 
@@ -933,7 +933,7 @@ EOF
 
     AT_CHECK_AUTOCONF
     AT_CHECK_CONFIGURE
-    : ${MAKE=make}
+    : "${MAKE=make}"
     AT_CHECK([$MAKE], [], [ignore], [ignore])
     dnl AT_CHECK([./prog])
     AT_CHECK([$MAKE clean], [], [ignore], [ignore])
diff --git a/tests/m4sh.at b/tests/m4sh.at
index 52ab4ee..de2bdc9 100644
--- a/tests/m4sh.at
+++ b/tests/m4sh.at
@@ -528,8 +528,8 @@ AT_CLEANUP
 ## Negated classes in globbing.  ##
 ## ----------------------------- ##
 
-# It is known that `[^...]' is not universally supported, but it is
-# unknown for `[!...]'.
+# According to http://www.in-ulm.de/~mascheck/bourne/, all shells with
+# functions also support `[!...]'.  But `[^...]' is not universally supported.
 
 AT_SETUP([Negated classes in globbing])
 AT_KEYWORDS([m4sh])
@@ -559,8 +559,7 @@ AT_CLEANUP
 ## Functions Support.  ##
 ## ------------------- ##
 
-# Hypothesis: the shell we are running, after having checked for
-# $LINENO support, supports functions.
+# All m4sh scripts require function support.
 
 AT_SETUP([Functions Support])
 AT_KEYWORDS([m4sh])
@@ -602,8 +601,7 @@ AT_CLEANUP
 ## Functions and return Support.  ##
 ## ------------------------------ ##
 
-# Hypothesis: the shell we are running, after having checked for
-# $LINENO support, supports functions, and the `return' keyword.
+# All m4sh scripts require working return within functions.
 
 AT_SETUP([Functions and return Support])
 AT_KEYWORDS([m4sh])
@@ -1275,6 +1273,9 @@ AS_INIT
 # Literals.
 dnl AS_VAR_SET_IF also covers AS_VAR_TEST_SET
 AS_VAR_SET_IF([foo], [echo oops]) && echo ok
+AS_VAR_IF([foo], [], [echo ok], [echo oops])
+foo=
+AS_VAR_SET_IF([foo], [echo ok])
 AS_VAR_SET([foo], ['\a  "weird" `value` with; $fun '\''characters
 ']) # 'font-lock
 AS_VAR_COPY([bar], [foo])
@@ -1292,6 +1293,9 @@ m4_ifdef([tmp], [echo oops])
 echo '===='
 num=1
 AS_VAR_SET_IF([foo$num], [echo oops]) && echo ok
+AS_VAR_IF([foo$num], [], [echo ok], [echo oops])
+foo1=
+AS_VAR_SET_IF([foo$num], [echo ok])
 AS_VAR_SET([foo$num], ['\a  "weird" `value` with; $fun '\''characters
 ']) # 'font-lock
 AS_VAR_COPY([bar], [foo$num])
@@ -1310,6 +1314,9 @@ m4_ifdef([tmp], [echo oops])
 # Indirects via command substitution.
 echo '===='
 AS_VAR_SET_IF([`echo foo3`], [echo oops]) && echo ok
+AS_VAR_IF([`echo foo3`], [], [echo ok], [echo oops])
+foo3=
+AS_VAR_SET_IF([`echo foo3`], [echo ok])
 AS_VAR_SET([`echo foo3`], ['\a  "weird" `value` with; $fun '\''characters
 ']) # 'font-lock
 AS_VAR_COPY([bar], [`echo foo3`])
@@ -1329,6 +1336,8 @@ m4_ifdef([tmp], [echo oops])
 
 AT_CHECK_M4SH
 AT_CHECK([$CONFIG_SHELL ./script], [], [[ok
+ok
+ok
 \a  "weird" `value` WITH; $fun 'characters
 -
 \a  "weird" `value` WITH; $fun 'characters
@@ -1338,6 +1347,8 @@ ok
 ok
 ====
 ok
+ok
+ok
 \a  "weird" `value` WITH; $fun 'characters
 -
 \a  "weird" `value` WITH; $fun 'characters-
@@ -1346,6 +1357,8 @@ ok
 ok
 ====
 ok
+ok
+ok
 \a  "weird" `value` WITH; $fun 'characters
 -
 \a  "weird" `value` WITH; $fun 'characters-
diff --git a/tests/tools.at b/tests/tools.at
index 167d68a..20e9037 100644
--- a/tests/tools.at
+++ b/tests/tools.at
@@ -1160,7 +1160,7 @@ AT_CLEANUP
 # -----------------------------
 
 AT_SETUP([autom4te preselections])
-: ${sleep='sleep 1'}   # Command to force different time stamps.
+: "${sleep='sleep 1'}" # Command to force different time stamps.
 # If this test should run on FAT file systems and older w32,
 # then setting $sleep correctly needs to be revisited.
 
diff --git a/tests/torture.at b/tests/torture.at
index 97cb5c6..a8a2aa1 100644
--- a/tests/torture.at
+++ b/tests/torture.at
@@ -1213,7 +1213,7 @@ all: f f1 f2
 
 AT_CHECK_AUTOCONF
 
-: ${MAKE=make}
+: "${MAKE=make}"
 
 # In place.
 AT_CHECK([./configure $configure_options], [], [ignore])


hooks/post-receive
-- 
GNU Autoconf source repository



reply via email to

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