diff options
-rw-r--r-- | configure.ac | 40 | ||||
-rwxr-xr-x | t/add-missing.tap | 6 | ||||
-rwxr-xr-x | t/ansi2knr-no-more.sh | 2 | ||||
-rw-r--r-- | t/ax/test-init.sh | 9 | ||||
-rwxr-xr-x | t/confh5.sh | 1 | ||||
-rwxr-xr-x | t/dist-auxfile.sh | 2 | ||||
-rwxr-xr-x | t/self-check-exit.tap | 17 | ||||
-rwxr-xr-x | t/tap-more.sh | 16 | ||||
-rwxr-xr-x | t/test-driver-custom-multitest-recheck2.sh | 2 | ||||
-rwxr-xr-x | t/uninstall-fail.sh | 20 |
10 files changed, 40 insertions, 75 deletions
diff --git a/configure.ac b/configure.ac index 79efc4187..a23b2ac63 100644 --- a/configure.ac +++ b/configure.ac @@ -303,32 +303,21 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL], [], [am_score=1; break]) _AM_CHECK_SHELL_FEATURE([$1], - [supports \${var@%:@glob}], - [v=a/b/c; test ${v@%:@*/} = b/c], + [supports \${var@%:@glob} and \${var%glob}], + [v=a/b/c \ + && test ${v@%:@*/} = b/c \ + && test ${v@%:@@%:@*/} = c \ + && test ${v%/*} = a/b \ + && test ${v%%/*} = a], [], [am_score=1; break]) _AM_CHECK_SHELL_FEATURE([$1], - [supports \${var@%:@@%:@glob}], - [v=a/b/c; test ${v@%:@@%:@*/} = c], - [], [am_score=1; break]) - - _AM_CHECK_SHELL_FEATURE([$1], - [supports \${var%glob}], - [v=a.b.c; test ${v%.*} = a.b], - [], [am_score=1; break]) - - _AM_CHECK_SHELL_FEATURE([$1], - [supports \${var%%glob}], - [v=a.b.c; test ${v%%.*} = a], - [], [am_score=1; break]) - - _AM_CHECK_SHELL_FEATURE([$1], - ["set -e" preserves exit traps], + [preserves exit traps with "set -e"], [set -e; trap 'exit $?' 0; (exit 77); exit 77], [], [am_score=1; break]) _AM_CHECK_SHELL_FEATURE([$1], - ["set -x" corrupts stderr], + [corrupts stderr with "set -x"], [(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1], [am_score=9], []) @@ -340,6 +329,11 @@ AC_DEFUN([_AM_CHECK_CANDIDATE_SHELL], [rm -f conftest-alias.sh], [rm -f conftest-alias.sh; am_score=1; break]) + _AM_CHECK_SHELL_FEATURE([$1], + [supports "test -e"], + [test -e configure && test -e . && test ! -e nonesuch], + [], [am_score=1; break]) + break done]) @@ -395,10 +389,6 @@ fi AC_ARG_VAR([AM_TEST_RUNNER_SHELL], [a sturdy POSIX shell for our testsuite]) -## ---------------------- ## -## Create output files. ## -## ---------------------- ## - ########################################################################### @@ -570,6 +560,10 @@ AC_SUBST([EXEEXT]) ########################################################################### +## ---------------------- ## +## Create output files. ## +## ---------------------- ## + AC_CONFIG_FILES([Makefile]) AC_CONFIG_LINKS([GNUmakefile:GNUmakefile]) diff --git a/t/add-missing.tap b/t/add-missing.tap index 0ba69708f..c47382b5f 100755 --- a/t/add-missing.tap +++ b/t/add-missing.tap @@ -99,11 +99,9 @@ check_ () # shared by its "subtests"). mkdir generic cd generic - # Use 'echo > ...', not ': > ...', here and below, as Solaris 10 /bin/sh - # might not execute the latter (the Autoconf manual gives more details). - echo > Makefile.am + : > Makefile.am if test $override = yes; then - echo > configure.ac + : > configure.ac else cp "$ocwd"/configure.stub configure.ac fi diff --git a/t/ansi2knr-no-more.sh b/t/ansi2knr-no-more.sh index 452abd381..5387d20fb 100755 --- a/t/ansi2knr-no-more.sh +++ b/t/ansi2knr-no-more.sh @@ -45,7 +45,7 @@ for opt in ansi2knr lib/ansi2knr; do AUTOMAKE_fails -Wnone grep "^Makefile\.am:1:.*$warn_rx" stderr # ansi2knr option in configure.ac - echo > Makefile.am # 'echo', not ':', for Solaris /bin/sh. + : > Makefile.am sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([$opt])|" configure.sav >configure.ac cat configure.ac # For debugging. rm -rf autom4te*.cache diff --git a/t/ax/test-init.sh b/t/ax/test-init.sh index e992d538f..78c8170f9 100644 --- a/t/ax/test-init.sh +++ b/t/ax/test-init.sh @@ -800,8 +800,8 @@ do priv_check_temp=priv-check.$$ touch $priv_check_temp && chmod a-w $priv_check_temp \ || framework_failure_ "creating unwritable file $priv_check_temp" - # Not a useless use of subshell: lesser shells like Solaris /bin/sh - # can exit if a builtin fails. + # Not a useless use of subshell: lesser shells might bail + # out if a builtin fails. overwrite_status=0 (echo foo >> $priv_check_temp) || overwrite_status=$? rm -f $priv_check_temp @@ -833,8 +833,8 @@ do ro_dir_temp=ro_dir.$$ mkdir $ro_dir_temp && chmod a-w $ro_dir_temp \ || framework_failure_ "creating unwritable directory $ro_dir_temp" - # Not a useless use of subshell: lesser shells like Solaris /bin/sh - # can exit if a builtin fails. + # Not a useless use of subshell: lesser shells might bail + # out if a builtin fails. create_status=0 (: > $ro_dir_temp/probe) || create_status=$? rm -rf $ro_dir_temp @@ -950,7 +950,6 @@ trap "fatal_ 'caught signal SIGTERM'" 15 # OTOH, at least these shells that do *not* exhibit that behaviour: # - modern version of the Almquist Shell (at least 0.5.5.1), on # both Solaris and GNU/Linux -# - Solaris 10 /bin/sh # - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux trap "fatal_ 'caught signal SIGQUIT'" 3 # Ignore further SIGPIPE in the trap code. This is required to avoid diff --git a/t/confh5.sh b/t/confh5.sh index 7da63fec6..354c88c32 100755 --- a/t/confh5.sh +++ b/t/confh5.sh @@ -31,7 +31,6 @@ cat > Makefile.am << 'END' test: distdir test -f $(distdir)/config.h.in test -f $(distdir)/include/config.h.in.in - : # Solaris Sh does not support 'test -e'. test ! -f $(distdir)/include/config.h.in test ! -r $(distdir)/include/config.h.in END diff --git a/t/dist-auxfile.sh b/t/dist-auxfile.sh index 6d130fb6b..21c100c77 100755 --- a/t/dist-auxfile.sh +++ b/t/dist-auxfile.sh @@ -59,7 +59,7 @@ END END mkdir subdir - echo > subdir/Makefile.am # 'echo', not ':', for Solaris /bin/sh. + : > subdir/Makefile.am test -z "$auxdir" || mkdir "$auxdir" || exit 99 diff --git a/t/self-check-exit.tap b/t/self-check-exit.tap index e78ca0b2f..4bc67104f 100755 --- a/t/self-check-exit.tap +++ b/t/self-check-exit.tap @@ -72,23 +72,8 @@ for sig in 1 2 13 15; do done : Non-existent program. -# Solaris 10 /bin/sh erroneously exit with success right away when the -# following three conditions are met at the same time: -# 1. the 'errexit' flag is active, -# 2. an exit trap is installed, and -# 3. a non-existing command is issued. -# Note that the non-existent command is issued as the last command to -# the shell in the next line; this is deliberate. -# FIXME: remove this workaround once we have a better configure-time -# determination of '$AM_TEST_RUNNER_SHELL'. -if $AM_TEST_RUNNER_SHELL -c 'set -e; trap "exit \$?" 0; non-existent-program'; then - maybe_todo=TODO reason="known Solaris /bin/sh bug" -else - maybe_todo="" reason="" -fi $AM_TEST_RUNNER_SHELL -c "$init non-existent-prog; :" "$dummy_test_script" -command_ok_ "command not found" -D "$maybe_todo" -r "$reason" \ - -- test $? -gt 0 +command_ok_ "command not found" -- test $? -gt 0 : Non-executable command. test -f Makefile && test ! -x Makefile || \ diff --git a/t/tap-more.sh b/t/tap-more.sh index b25ffce87..1556d7066 100755 --- a/t/tap-more.sh +++ b/t/tap-more.sh @@ -118,10 +118,7 @@ for try in 0 1; do # Success. # Use append mode here to avoid dropping output. See automake bug#11413. - # Also, use 'echo' here to "nullify" the previous contents of 'stdout', - # since Solaris 10 /bin/sh would try to optimize a ':' away after the - # first iteration, even if it is redirected. - echo " " >stdout + : >stdout $run_make check >>stdout || { cat stdout; exit 1; } cat stdout count_test_results total=6 pass=4 fail=0 xpass=0 xfail=1 skip=1 error=0 @@ -138,15 +135,10 @@ for try in 0 1; do # Failure. - # Use 'echo' here, since Solaris 10 /bin/sh would try to optimize - # a ':' away after the first iteration, even if it is redirected. - echo dummy > not-skip - echo dummy > bail-out + : > not-skip + : > bail-out # Use append mode here to avoid dropping output. See automake bug#11413. - # Also, use 'echo' here to "nullify" the previous contents of 'stdout', - # since Solaris 10 /bin/sh would try to optimize a ':' away after the - # first iteration, even if it is redirected. - echo " " >stdout + : >stdout $run_make check >>stdout && { cat stdout; exit 1; } cat stdout count_test_results total=7 pass=4 fail=1 xpass=0 xfail=1 skip=0 error=1 diff --git a/t/test-driver-custom-multitest-recheck2.sh b/t/test-driver-custom-multitest-recheck2.sh index eab6aacc8..9d8a233c0 100755 --- a/t/test-driver-custom-multitest-recheck2.sh +++ b/t/test-driver-custom-multitest-recheck2.sh @@ -144,8 +144,6 @@ for vpath in : false; do : No need to re-run a.test anymore, but c.test should be rerun, : as it contained an XPASS. And this time, make it fail with : an hard error. - # Use 'echo' here, since Solaris 10 /bin/sh would try to optimize - # a ':' away after the first iteration, even if it is redirected. echo dummy > c.err env TEST_LOGS='a.log c.log' $MAKE -e recheck >stdout \ && { cat stdout; exit 1; } diff --git a/t/uninstall-fail.sh b/t/uninstall-fail.sh index 8f160c886..230832cb3 100755 --- a/t/uninstall-fail.sh +++ b/t/uninstall-fail.sh @@ -76,21 +76,21 @@ chmod a-rwx $inst/share $MAKE uninstall >output 2>&1 && { cat output; exit 1; } cat output # -# Some shells, like Solaris 10 /bin/sh and /bin/ksh, do not report -# the name of the 'cd' builtin upon a chdir error: +# Some shells, like Solaris 10 /bin/ksh and /usr/xpg4/bin/sh, do not +# report the name of the 'cd' builtin upon a chdir error: # -# $ /bin/sh -c 'cd /none' -# /bin/sh: /none: does not exist +# $ /bin/ksh -c 'cd /none' +# /bin/ksh: /none: not found # -# In addition, some shells, like Solaris 10 /usr/xpg4/bin/sh, also print -# a line number in the error message *if the command contains newlines*: +# and also print a line number in the error message *if the command +# contains newlines*: # -# $ /usr/xpg4/bin/sh -c 'cd unreadable' -# /usr/xpg4/bin/sh: unreadable: permission denied -# $ /usr/xpg4/bin/sh -c '\ +# $ /bin/ksh -c 'cd unreadable' +# /bin/ksh: unreadable: permission denied +# $ /bin/ksh -c '\ # > \ # > cd unreadable' -# /usr/xpg4/bin/sh[3]: unreadable: permission denied +# /bin/ksh[3]: unreadable: permission denied # $EGREP "(cd|sh)(\[[0-9]*[0-9]\])?: .*$inst/share" output |