From: Akim Demaille Date: Wed, 18 Oct 2000 12:42:20 +0000 (+0000) Subject: * tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is X-Git-Tag: autoconf-2.50~556 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=c27236bff57b5f613ffd027e9749b1bf5a78e75f;p=thirdparty%2Fautoconf.git * tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is enough. Use grep to check the presence of a string in a stream. * m4/atconfig.m4: Quote. --- diff --git a/ChangeLog b/ChangeLog index 9216ab45f..630dbda45 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-10-18 Akim Demaille + + * tests/atgeneral.m4 (AT_INIT): Avoid foo="`bar`", foo=`bar` is + enough. + Use grep to check the presence of a string in a stream. + * m4/atconfig.m4: Quote. + 2000-10-18 Akim Demaille * acgeneral.m4 (_AC_SHELL_DIRNAME): Quote the `sed' fall back. diff --git a/lib/autotest/general.m4 b/lib/autotest/general.m4 index 12e45d906..941b7e804 100644 --- a/lib/autotest/general.m4 +++ b/lib/autotest/general.m4 @@ -171,7 +171,7 @@ fi # over files, the full test suite cleans up both before and after test groups. # Snippet )4 -if test -n "`$1 --version | sed -n s/$at_package.*$at_version/OK/p`"; then +if $1 --version | grep "$at_package.*$at_version" >/dev/null; then at_banner="Testing suite for $at_package, version $at_version" at_dashes=`echo $at_banner | sed s/./=/g` echo "$at_dashes" @@ -213,9 +213,9 @@ else test -z "$at_silent" && echo 'at_verbose=:' sed -n "/^[#] Snippet (4/,/^[#] Snippet )4/p" $[0] sed -n "/^[#] Snippet (c$at_group(/,/^[#] Snippet )c$at_group)/p" $[0] - at_desc="`sed -n \ + at_desc=`sed -n \ '/^[#] Snippet (d'$at_group'(/,/^[#] Snippet )d'$at_group')/p' $[0] \ - | sed -n '2s/^[#] //p'`" + | sed -n '2s/^[#] //p'` echo 'if $at_verbose; then' echo ' at_banner="$[0]: '$at_desc'"' echo ' at_dashes=`echo $at_banner | sed s/./=/g`' diff --git a/m4/atconfig.m4 b/m4/atconfig.m4 index 91d008a7e..839e54891 100644 --- a/m4/atconfig.m4 +++ b/m4/atconfig.m4 @@ -1,11 +1,13 @@ -## ----------------------## +## ----------------------## -*- Autoconf -*- ## Prepare for testing. ## ## ----------------------## +#serial 2 + # Single argument says where are built sources to test, relative to the # built test directory. Maybe omitted if the same (flat distribution). -AC_DEFUN(AT_CONFIG, -[AT_TESTPATH=ifelse($1, , ., $1) +AC_DEFUN([AT_CONFIG], +[AT_TESTPATH=ifelse([$1], [], [.], [$1]) AC_SUBST(AT_TESTPATH) ]) diff --git a/tests/atgeneral.m4 b/tests/atgeneral.m4 index 12e45d906..941b7e804 100644 --- a/tests/atgeneral.m4 +++ b/tests/atgeneral.m4 @@ -171,7 +171,7 @@ fi # over files, the full test suite cleans up both before and after test groups. # Snippet )4 -if test -n "`$1 --version | sed -n s/$at_package.*$at_version/OK/p`"; then +if $1 --version | grep "$at_package.*$at_version" >/dev/null; then at_banner="Testing suite for $at_package, version $at_version" at_dashes=`echo $at_banner | sed s/./=/g` echo "$at_dashes" @@ -213,9 +213,9 @@ else test -z "$at_silent" && echo 'at_verbose=:' sed -n "/^[#] Snippet (4/,/^[#] Snippet )4/p" $[0] sed -n "/^[#] Snippet (c$at_group(/,/^[#] Snippet )c$at_group)/p" $[0] - at_desc="`sed -n \ + at_desc=`sed -n \ '/^[#] Snippet (d'$at_group'(/,/^[#] Snippet )d'$at_group')/p' $[0] \ - | sed -n '2s/^[#] //p'`" + | sed -n '2s/^[#] //p'` echo 'if $at_verbose; then' echo ' at_banner="$[0]: '$at_desc'"' echo ' at_dashes=`echo $at_banner | sed s/./=/g`'