# 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
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
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
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
# 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
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
END
mkdir subdir
- echo > subdir/Makefile.am # 'echo', not ':', for Solaris /bin/sh.
+ : > subdir/Makefile.am
test -z "$auxdir" || mkdir "$auxdir" || exit 99
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 || \
# 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
# 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
: 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; }
$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