# along with this program. If not, see <http://www.gnu.org/licenses/>.
AC_PREREQ([2.69])
-AC_INIT([GNU Automake], [1.12.1a], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.12a], [bug-automake@gnu.org])
AC_CONFIG_SRCDIR([automake.in])
AC_CONFIG_AUX_DIR([lib])
dnl testsuite, so also use 'no-dependencies' and 'no-define' among
dnl the automake options to avoid bloating and potential problems.
AM_INIT_AUTOMAKE([dist-xz filename-length-max=99 color-tests
- parallel-tests silent-rules no-define no-dependencies])
+ no-define no-dependencies])
## Keep this on a line of its own, since it must be found and processed
## by the 'update-copyright' rule in our Makefile.
# $AUTOMAKE and $ACLOCAL are always run after a "cd $top_srcdir",
# hence '.' is really what we want for perllibdir, libdir, and acdir.
-ACLOCAL="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" --acdir=m4 -I m4"
-AUTOMAKE="perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" --libdir=lib"
+# Use '-I' with aclocal so that our own *.m4 files in m4/ gets included,
+# not copied, in aclocal.m4.
+ACLOCAL="\
+ perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/aclocal\" \
+ --automake-acdir=m4 --system-acdir=m4/acdir -I m4"
+AUTOMAKE="\
+ perllibdir=\"`pwd`/lib$PATH_SEPARATOR./lib\" \"`pwd`/automake\" \
+ --libdir=lib"
AC_PATH_PROG([PERL], [perl])
if test -z "$PERL"; then
# following tests, but some users were unable to figure out that their
# installation was broken since --version appeared to work.
-required_autoconf_version=2.62
+required_autoconf_version=2.65
AC_CACHE_CHECK([whether autoconf is installed], [am_cv_autoconf_installed],
[if AM_RUN_LOG([$am_AUTOCONF --version]);
then
# We require that the shell can correctly trap EXIT when 'set -e' is in
# effect (OSF1/Tru64 sh failed to do so, see commit v1.10b-52-g9fe8259).
#
+ # We want to able to define shell aliases with the same name of shell
+ # builtins.
+ #
# We also prefer shells that, when 'set -x' is in effect, do not also
# redirect traces upon stderr redirections. For example,
# $ set -x; echo x 2>file
[(set -x; P=1 true 2>&3) 3>&1 2>/dev/null | grep P=1],
[am_score=9], [])
+ echo 'alias false=echo' > conftest-alias.sh
+ echo 'false && test "$(false 97)" = 97' >> conftest-alias.sh
+ _AM_CHECK_SHELL_FEATURE([$1],
+ [supports alias named like shell builtins],
+ [. ./conftest-alias.sh],
+ [rm -f conftest-alias.sh],
+ [rm -f conftest-alias.sh; am_score=1; break])
+
break
done])
# guaranteed to work on my machine.
syntax_check_rules = \
$(sc_tests_plain_check_rules) \
-sc_test_names \
sc_diff_automake_in_automake \
sc_diff_aclocal_in_automake \
sc_perl_syntax \
sc_perl_local \
sc_AMDEP_TRUE_in_automake_in \
sc_tests_make_without_am_makeflags \
+$(sc_obsolete_requirements_rules) \
sc_tests_obsolete_variables \
sc_tests_here_document_format \
sc_tests_command_subst \
sc_tabs_in_texi \
sc_at_in_texi
-## Look for test whose names can cause spurious failures when used as
-## first argument to AC_INIT (chiefly because they might contain an
-## m4/m4sugar builtin or macro name).
-m4_builtins = \
- __gnu__ \
- __unix__ \
- bpatsubst \
- bregexp \
- builtin \
- changecom \
- changequote \
- changeword \
- debugfile \
- debugmode \
- decr \
- define \
- defn \
- divert \
- divnum \
- dnl \
- dumpdef \
- errprint \
- esyscmd \
- eval \
- format \
- ifdef \
- ifelse \
- include \
- incr \
- index \
- indir \
- len \
- m4exit \
- m4wrap \
- maketemp \
- mkstemp \
- patsubst \
- popdef \
- pushdef \
- regexp \
- shift \
- sinclude \
- substr \
- symbols \
- syscmd \
- sysval \
- traceoff \
- traceon \
- translit \
- undefine \
- undivert
-sc_test_names:
- @m4_builtin_rx=`echo $(m4_builtins) | sed 's/ /|/g'`; \
- m4_macro_rx="\\<($$m4_builtin_rx)\\>|\\<_?(A[CUMHS]|m4)_"; \
- if { \
- for t in $(xtests); do echo $$t; done \
- | LC_ALL=C grep -E "$$m4_macro_rx"; \
- }; then \
- echo "the names of the tests above can be problematic" 1>&2; \
- echo "Avoid test names that contain names of m4 macros" 1>&2; \
- exit 1; \
- fi
-
## These check avoids accidental configure substitutions in the source.
## There are exactly 9 lines that should be modified from automake.in to
## automake, and 10 lines that should be modified from aclocal.in to
exit 1; \
else :; fi
+## Look out for obsolete requirements specified in the test cases.
+sc_obsolete_requirements_rules = sc_no_texi2dvi-o sc_no_makeinfo-html
+modern-requirement.texi2dvi-o = texi2dvi
+modern-requirement.makeinfo-html = makeinfo
+
+$(sc_obsolete_requirements_rules): sc_no_% :
+ @if grep -E 'required=.*\b$*\b' $(xtests); then \
+ echo "Requirement '$*' is obsolete and shouldn't" \
+ "be used anymore." >&2; \
+ echo "You should use '$(modern-requirement.$*)' instead." >&2; \
+ exit 1; \
+ fi
+
## Tests should never call some programs directly, but only through the
## corresponding variable (e.g., '$MAKE', not 'make'). This will allow
## the programs to be overridden at configure time (for less brittleness)
exit 1; \
fi
- ## Tests should never call exit directly, but use Exit.
- ## This is so that the exit status is transported correctly across the 0 trap.
- ## Ignore comments and our testsuite's own self tests.
+ ## Tests should no more call 'Exit', just 'exit'. That's because we
+ ## now have in place a better workaround to ensure the exit status is
+ ## transported correctly across the exit trap.
sc_tests_Exit_not_exit:
- @found=false; for file in $(xtests); do \
- case $$file in */self-check-*) continue;; esac; \
- res=`sed -n -e '/^#/d' -e '/<<.*END/,/^END/b' -e '/<<.*EOF/,/^EOF/b' \
- -e '/exit [$$0-9]/p' $$file`; \
- if test -n "$$res"; then \
- echo "$$file:$$res"; \
- found=true; \
- fi; \
- done; \
- if $$found; then \
- echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 1>&2; \
+ @if grep 'Exit' $(xtests) $(xdefs) | grep -Ev '^[^:]+: *#' | grep .; then \
+ echo "Use 'exit', not 'Exit'; it's obsolete now." 1>&2; \
exit 1; \
fi
## Use AUTOMAKE_fails when appropriate
sc_tests_automake_fails:
- @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*[eE]xit'; then \
+ @if grep -v '^#' $(xtests) | grep '\$$AUTOMAKE.*&&.*exit'; then \
echo 'Use AUTOMAKE_fails + grep to catch automake failures in the above tests.' 1>&2; \
exit 1; \
fi
# line breaking in the use of AC_OUTPUT. Synthesised by a bunch
# of older tests (referenced below).
- . ./defs || Exit 1
+ . ./defs || exit 1
plan_ 22
rm -f configure.ac depcomp # Not required.
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-
# -----------------------------------------------------------------------
# Test for bug reported by François Pinard.
}
acoutbs_check 1 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutbs1], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile \
zot)
END
acoutbs_check 2 << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_ARG_PROGRAM
-AC_PROG_INSTALL
-AC_PROG_MAKE_SET
+AC_INIT([acoutbs2], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(\
Makefile \
zot
cd acoutnoq
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutnoq], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT(Makefile, [true])
END
cd acoutpt
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutpt], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile], [true])
END
cd acoutqnl
cat > configure.ac << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([acoutqnl], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile],
[echo zardoz has spoken])
END
# -----------------------------------------------------------------------
# And we're done.
- Exit 0
+ exit 0
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test aclocal's '--acdir', '--automake-acdir' and '--system-acdir'
-# options. Also check that stuff in the automake acdir takes precedence
-# over stuff in the system acdir.
+# Test aclocal's '--automake-acdir' and '--system-acdir' options. Also
+# check that stuff in the automake acdir takes precedence over stuff in
+# the system acdir.
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir am sys
$AUTOCONF --force
$FGREP 'fake--init--automake' configure
$FGREP 'am--macro' configure
- $FGREP 'my--macro' configure && Exit 1 # Just to be sure.
+ $FGREP 'my--macro' configure && exit 1 # Just to be sure.
-rm -rf autom4te*.cache
-
-# Obsolescent '--acdir' option.
-$ACLOCAL -Wobsolete --acdir am 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep '.*--acdir.*deprecated' stderr
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir am
-$AUTOCONF --force
-$FGREP 'fake--init--automake' configure
-$FGREP 'am--macro' configure
-
-rm -rf autom4te*.cache
-
-$ACLOCAL -Wno-obsolete --acdir sys 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep 'macro .*AM_INIT_AUTOMAKE.* not found' stderr
-
:
# Make sure autoconf version checks in aclocal.m4 are robust.
am_create_testdirs=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > configure.ac <<END
m4_define([AC_AUTOCONF_VERSION], [9999a])
: > Makefile.am
$ACLOCAL
- $AUTOCONF 2>stderr || { cat stderr >&2; Exit 1; }
+ $AUTOCONF 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for' stderr
cmp configure.ac configure.tmp && fatal_ 'failed to edit configure.ac'
mv -f configure.tmp configure.ac
- $MAKE 2>stderr || { cat stderr >&2; Exit 1; }
+ $MAKE 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for autoconf 9999a' stderr
# Check precedence rules for ACLOCAL_PATH.
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > configure.ac << 'END'
AC_INIT([foo], [1.0])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
FOO_MACRO
BAR_MACRO
AC_PROG_LIBTOOL
$FGREP 'am__api_version' configure
# A final sanity check.
- $FGREP '::fail' configure && Exit 1
+ $FGREP '::fail' configure && exit 1
:
# Test on aclocal's '--print-ac-dir' option.
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
$ACLOCAL --print-ac-dir
test "$($ACLOCAL --print-ac-dir)" = "$am_system_acdir"
-$ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir
-test "$($ACLOCAL -Wno-obsolete --acdir foo --print-ac-dir)" = foo
-
$ACLOCAL --system-acdir /bar --print-ac-dir
test "$($ACLOCAL --system-acdir /bar --print-ac-dir)" = /bar
# Test to make sure there are no spurious acinclude warnings.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_DEFUN([AM_INIT_GUILE_MODULE], [
+AM_INIT_AUTOMAKE([dist-xz])
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
END
- $ACLOCAL >output 2>&1 || { cat output; Exit 1; }
+ $ACLOCAL >output 2>&1 || { cat output; exit 1; }
cat output
test ! -s output
# Test AM_MISSING_PROG.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac <<'END'
AM_MISSING_PROG([NO_SUCH_COMMAND], [am-none-none])
e = $@-stderr
debug_info = grep . $@-stdout $@-stderr
-status_is = $(debug_info); echo $@: st=$$st; : test $$st -eq
+status_is = $(debug_info); echo $@: st=$$st; test $$st -eq
w_mis = 'am-none-none' is needed, and is missing on your system
w_old = 'am-exit-63' is needed, and is probably too old
-# FIXME: make this test stricter w.r.t. the exit statuses once
-# FIXME: we are merged to master!
test1:
st=0; $(NO_SUCH_COMMAND) >$o 2>$e || st=$$?; $(status_is) 127
grep "^WARNING: $(w_mis)" $e
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that automake warns against old-style usages of AM_INIT_AUTOMAKE
-# (i.e., calls with two or three arguments).
+# Check that automake error out (with an helpful error message) against
+# old-style usages of AM_INIT_AUTOMAKE (i.e., calls with two or three
+# arguments).
- . ./defs || Exit 1
+ . ./defs || exit 1
-warn_rx='AM_INIT_AUTOMAKE.* two-.* three-arguments form.*deprecated'
+warn_rx='AM_INIT_AUTOMAKE.* old-style two-.* three-arguments form.*unsupported'
+
+$ACLOCAL
+mv aclocal.m4 aclocal.sav
cat > configure.ac <<'END'
AC_INIT([Makefile.am])
AC_CONFIG_FILES([Makefile])
END
-$ACLOCAL
-
do_check()
{
rm -rf autom4te*.cache
- for cmd in "$AUTOCONF" "$AUTOMAKE"; do
- $cmd -Werror -Wnone -Wobsolete 2>stderr && { cat stderr; exit 1; }
+ for cmd in "$ACLOCAL" "$AUTOCONF" "$AUTOMAKE"; do
+ cp aclocal.sav aclocal.m4
- $cmd -Wnone -Wno-error 2>stderr && { cat stderr; Exit 1; }
++ $cmd -Wnone -Wno-error 2>stderr && { cat stderr; exit 1; }
cat stderr >&2
grep "^configure\.ac:2:.*$warn_rx" stderr
- $cmd -Werror -Wall -Wno-obsolete || exit 1
done
}
# Auxiliary script for tests on TAP support: checking testsuite summary.
- . ./defs || Exit 1
+ . ./defs || exit 1
br='============================================================================'
cat > configure.ac <<END
AC_INIT([GNU AutoTAP], [5.12], [bug-automake@gnu.org])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
END
$make_cmd check > stdout || st=$?
cat stdout
if test $expect_failure = yes; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
fi
$PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
else
compare=diff
fi
- $compare summary.exp summary.got || Exit 1
+ $compare summary.exp summary.got || exit 1
}
if test $use_colors = yes; then
# Lots of non-failures (300 per kind).
(cat tap && cat tap && cat tap) > all.test
- test $(wc -l <all.test) -eq 900 || Exit 99 # Sanity check.
+ test $(wc -l <all.test) -eq 900 || exit 99 # Sanity check.
echo 1..900 >> all.test # Test plan.
do_check --pass <<END
$success_header
# 1 failure and lots of non-failures means failure.
(cat tap && echo "not ok" && cat tap) > all.test
- test $(wc -l <all.test) -eq 601 || Exit 99 # Sanity check.
+ test $(wc -l <all.test) -eq 601 || exit 99 # Sanity check.
echo 1..601 >> all.test # Test plan.
do_check --fail <<END
$failure_header
# 1 error and lots of non-failures means failure.
(cat tap && sed 30q tap && echo 'Bail out!') > all.test
- test $(wc -l <all.test) -eq 331 || Exit 99 # Sanity check.
+ test $(wc -l <all.test) -eq 331 || exit 99 # Sanity check.
echo 1..331 >> all.test # Test plan.
do_check --fail <<END
$failure_header
esac
}
- # This is used in 'Exit' and in the exit trap. See comments in the latter
- # for more information,
+ # This is used in '_am_exit' and in the exit trap. See comments in
+ # the latter for more information.
am__test_skipped=no
# We use a trap below for cleanup. This requires us to go through
# hoops to get the right exit status transported through the signal.
- # So use "Exit STATUS" instead of "exit STATUS" inside of the tests.
# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
- # sh inside this function.
- Exit ()
+ # sh inside this function (FIXME: is this still relevant now that we
+ # require a POSIX shell?).
+ _am_exit ()
{
set +e
# See comments in the exit trap for the reason we do this.
test 77 = $1 && am__test_skipped=yes
- (exit $1); exit $1
+ # Spurious escaping to ensure we do not call our 'exit' alias.
+ (\exit $1); \exit $1
}
+ alias exit=_am_exit
if test $am_using_tap = yes; then
am_funcs_file=tap-functions.sh
if test -f "$am_testauxdir/$am_funcs_file"; then
. "$am_testauxdir/$am_funcs_file" || {
echo "$me: error sourcing $am_testauxdir/$am_funcs_file" >&2
- Exit 99
+ exit 99
}
else
echo "$me: $am_testauxdir/$am_funcs_file not found" >&2
- Exit 99
+ exit 99
fi
unset am_funcs_file
cat stderr >&2
cat stdout
if test $am_using_tap != yes; then
- test $am__got_rc -eq $am__exp_rc || Exit 1
+ test $am__got_rc -eq $am__exp_rc || exit 1
return
fi
if test -z "$am__desc"; then
grep_configure_help ()
{
./configure --help > am--all-help \
- || { cat am--all-help; Exit 1; }
+ || { cat am--all-help; exit 1; }
cat am--all-help
extract_configure_help "$1" am--all-help > am--our-help \
- || { cat am--our-help; Exit 1; }
+ || { cat am--our-help; exit 1; }
cat am--our-help
- $EGREP "$2" am--our-help || Exit 1
+ $EGREP "$2" am--our-help || exit 1
}
# using_gmake
makedepend -f- \
|| skip_all_ "required program 'makedepend' not available"
;;
- makeinfo-html)
- # Make sure we have makeinfo, and it understands '--html'.
- echo "$me: running makeinfo --html --version"
- makeinfo --html --version \
- || skip_all_ "cannot find a makeinfo program that groks" \
- "the '--html' option"
- ;;
mingw)
uname_s=$(uname -s || echo UNKNOWN)
echo "$me: system name: $uname_s"
skip_all_ "TeX is required, but it wasn't found by configure"
fi
;;
- texi2dvi-o)
- # Texi2dvi supports '-o' since Texinfo 4.1.
- echo "$me: running texi2dvi -o /dev/null --version"
- texi2dvi -o /dev/null --version \
- || skip_all_ "required program 'texi2dvi' not available"
- ;;
lex)
test x"$LEX" = x"false" && skip_all_ "lex not found or disabled"
export LEX
am_keeping_testdirs || rm_rf_ $testSubDir
set +x
echo "$me: exit $exit_status"
- exit $exit_status
+ # Spurious escaping to ensure we do not call our "exit" alias.
+ \exit $exit_status
' 0
trap "fatal_ 'caught signal SIGHUP'" 1
trap "fatal_ 'caught signal SIGINT'" 2
{
echo "AC_INIT([$me], [1.0])"
if test x"$am_serial_tests" = x"yes"; then
- echo "AM_INIT_AUTOMAKE"
+ echo "AM_INIT_AUTOMAKE([serial-tests])"
else
- echo "AM_INIT_AUTOMAKE([parallel-tests])"
+ echo "AM_INIT_AUTOMAKE"
fi
echo "AC_CONFIG_FILES([Makefile])"
} >configure.ac || framework_failure_ "creating configure.ac skeleton"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check the testsuite summary with the parallel-tests harness. This
+# Check the testsuite summary with the parallel test harness. This
# script is meant to be sourced by other test script, so that it can
# be used to check different scenarios (colorized and non-colorized
# testsuite output, packages with and without bug-report addresses,
# testsuites in subdirectories, ...)
- . ./defs || Exit 1
+ . ./defs || exit 1
case $use_colors in
yes)
# Forced colorization should take place also with non-ANSI
# terminals; hence this setting.
TERM=dumb; export TERM
- am_opts='parallel-tests color-tests'
+ am_opts='color-tests'
;;
no)
- am_opts='parallel-tests'
+ am_opts=''
;;
*)
fatal_ "invalid use_colors='$use_colors'";;
eval "env $tests $xfail_tests \$MAKE -e check > stdout || st=\$?"
cat stdout
if $expect_failure; then
- test $st -gt 0 || Exit 1
+ test $st -gt 0 || exit 1
else
- test $st -eq 0 || Exit 1
+ test $st -eq 0 || exit 1
fi
$PERL "$am_testauxdir"/extract-testsuite-summary.pl stdout >summary.got \
|| fatal_ "cannot extract testsuite summary"
else
compare=diff
fi
- $compare summary.exp summary.got || Exit 1
+ $compare summary.exp summary.got || exit 1
}
br='============================================================================'
# Backward-compatibility: AC_OUTPUT with arguments.
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
: > Makefile.am
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that the testsuite driver (either with or without the
-# parallel-tests option enabled) exports the 'srcdir' value in the
+# serial-tests option enabled) exports the 'srcdir' value in the
# environment of the tests. This is documented in the manual.
# For gen-testsuite-part: ==> try-with-serial-tests <==
- . ./defs || Exit 1
+ . ./defs || exit 1
show_info ()
{
cd ../BuildDir
../SrcDir/configure
- $MAKE check || { show_info; Exit 1; }
+ $MAKE check || { show_info; exit 1; }
show_info
:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' doesn't get needlessly
-# installed or referenced when the 'parallel-tests' option is not
-# used.
+# installed or referenced when the 'serial-tests' option is used.
am_serial_tests=yes
- . ./defs || Exit 1
+ . ./defs || exit 1
-echo 'TESTS = foo.test' > Makefile.am
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = serial-tests
+TESTS = foo.test
+END
$ACLOCAL
for opts in '' '-a' '--add-missing --copy'; do
$AUTOMAKE $opts
- $FGREP 'test-driver' Makefile.in && Exit 1
- find . | $FGREP 'test-driver' && Exit 1
+ $FGREP 'test-driver' Makefile.in && exit 1
+ find . | $FGREP 'test-driver' && exit 1
: For shells with busted 'set -e'.
done
# Check @substituted@ TESTS.
# Note that in this test, we rely on the .test extension for the
-# substituted names: this is necessary for parallel-tests.
+# substituted names: this is necessary for the parallel harness.
# See also sister test 'check-subst-prog.test'.
# For gen-testsuite-part: ==> try-with-serial-tests <==
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_SUBST([script_tests], ['subst-pass-script.sh subst-xfail-script.sh'])
# well as in builddir, and that is prefers those in the builddir.
# For gen-testsuite-part: ==> try-with-serial-tests <==
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
END
chmod a+x bar.test
- $MAKE check >out 2>&1 || { cat out; Exit1; }
+ $MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^PASS: .*foo\.test *$' out
else
- grep '\.\./foo' out && Exit 1
+ grep '\.\./foo' out && exit 1
grep '^PASS: foo\.test *$' out
fi
grep '^PASS: bar\.test *$' out
rm -f test-suite.log foo.log bar.log
- FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; Exit1; }
+ FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 && { cat out; exit 1; }
cat out
-# The simple-tests driver does not strip VPATH components from
-# the name of the test, but the parallel-tests driver should.
+# The serial test driver does not strip VPATH components from
+# the name of the test, but the parallel driver should.
if test x"$am_serial_tests" = x"yes"; then
grep '^FAIL: .*foo\.test *$' out
else
- grep '\.\./foo' out && Exit 1
+ grep '\.\./foo' out && exit 1
grep '^FAIL: foo\.test *$' out
fi
grep '^PASS: bar\.test *$' out
# Check that if the same test is present in srcdir and builddir,
# the one in builddir is preferred.
cp bar.test foo.test
- FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; Exit1; }
+ FOO_EXIT_STATUS=1 $MAKE check >out 2>&1 || { cat out; exit 1; }
cat out
grep '^PASS: foo\.test *$' out
grep '^PASS: bar\.test *$' out
# For gen-testsuite-part: ==> try-with-serial-tests <==
required='cc native'
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
./configure
AM_COLOR_TESTS=always $MAKE check >stdout 2>stderr &&
- { cat stdout; cat stderr >&2; Exit 1; }
+ { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
grep 'XPASS.* foo$' stdout
grep '^[^X]*PASS.* sub/bar' stdout
grep '^[^X]*FAIL.* baz' stdout
grep 'XFAIL.* sub/baz' stdout
-# 'parallel-tests' should not add circular dependencies.
+# The parallel test driver should cause circular dependencies.
# Look for known warnings from a couple of 'make' implementations.
- grep -i 'circular.*dependency' stderr && Exit 1
- grep -i 'graph cycles' stderr && Exit 1
+ grep -i 'circular.*dependency' stderr && exit 1
+ grep -i 'graph cycles' stderr && exit 1
$MAKE distclean
mkdir build
cd build
../configure
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
# Note: we are not grepping for the space in the lines from the 'foo'
# tests, due to the Solaris make VPATH rewriting (if we fix that, we
# Make sure comment for conditional variables are output near the
# corresponding conditional definitions.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac <<'EOF'
AM_CONDITIONAL([COND], [true])
}' Makefile.in |
grep '@COND_FALSE@VAR = bar'
-:
+:
# mixed source objects.
# Matthew D. Langston <langston@SLAC.Stanford.EDU>
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_CC
$AUTOMAKE
# Look for the macros at the beginning of rules.
-$FGREP "$tab\$(COMPILE)" Makefile.in
-$FGREP "$tab\$(CXXCOMPILE)" Makefile.in
-$FGREP "$tab\$(F77COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CC)\$(COMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_CXX)\$(CXXCOMPILE)" Makefile.in
+$FGREP "$tab\$(AM_V_F77)\$(F77COMPILE)" Makefile.in
:
# Test to make sure config headers in subdirectories are cleaned.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([sub/config.h:sub/config.hin])
+AC_CONFIG_HEADERS([sub/config.h:sub/config.hin])
AC_OUTPUT
END
$MAKE clean
test -f sub/stamp-h1
$MAKE distclean
- test -f sub/stamp-h1 && Exit 1
+ test -f sub/stamp-h1 && exit 1
:
# Test to make sure config.h works in a subdir.
# Report from Alexandre Oliva.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_OUTPUT
END
# Use AM_CONFIG_HEADER(subdir/config.h) to place configuration
# header in subdirectory and observe that it is not included.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([include/Makefile])
-AM_CONFIG_HEADER([include/config.h])
+AC_CONFIG_HEADERS([include/config.h])
AC_PROG_CC
END
# idea is that if config.h is in a subdir, and there is no Makefile in
# that subdir, then we want to build config.h as the top level.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([subdir/config.h])
+AC_CONFIG_HEADERS([subdir/config.h])
AC_OUTPUT
END
# Test to make sure several config headers are allowed.
# See also sister "semantic" test 'confh8.test'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([config.h two.h])
+AC_CONFIG_HEADERS([config.h two.h])
END
: > Makefile.am
# Test to make sure several config headers are allowed.
# See also sister "minimalistic" test 'confh7.test'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-AM_CONFIG_HEADER([one.h two.h])
+AC_CONFIG_HEADERS([one.h two.h])
AC_OUTPUT
END
# Test to make sure config.h can be in subdir.
# Also, make sure config.h is properly rebuilt.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([subdir/Makefile])
-AM_CONFIG_HEADER([subdir/config.h:subdir/config.hin])
+AC_CONFIG_HEADERS([subdir/config.h:subdir/config.hin])
AC_OUTPUT
END
#
# cd $(top_builddir) && $(SHELL) ./config.status subdir/config.h
($FGREP 'subdir/config.h' subdir/Makefile.in |
- $FGREP -v 'cd $(top_builddir)') && Exit 1
+ $FGREP -v 'cd $(top_builddir)') && exit 1
$AUTOCONF
./configure
# That feature will be removed in the next major Automake release.
# See automake bug#11034.
- . ./defs || Exit 1
+ . ./defs || exit 1
-warn_rx='support for Cygnus.*trees.*deprecated'
-
-cat >> configure.ac <<'END'
-AC_PROG_CC
-AM_MAINTAINER_MODE
-END
+warn_rx='support for Cygnus.*trees.*removed'
$ACLOCAL
-$AUTOCONF
-
-: > Makefile.am
-# 'cygnus' option from command line
-$AUTOMAKE --cygnus -Wno-obsolete
-AUTOMAKE_fails --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete --cygnus
-grep "^automake.*: .*$warn_rx" stderr
-AUTOMAKE_fails --cygnus -Wnone -Wobsolete
-grep "^automake.*: .*$warn_rx" stderr
-
-rm -rf autom4te*.cache
+# Use of 'cygnus' option must raise an unconditional error, not a
+# warning.
+AUTOMAKE="$am_original_AUTOMAKE -Wnone -Wno-error"
# 'cygnus' option in Makefile.am
echo "AUTOMAKE_OPTIONS = cygnus" > Makefile.am
-cat Makefile.am # For debugging.
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^Makefile\.am:1:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^Makefile\.am:1:.*$warn_rx" stderr
rm -rf autom4te*.cache
sed "s|^\\(AM_INIT_AUTOMAKE\\).*|\1([cygnus])|" configure.ac > t
diff configure.ac t && fatal_ "failed to edit configure.ac"
mv -f t configure.ac
-$AUTOMAKE -Wno-obsolete
AUTOMAKE_fails
grep "^configure\.ac:2:.*$warn_rx" stderr
-AUTOMAKE_fails -Wnone -Wobsolete
-grep "^configure\.ac:2:.*$warn_rx" stderr
:
# quoting in $CONFIG_FILES, done by newer Autoconf.
required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >>configure.ac << END
AC_PROG_CC
depdir=
fi
-# For the fun of it, we should also cope with makefile
-# names that contain weird characters, with Autoconf 2.62
-# and newer.
+# For the fun of it, we should also cope with Makefile names
+# that contain weird characters and newer.
# Pick the first name that the file system will accept.
for name in \
'weird name with $ `#() &! characters"' \
do
rm -rf .deps _deps
./config.status "$arg" depfiles >stdout 2>stderr ||
- { cat stdout; cat stderr >&2; Exit 1; }
+ { cat stdout; cat stderr >&2; exit 1; }
cat stdout
cat stderr >&2
- grep '[Nn]o such file' stderr && Exit 1
+ grep '[Nn]o such file' stderr && exit 1
if test -n "$depdir"; then
- test -d $depdir || Exit 1
+ test -d $depdir || exit 1
fi
done
# Check dirlist support.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat >dirlist-test/dirlist-check.m4 <<'END'
AC_DEFUN([AM_INIT_GUILE_MODULE],[
. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AM_INIT_AUTOMAKE(foreign)
AC_CONFIG_AUX_DIR(..)
module=[$1]
AC_SUBST(module)])
# There should be no m4_include in aclocal.m4, even though m4/dirlist
# contains './dirlist-test' as a relative directory. Only -I directories
# are subject to file inclusion.
- grep m4_include aclocal.m4 && Exit 1
+ grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
# This bug can occur only when we do a VPATH build of Automake
# (because of the '-I' passed to aclocal in tests/defs/aclocal.in) but
# it's OK because VPATH builds are done by 'make distcheck'.
- grep 'I should not be included' configure && Exit 1
+ grep 'I should not be included' configure && exit 1
:
# Check dirlist globbing support.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
AM_FOO_BAR
EOF
mkdir dirlist21-test dirlist22-test
cat >dirlist21-test/dirlist21-check.m4 <<'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE],[. $srcdir/../GUILE-VERSION])
END
cat >dirlist22-test/dirlist22-check.m4 <<'END'
# There should be no m4_include in aclocal.m4, even though m4/dirlist
# contains './dirlist-test' as a relative directory. Only -I directories
# are subject to file inclusion.
- grep m4_include aclocal.m4 && Exit 1
+ grep m4_include aclocal.m4 && exit 1
grep 'GUILE-VERSION' configure
grep 'foo bar baz' configure
am_create_testdir=empty
required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
count=0
ocwd=$(pwd) || fatal_ "cannot get current working directory"
unindent > configure.ac << END
AC_INIT([$me], [$count])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([parallel-tests])
+ AM_INIT_AUTOMAKE
AC_PROG_CC
# We don't want to require python or emcas in this test, so
# the tricks below.
# This tries to distribute a file from a subdirectory, without
# Makefile in that directory. distcom5.test performs the same
# test with a Makefile in the directory.
-# Also make sure that README appears first in DIST_COMMON.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([tests/autoconf:tests/wrapper.in],
test 1 -eq $(grep -c tests dc.txt)
grep configure dc.txt
-# README must come first.
-grep 'DIST_COMMON = README' Makefile.in
:
# containing a '$' on the left hand side of an assignment are not
# portable in practice, even though POSIX allows them. :-/
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >Makefile.am <<'EOF'
x = 1
EOF
$ACLOCAL
+
AUTOMAKE_fails -Wportability
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
grep 'Makefile.am:6' stderr
grep 'Makefile.am:7' stderr
-# On the other hand, if we allow 'silent-rules' mode, then we need to
-# allow recursive variable expansion, too.
-
-# This should work with the AM_SILENT_RULES macro.
-$sleep
-echo 'AM_SILENT_RULES' >> configure.ac
-
-$ACLOCAL --force
-AUTOMAKE_fails -Wportability
+AUTOMAKE_fails -Wportability -Wno-portability-recursive
grep 'Makefile.am:2' stderr
grep 'Makefile.am:3' stderr
grep 'Makefile.am:4' stderr
grep 'Makefile.am:5' stderr
- grep 'Makefile.am:6' stderr && Exit 1
- grep 'Makefile.am:7' stderr && Exit 1
+ grep 'Makefile.am:6' stderr && exit 1
+ grep 'Makefile.am:7' stderr && exit 1
:
# Test to make sure extensions are set correctly for various languages.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_F77
AC_PROG_FC
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_UPC
END
for ext in f for f90 f95 F F90 F95 r m mm upc; do
grep "^\.$ext\.o:" Makefile.in
- grep "^$ext\.o:" Makefile.in && Exit 1
+ grep "^$ext\.o:" Makefile.in && exit 1
: For shells with busted 'set -e'.
done
# options like '--ignore-deps' and '--silent-rules' are preserved across
# automake reruns.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AM_MAINTAINER_MODE
done
-# Cygnus mode is deprecated now, and must be handled separately.
-$AUTOMAKE --cygnus -Wno-obsolete
-./configure --enable-maintainer-mode
-grep " --cygnus" Makefile
-$MAKE
-# Two code paths in configure.am:
-# - either a file in $(am__configure_deps) has been updated ...
-$sleep
-touch aclocal.m4
-$MAKE
-grep " --cygnus" Makefile
-# - ... or not; i.e., Makefile.am or an included file has.
-$sleep
-touch Makefile.am
-$MAKE
-grep " --cygnus" Makefile
-
:
# to the test cases requiring them.
# See also automake bug#9807.
- . ./defs || Exit 1
+ . ./defs || exit 1
extract_program_version ()
{
AM_GNU_GETTEXT_VERSION([$autopoint_version])
END
-if $am_gettextize_command --force && test -f m4/gettext.m4; then
- echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
- echo "export ACLOCAL_PATH" >> get.sh
-else
+if ! ($am_gettextize_command --force && test -f m4/gettext.m4); then
# Older versions of gettext might not have a gettextize program
# available, but this doesn't mean the user hasn't made the gettext
# macros available, e.g., by properly setting ACLOCAL_PATH.
fi
fi
-. ./get.sh
+echo "ACLOCAL_PATH='$(pwd)/m4':\$ACLOCAL_PATH" >> get.sh
+echo "export ACLOCAL_PATH" >> get.sh
-cat >> get.sh <<'END'
# Even recent versions of gettext used the now-obsolete 'AM_PROG_MKDIR_P'
# m4 macro. So we need the following to avoid spurious errors.
-ACLOCAL="$ACLOCAL -Wno-obsolete"
-AUTOMAKE="$AUTOMAKE -Wno-obsolete"
-END
+echo 'AC_DEFUN([AM_MKDIR_P], [AC_MKDIR_P([$@])])' >> m4/mk-dirp.m4
+
+. ./get.sh
$ACLOCAL --force -I m4 || cat >> get.sh <<'END'
# We need to use '-Wno-syntax', since we do not want our test suite
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Make sure that our macro 'AM_SILENT_RULES' adds proper text to
-# the configure help screen.
+# Make sure configure options relative to automake silent rules are
+# added to the configure help screen.
- . ./defs || Exit 1
+ . ./defs || exit 1
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AM_SILENT_RULES
-END
-
+: > Makefile.am
$ACLOCAL
-mv -f configure.ac configure.tmpl
+cp configure.ac configure.tmpl
-for args in '' '([])' '([yes])' '([no])'; do
- sed "s/AM_SILENT_RULES.*/&$args/" configure.tmpl >configure.ac
- cat configure.ac
+for args in '' 'yes' 'no'; do
+ cp -f configure.tmpl configure.ac
+ test x"$args" = x || echo "AM_SILENT_RULES([$args])/" >> configure.ac
+ cat configure.ac # For debugging.
$AUTOCONF --force
grep_configure_help --enable-silent-rules \
' less verbose build.*\(undo.*"make V=1".*\)'
# If $(infodir) is the empty string, then nothing should be installed there.
# Likewise for the other install-* targets used for texinfo files.
-required='makeinfo-html tex texi2dvi'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
dvips --help \
|| skip_ "dvips is missing"
$MAKE -e install install-html install-dvi install-ps install-pdf DESTDIR="$destdir"
test ! -d "$instdir"
test ! -d "$destdir"
- $MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+ $MAKE -e uninstall > stdout || { cat stdout; exit 1; }
cat stdout
- grep 'rm -f' stdout && Exit 1
+ grep 'rm -f' stdout && exit 1
$MAKE -e uninstall DESTDIR="$destdir"
:
# This test uses a "flat" setup for the source tree (i.e., everything in
# the top-level directory), and forces the use of the old, non-parallel
# testsuite driver. The sister test 'java-compile-run-nested.test' do
-# similar checks with a more usual, "nested" setup, and using the newer
-# 'parallel-tests' driver.
+# similar checks with a more usual, "nested" setup, and using the older
+# 'serial-tests' driver.
required='java javac'
am_serial_tests=yes
- . ./defs || Exit 1
+ . ./defs || exit 1
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# Also meddle with wrapper scripts, as would be probably seen in a real
# "UNIX-style" use case.
# This test uses a typical "nested" source tree setup (i.e., different
-# components/aspects are separated into different subdirectories),
-# and uses the 'parallel-tests' testsuite driver. The sister test
-# 'java-compile-run-flat.test' do similar checks with a "flat" setup
-# (i.e., everything in the top-level directory), and forcing the use
-# of the older non-parallel 'simple-tests' driver.
+# components/aspects are separated into different subdirectories), and
+# uses the parallel testsuite driver.
+# The sister test 'java-compile-run-flat.test' do similar checks with a
+# "flat" setup (i.e., everything in the top-level directory), and forcing
+# the use of the older 'serial-tests' driver.
required='java javac'
- . ./defs || Exit 1
+ . ./defs || exit 1
echo "AC_SUBST([PATH_SEPARATOR], ['$PATH_SEPARATOR'])" >> configure.ac
# even if the 'missing' script is involved.
required=help2man
- . ./defs || Exit 1
+ . ./defs || exit 1
# Avoid a spurious failure due to a known FreeBSD make incompatibility.
useless_vpath_rebuild \
../configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar ../foobar.1
./configure
# Sanity check.
-grep '^HELP2MAN *=.*/missing --run help2man' Makefile
+grep '^HELP2MAN *=.*/missing help2man' Makefile
$MAKE
$FGREP foobar foobar.1
# Test missing with version mismatches.
- . ./defs || Exit 1
+am_create_testdir=empty
+ . ./defs || exit 1
-cat >>configure.ac <<'EOF'
-m4_include([v.m4])
-AC_OUTPUT
-EOF
+get_shell_script missing
-: > v.m4
+do_check ()
+{
+ progname=$1; shift;
- ./missing "$@" 2>stderr && { cat stderr >&2; Exit 1; }
++ ./missing "$@" 2>stderr && { cat stderr >&2; exit 1; }
+ cat stderr >&2
+ $FGREP "WARNING: '$progname' is probably too old." stderr
+}
-: > Makefile.am
+echo 'AC_INIT([x], [1.0]) AC_PREREQ([9999])' >> configure.ac
-get_shell_script missing
+do_check autoconf $AUTOCONF
+do_check autoheader $AUTOHEADER
+do_check aclocal-$APIVERSION $am_original_ACLOCAL
+
+cat > configure.ac << 'END'
+AC_INIT([x], [0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+echo AUTOMAKE_OPTIONS = 9999.9999 > Makefile.am
$ACLOCAL
-$AUTOCONF
-$AUTOMAKE --add-missing
-
-# See missing.test for explanations about this.
-MYAUTOCONF="./missing --run $AUTOCONF"
-unset AUTOCONF
-
-./configure AUTOCONF="$MYAUTOCONF"
-
-$MAKE
-$sleep
-# Hopefully the install version of Autoconf cannot compete with this one...
-echo 'AC_PREREQ(9999)' > v.m4
-$MAKE distdir
-
-# Run again, but without missing, to ensure that timestamps were updated.
-export AUTOMAKE ACLOCAL
-./configure AUTOCONF="$MYAUTOCONF"
-$MAKE
-
-# Make sure $MAKE fail when timestamps aren't updated and missing is not used.
-$sleep
-touch v.m4
-$MAKE && exit 1
+: > install-sh
+# FIXME: this doesn't work due to a bug in automake (not 'missing').
+#do_check automake-$APIVERSION $am_original_AUTOMAKE
:
# Test missing when running a tool's --version.
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
get_shell_script missing
# b7cb8259 assumed not to exist.
-./missing b7cb8259 --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run b7cb8259 --version && exit 1
-./missing --run b7cb8259 --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
+run_cmd ()
+{
+ st=0; "$@" >stdout 2>stderr || st=$?
+ cat stdout
+ cat stderr >&2
+ return $st
+}
+
- ./missing b7cb8259 --version && Exit 1
- grep WARNING stderr && Exit 1
- run_cmd ./missing b7cb8259 --grep && Exit 1
++./missing b7cb8259 --version && exit 1
++grep WARNING stderr && exit 1
++run_cmd ./missing b7cb8259 --grep && exit 1
+grep 'WARNING:.*missing on your system' stderr
# missing itself it known to exist :)
- run_cmd ./missing ./missing --version || Exit 1
-./missing ./missing --version 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep WARNING stderr
-
-./missing --run ./missing --version 2>stderr || { cat stderr >&2; exit 1; }
-cat stderr >&2
-grep . stderr && exit 1
-./missing --run ./missing --grep 2>stderr && { cat stderr >&2; exit 1; }
-cat stderr >&2
++run_cmd ./missing ./missing --version || exit 1
+grep 'missing .*(GNU [aA]utomake)' stdout
- test -s stderr && Exit 1
- run_cmd ./missing ./missing --grep && Exit 1
- grep WARNING stderr && Exit 1
++test -s stderr && exit 1
++run_cmd ./missing ./missing --grep && exit 1
+ grep WARNING stderr && exit 1
-grep Unknown stderr
+grep "missing:.* unknown '--grep'" stderr
+
+:
# Another test to make sure no-dependencies option does the right thing.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
AC_PROG_CC
AC_PROG_CXX
AC_PROG_OBJC
-# FIXME: this is to cater to older autoconf; remove this once we
-# FIXME: automake requires Autoconf 2.65 or later.
-m4_ifdef([AC_PROG_OBJCXX], [AC_PROG_OBJCXX], [
- AC_SUBST([OBJCXX], [whocares])
- AM_CONDITIONAL([am__fastdepOBJCXX], [whocares])
-])
+AC_PROG_OBJCXX
AM_PROG_AS
AM_PROG_GCJ
AM_PROG_UPC
$ACLOCAL
$AUTOMAKE
- grep DEPMODE Makefile.in && Exit 1
+ grep DEPMODE Makefile.in && exit 1
:
# Test Objective C compilation flags.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_PROG_OBJC
$AUTOMAKE -a
$FGREP OBJCFLAGS Makefile.in # For debugging.
- grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
- grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)' Makefile.in && Exit 1
- grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && Exit 1
+ grep '\$(OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
+ grep '\$(OBJCFLAGS).*\$(foo.*_OBJCFLAGS)' Makefile.in && exit 1
+ grep '\$(foo.*_OBJCFLAGS).*\$(AM_OBJCFLAGS)' Makefile.in && exit 1
./configure OBJCFLAGS=-UERROR
-$MAKE
+$MAKE
:
required=libtoolize
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
## Autotools Input Files.
cat > configure.ac << 'END'
AC_INIT([play], [1.3], [bug-automake@gnu.org])
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_CONFIG_SRCDIR([play.c])
AC_CONFIG_AUX_DIR([build-aux])
AC_CONFIG_MACRO_DIR([m4])
## Run Autotools.
libtoolize
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOHEADER
$AUTOCONF
$AUTOMAKE --add-missing
[Hello ObjC, world ObjC]
[Hello ObjC++, world ObjC++]
END
- ./play > got || { cat got; Exit 1; }
+ ./play > got || { cat got; exit 1; }
cat exp
cat got
diff exp got
# require an Objective-C++ compiler.
# See also sister test 'objc-basic.sh'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > Makefile.am <<'END'
bin_PROGRAMS = hello
rm -rf autom4te*.cache
cat >> configure.ac <<'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOMAKE
$EGREP '^\.SUFFIXES:.* \.mm( |$)' Makefile.in
# Automatic dependency tracking for Objective C++.
# See also sister test 'objc-deps.sh'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
./configure --enable-dependency-tracking
$MAKE
- cross_compiling || (./foo | $FGREP 'Hello, World') || Exit 1
+ cross_compiling || (./foo | $FGREP 'Hello, World') || exit 1
$sleep
: > old
else
is_newest foo.exe old
fi
- cross_compiling || (./foo | $FGREP 'Howdy, Earth') || Exit 1
+ cross_compiling || (./foo | $FGREP 'Howdy, Earth') || exit 1
$MAKE distcheck
# Test Objective C++ compilation flags.
# See also sister test 'objc-flags.sh'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_OUTPUT
END
END
done
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
-
+$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
$FGREP OBJCXXFLAGS Makefile.in # For debugging.
- grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
- grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)' Makefile.in && Exit 1
- grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && Exit 1
+ grep '\$(OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
+ grep '\$(OBJCXXFLAGS).*\$(foo.*_OBJCXXFLAGS)' Makefile.in && exit 1
+ grep '\$(foo.*_OBJCXXFLAGS).*\$(AM_OBJCXXFLAGS)' Makefile.in && exit 1
./configure OBJCXXFLAGS=-UERROR
-$MAKE
+$MAKE
:
# See also sister test 'objc-minidemo.sh'.
required=native
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
-dnl Support for Object C++ was introduced only in Autoconf 2.65.
-AC_PREREQ([2.65])
AC_PROG_OBJCXX
AC_CONFIG_HEADERS([config.h])
AC_OUTPUT
}
END
-if $ACLOCAL; then
- : We have a modern enough autoconf, go ahead.
-elif test $? -eq 63; then
- skip_ "Object C++ support requires Autoconf 2.65 or later"
-else
- exit 1 # Some other aclocal failure.
-fi
+$ACLOCAL
$AUTOCONF
$AUTOHEADER
$AUTOMAKE --add-missing
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check that auxiliary script 'test-driver' gets automatically installed
-# in the correct directory by 'parallel-tests' option.
+# in the correct directory.
- . ./defs || Exit 1
+am_create_testdir=empty
+ . ./defs || exit 1
-: Try first with parallel-tests defined in AM_INIT_AUTOMAKE.
-
-mkdir am-init-automake
-cd am-init-automake
-
cat > configure.ac <<END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([my_aux_dir])
-AM_INIT_AUTOMAKE([parallel-tests])
+AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile sub/Makefile])
AC_OUTPUT
END
END
$ACLOCAL
- $AUTOMAKE -a 2>stderr || { cat stderr >&2; Exit 1; }
+ $AUTOMAKE -a 2>stderr || { cat stderr >&2; exit 1; }
cat stderr >&2
ls -l . sub my_aux_dir # For debugging.
test ! -r test-driver
test ! -r sub/test-driver
-grep '^configure\.ac:3:.*installing.*my_aux_dir/test-driver' stderr
-
-cd ..
-
-: Now try with parallel-tests defined in AUTOMAKE_OPTIONS.
-
-mkdir automake-options
-cd automake-options
-
-cat > configure.ac <<END
-AC_INIT([$me], [1.0])
-AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([dir/GNUmakefile])
-AC_OUTPUT
-END
-
-mkdir build-aux dir
-
-cat > dir/GNUmakefile.am <<END
-TESTS = foo.test
-AUTOMAKE_OPTIONS = parallel-tests
-TESTS += bar.test
-END
-
-$ACLOCAL
-$AUTOMAKE --add-missing --copy dir/GNUmakefile 2>stderr \
- || { cat stderr >&2; exit 1; }
-cat stderr >&2
-
-ls -l . dir build-aux # For debugging.
-test -f build-aux/test-driver
-test ! -r test-driver
-test ! -r dir/test-driver
-
-grep '^dir/GNUmakefile\.am:2:.*installing.*build-aux/test-driver' stderr
+grep '^parallel-tests:.*installing.*my_aux_dir/test-driver' stderr
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-2.test'.
- . ./defs || Exit 1
+ . ./defs || exit 1
echo AC_OUTPUT >> configure.ac
chmod a+x foo.test bar.test
- $MAKE check && Exit 1
+ $MAKE check && exit 1
for targ in recheck clean mostlyclean distclean; do
$MAKE -n "$targ"
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check parallel-tests interactions with "make -n".
+# Check interactions between the parallel test harness and "make -n".
# See also sister test 'parallel-tests-dry-run-1.test'.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
make_n_ ()
{
st=0
- $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; Exit 1; }
+ $MAKE -n "$@" >output 2>&1 || { cat output; ls -l; exit 1; }
cat output
# Look out for possible errors from common tools used by recipes.
- $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && Exit 1
- $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && Exit 1
+ $EGREP -i ' (exist|permission|denied|no .*(such|file))' output && exit 1
+ $EGREP '(mv|cp|rm|cat|grep|sed|awk): ' output && exit 1
:
}
test ! -f test-suite.log
done
- # Creative quoting below to please maintainer-check.
- echo exit '0' > foo.test
- echo exit '1' > bar.test
+ echo 'exit 0' > foo.test
+ echo 'exit 1' > bar.test
- $MAKE check && Exit 1
+ $MAKE check && exit 1
chmod a-w .
test -f foo.log
test -f bar.trs
- # Creative quoting below to please maintainer-check.
cat > foo.test <<END
echo this is bad
exit 1
END
- echo exit '0' > bar.test
+ echo 'exit 0' > bar.test
for target in check recheck test-suite.log; do
make_n_ $target
grep '^:test-result: *FAIL' bar.trs
- grep 'this is bad' foo.log test-suite.log && Exit 1
+ grep 'this is bad' foo.log test-suite.log && exit 1
: For shells with busted 'set -e'.
done
for target in check recheck test-suite.log; do
make_n_ $target
for f in $files; do
- test -f $f && test ! -r $f || Exit 1
+ test -f $f && test ! -r $f || exit 1
done
done
fi
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver removed incomplete log files
+# Check that the parallel testsuite harness removes incomplete log files
# when interrupt upon some signal. This test is definitely too hacky,
# but we couldn't find a better way to deal with inter-processes
# signals and the whole process-synchronization mess.
- . ./defs || Exit 1
+ . ./defs || exit 1
plan_ 16
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests harness does not hit errors due to
-# an exceeded command line length when there are many tests.
+# Check that the parallel testsuite harness does not hit errors due
+# to an exceeded command line length when there are many tests.
# For automake bug#7868. This test is currently expected to fail.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
mkdir $new_deepdir || break
tmpfile=$new_deepdir/$tname-some-more-chars-for-good-measure
if touch $tmpfile; then
- rm -f $tmpfile || Exit 99
+ rm -f $tmpfile || exit 99
else
- rmdir $new_deepdir || Exit 99
+ rmdir $new_deepdir || exit 99
fi
deepdir=$new_deepdir
unset tmpfile new_deepdir
print " \\\n";
}
}
- ' > list-of-tests.am || Exit 99
- sed 20q list-of-tests.am || Exit 99 # For debugging.
+ ' > list-of-tests.am || exit 99
+ sed 20q list-of-tests.am || exit 99 # For debugging.
$AUTOMAKE Makefile \
|| framework_failure_ "unexpected automake failure"
./config.status Makefile \
&& test -f $deepdir/$tname-1.log \
|| framework_failure_ "\"make check\" with one single tests"
- rm -f $deepdir/* || Exit 99
+ rm -f $deepdir/* || exit 99
- $MAKE check > stdout || { cat stdout; Exit 1; }
+ $MAKE check > stdout || { cat stdout; exit 1; }
cat stdout
grep "^# TOTAL: $count$" stdout
test $st -eq 0 || fatal_ "couldn't simulate failure of two tests"
unset st
- $MAKE recheck > stdout || { cat stdout; Exit 1; }
+ $MAKE recheck > stdout || { cat stdout; exit 1; }
cat stdout
grep "^PASS: .*$tname-1\.test" stdout
grep "^PASS: .*$tname-2\.test" stdout
# "make clean" might ignore some failures, so we prefer to also grep its
# output to ensure that no "Argument list too long" error was encountered.
- $MAKE clean >output 2>&1 || { cat output; Exit 1; }
+ $MAKE clean >output 2>&1 || { cat output; exit 1; }
cat output
- grep -i 'list.* too long' output && Exit 1
- ls $deepdir | grep '\.log$' && Exit 1
+ grep -i 'list.* too long' output && exit 1
+ ls $deepdir | grep '\.log$' && exit 1
:
# Colorized output from the testsuite report shouldn't end up in log files.
required='grep-nonprint'
- . ./defs || Exit 1
+ . ./defs || exit 1
TERM=ansi; export TERM
cat >Makefile.am <<'END'
LOG_COMPILER = $(SHELL)
-AUTOMAKE_OPTIONS = color-tests parallel-tests
+AUTOMAKE_OPTIONS = color-tests
TESTS = pass fail skip xpass xfail error
XFAIL_TESTS = xpass xfail
END
- # Creative quoting to please maintainer-check.
- echo exit '0' > pass
- echo exit '0' > xpass
- echo exit '1' > fail
- echo exit '1' > xfail
- echo exit '77' > skip
- echo exit '99' > error
+ echo 'exit 0' > pass
+ echo 'exit 0' > xpass
+ echo 'exit 1' > fail
+ echo 'exit 1' > xfail
+ echo 'exit 77' > skip
+ echo 'exit 99' > error
$ACLOCAL
$AUTOCONF
./configure
mv config.log config-log # Avoid possible false positives below.
- AM_COLOR_TESTS=always $MAKE -e check && Exit 1
+ AM_COLOR_TESTS=always $MAKE -e check && exit 1
# Not a useless use of cat; see above comments "grep-nonprinting"
# requirement in 'test-init.sh'.
- cat *.log | grep "$esc" && Exit 1
+ cat *.log | grep "$esc" && exit 1
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver correctly handle overrides of the
+# Check that the testsuite harness correctly handle overrides of the
# TERM variable by either TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
required='grep-nonprint'
- . ./defs || Exit 1
+ . ./defs || exit 1
TERM=ansi; export TERM
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check that the parallel-tests driver creates parent directories for
+# Check that the parallel test harness creates parent directories for
# the log files when needed.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# FIXME: performance is too low, and FAIL accordingly; it just offers
# FIXME: an easy way verify how effective a performance optimization is.
- . ./defs || Exit 1
+ . ./defs || exit 1
count=10000
echo :test-result: PASS >> $i.trs
echo :copy-in-global-log: yes >> $i.trs
echo TESTS += $i.t
-done >> Makefile.am
+done >> Makefile.am
# Re-enable shell traces.
set -x
./configure
- $MAKE test-suite.log >stdout || { cat stdout; Exit 1; }
+ $MAKE test-suite.log >stdout || { cat stdout; exit 1; }
cat stdout
# Sanity checks.
# See how well the rebuild rule handles an aclocal.m4 that was
# generated for another version of autoconf.
- . ./defs || Exit 1
+ . ./defs || exit 1
echo AC_OUTPUT >>configure.ac
$MAKE
sed '1,20 s/m4_defn(\[AC_AUTOCONF_VERSION\]),/9999,/' < aclocal.m4 > aclocal.tmp
- cmp aclocal.m4 aclocal.tmp && Exit 1
+ cmp aclocal.m4 aclocal.tmp && exit 1
mv aclocal.tmp aclocal.m4
- $MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+ $MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
cat stderr >&2
grep 'You have another version of autoconf' stderr
grep 'aclocal.m4:.*this file was generated for' stderr
- $MAKE 2>stderr || { cat cat stderr >&2; Exit 1; }
+ $MAKE 2>stderr || { cat cat stderr >&2; exit 1; }
cat stderr >&2
- grep 'You have another version of autoconf' stderr && Exit 1
- grep 'aclocal.m4:.*this file was generated for' stderr && Exit 1
+ grep 'You have another version of autoconf' stderr && exit 1
+ grep 'aclocal.m4:.*this file was generated for' stderr && exit 1
:
# Make sure remaking rules work when subdir Makefile.in has been removed.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_CONFIG_FILES([sub/Makefile])
do_check ()
{
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- test $(grep -c " --run " stdout) -eq 1
+ test $(grep -c "/missing " stdout) -eq 1
}
# Now, we are set up. Ensure that, for either missing Makefile.in,
# Test to make sure macro used in m4 file is included.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > configure.ac <<EOF
-AC_INIT
+AC_INIT([$me], [1.0])
AM_INIT_GUILE_MODULE
EOF
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_INIT_GUILE_MODULE],[
-. $srcdir/../GUILE-VERSION
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
-AC_CONFIG_AUX_DIR(..)
-module=[$1]
-AC_SUBST(module)])
+AC_DEFUN([AM_INIT_GUILE_MODULE], [AM_INIT_AUTOMAKE([whocares])])
END
$ACLOCAL
# an early exit due to some command exiting unexpectedly with status 77.
am_create_testdir=no
- . ./defs || Exit 1
+ . ./defs || exit 1
set +e
# testsuite shell to ensure it supports "VAR=val shell_func" correctly.
run_dummy_test ()
{
- env $2 $AM_TEST_RUNNER_SHELL -c "am_create_testdir=no; . ./defs; $1" \
- dummy.sh
+ env $2 $AM_TEST_RUNNER_SHELL -c "
+ am_create_testdir=no
+ . ./defs
+ $1
+ " dummy.sh
}
run_dummy_test '(exit 77); exit 77'
- test $? -eq 77 || Exit 1
+ test $? -eq 77 || exit 1
run_dummy_test 'sh -c "exit 77"' am_explicit_skips=no
- test $? -eq 77 || Exit 1
+ test $? -eq 77 || exit 1
-run_dummy_test '(exit 77); exit 77' am_explicit_skips=yes
+run_dummy_test '(exit 77); exit 77' am_explicit_skips=yes
- test $? -eq 78 || Exit 1
+ test $? -eq 78 || exit 1
run_dummy_test 'sh -c "exit 77"' am_explicit_skips=y
- test $? -eq 78 || Exit 1
+ test $? -eq 78 || exit 1
- run_dummy_test 'Exit 77' am_explicit_skips=yes
- test $? -eq 77 || Exit 1
+ run_dummy_test 'exit 77' am_explicit_skips=yes
+ test $? -eq 77 || exit 1
run_dummy_test 'skip_ "foo"' am_explicit_skips=y
- test $? -eq 77 || Exit 1
+ test $? -eq 77 || exit 1
:
# from config.site, and that this default can be overridden from
# either the ./configure or make command line.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac <<'EOF'
-AM_SILENT_RULES
+# This line will be edited later to force silent-rules default.
AC_OUTPUT
EOF
: 'Disable by default in configure.ac, enable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([no])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*silent-rules default.*/AM_SILENT_RULES([no])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
: 'Enable by default in configure.ac, disable by default in config.site'
-sed 's/^AM_SILENT_RULES/&([yes])/' configure.ac > configure.tmp
-mv -f configure.tmp configure.ac
+sed 's/.*AM_SILENT_RULES.*/AM_SILENT_RULES([yes])/' configure.ac > t
+diff t configure.ac && fatal_ "editing configure.ac"
+mv -f t configure.ac
$ACLOCAL
$AUTOCONF
$AUTOMAKE --add-missing
# Check silent-rules mode for Lex.
required='cc lex'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_LEX
AC_CONFIG_FILES([sub/Makefile])
$AUTOCONF
# Ensure per-target rules are used, to ensure their coverage below.
- $FGREP 'foo2-foo.c' Makefile.in || Exit 99
- $FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+ $FGREP 'foo2-foo.c' Makefile.in || exit 99
+ $FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'LEX .*foo\.' stdout
grep 'LEX .*bar\.' stdout
# different set of rules.
$MAKE clean
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for LEX, as probably lex hasn't been re-run.
grep ' CC .*foo\.' stdout
$MAKE clean
rm -f *foo.c sub/*bar.c
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
grep 'ylwrap ' stdout
- $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(LEX|CC|CCLD) ' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(LEX|CC|CCLD) ' stdout && exit 1
:
# 'silent-many-generic.test', which should work with generic compilers.
required='gcc g++ gfortran lex yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
# Avoids too much code duplication.
do_and_check_silent_build ()
*) rebuild=false;;
esac
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'CXX .*foo1\.' stdout
grep 'CXX .*baz1\.' stdout
*) rebuild=false;;
esac
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|FC|F77|LD) ' stdout && exit 1
if ! $rebuild; then
grep 'ylwrap ' stdout
- $EGREP '(LEX|YACC) ' stdout && Exit 1
+ $EGREP '(LEX|YACC) ' stdout && exit 1
fi
unset rebuild
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_CXX
AC_PROG_F77
# and forces the use of gcc depmode.
required='cc c++ fortran fortran77 lex yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
# Avoids too much code duplication.
do_and_check_silent_build ()
*) rebuild=false;;
esac
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'CXX .*foo1\.' stdout
grep 'CXX .*baz1\.' stdout
*) rebuild=false;;
esac
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|FC|F77|LD) ' stdout && exit 1
if ! $rebuild; then
grep 'ylwrap ' stdout
- $EGREP '(LEX|YACC) ' stdout && Exit 1
+ $EGREP '(LEX|YACC) ' stdout && exit 1
fi
unset rebuild
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_F77
AC_PROG_FC
# involved (i.e., the '-d' option is in *YFLAGS).
required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_YACC
AC_PROG_CC
AC_OUTPUT
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-d|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-d|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
# Check recovering from header removal.
rm -f parse.h bar-parse.h
- $MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+ $MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-d|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-d|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
# different set of rules.
$MAKE clean
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-d|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-d|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for "YACC *.c" and "updating *.h", as yacc shouldn't
# have been re-run.
# Check recovering from header removal.
rm -f parse.h bar-parse.h
- $MAKE parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+ $MAKE parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-d|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-d|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC *parse\.c' stdout
grep 'updating *parse\.h' stdout
./configure --enable-silent-rules
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
- $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Check recovering from header removal.
rm -f parse.h bar-parse.h
- $MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
- grep 'YACC' stdout && Exit 1
+ grep 'YACC' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Check recovering from header removal.
rm -f parse.h bar-parse.h
- $MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 parse.h bar-parse.h >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -d ' stdout
grep 'ylwrap ' stdout
- grep 'YACC' stdout && Exit 1
+ grep 'YACC' stdout && exit 1
:
# Keep this in sync with sister test 'silent-yacc-gcc.test'.
required='cc yacc'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AM_PROG_CC_C_O
AC_PROG_YACC
AC_CONFIG_FILES([sub/Makefile])
$AUTOCONF
# Ensure per-target rules are used, to ensure their coverage below.
- $FGREP 'foo2-foo.c' Makefile.in || Exit 99
- $FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+ $FGREP 'foo2-foo.c' Makefile.in || exit 99
+ $FGREP 'bar2-bar.c' sub/Makefile.in || exit 99
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
grep 'YACC .*foo\.' stdout
grep 'YACC .*bar\.' stdout
# different set of rules.
$MAKE clean
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- $EGREP '(mv|ylwrap) ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ $EGREP '(mv|ylwrap) ' stdout && exit 1
# Don't look for YACC, as probably yacc hasn't been re-run.
grep ' CC .*foo\.' stdout
$MAKE clean
rm -f *foo.[ch] sub/*bar.[ch]
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
grep 'ylwrap ' stdout
- $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
# Cleaning and then rebuilding with the same V flag (and without
# removing the generated sources in between) shouldn't trigger a
# different set of rules.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
# Don't look for ylwrap, as probably lex hasn't been re-run.
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+ $EGREP '(YACC|CC|CCLD) ' stdout && exit 1
:
# Please keep this file in sync with silent2.test.
required=cc
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
$AUTOCONF
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CC .*foo\.' stdout
grep 'CC .*bar\.' stdout
grep 'CC .*baz\.' stdout
grep 'CCLD .*bla' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o foo' stdout
- $EGREP '(CC|LD) ' stdout && Exit 1
+ $EGREP '(CC|LD) ' stdout && exit 1
:
# Please keep this file in sync with silent.test.
required=gcc
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
$AUTOCONF
./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CC .*foo\.' stdout
grep 'CC .*bar\.' stdout
grep 'CC .*baz\.' stdout
grep 'CCLD .*bla' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o foo' stdout
- $EGREP '(CC|LD) ' stdout && Exit 1
+ $EGREP '(CC|LD) ' stdout && exit 1
:
# Please keep this file in sync with silent4.test and silent9.test.
required='cc libtoolize'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
$AUTOCONF
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
- sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# Please keep this file in sync with silent3.test and silent9.test.
required="libtoolize gcc"
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_AR
$AUTOCONF
./configure am_cv_CC_dependencies_compiler_type=gcc --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
- sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# Check user extensibility of silent-rules mode.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
EOF
mkdir sub
cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = -Wno-portability-recursive
my_verbose = $(my_verbose_$(V))
my_verbose_ = $(my_verbose_$(AM_DEFAULT_VERBOSITY))
my_verbose_0 = @echo " XGEN $@";
esac
shift
$MAKE clean
- $MAKE ${1+"$@"} >output 2>&1 || { cat output; Exit 1; }
+ $MAKE ${1+"$@"} >output 2>&1 || { cat output; exit 1; }
sed 's/^/ /' output
if $silent; then
- $FGREP 'cp ' output && Exit 1
- $FGREP 'generate-header' output && Exit 1
- $FGREP 'rm -f' output && Exit 1
- grep '[012]\.h' output && Exit 1
+ $FGREP 'cp ' output && exit 1
+ $FGREP 'generate-header' output && exit 1
+ $FGREP 'rm -f' output && exit 1
+ grep '[012]\.h' output && exit 1
grep '^ XGEN foo$' output
grep '^ GEN \[headers\]$' output
else
- $FGREP 'GEN ' output && Exit 1
+ $FGREP 'GEN ' output && exit 1
$FGREP 'cp ./foo.in foo' output
$FGREP "rm -f sub/0.h sub/1.h sub/2.h" output
$FGREP "generate-header --flags sub/0.h sub/1.h sub/2.h" output
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check user extensibility of silent-rules mode.
+# Aslo check that silent rules are disabled by default.
- . ./defs || Exit 1
+ . ./defs || exit 1
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
all-local: foo
$AUTOMAKE --add-missing
$AUTOCONF
-./configure --disable-silent-rules
+# Silent rules are disabled by default, since we haven't called
+# "AM_SILENT_RULES([yes])" explicitly.
+./configure
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- grep 'GEN ' stdout && Exit 1
+ grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
- grep 'GEN ' stdout && Exit 1
+ grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
$MAKE clean
- $MAKE V=0 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=0 >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
- grep 'cp ' stdout && Exit 1
- grep 'echo ' stdout && Exit 1
+ grep 'cp ' stdout && exit 1
+ grep 'echo ' stdout && exit 1
$MAKE distclean
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
- grep 'cp ' stdout && Exit 1
- grep 'echo ' stdout && Exit 1
+ grep 'cp ' stdout && exit 1
+ grep 'echo ' stdout && exit 1
$MAKE clean
- $MAKE V=0 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=0 >stdout || { cat stdout; exit 1; }
cat stdout
grep 'GEN .*foo' stdout
- grep 'cp ' stdout && Exit 1
- grep 'echo ' stdout && Exit 1
+ grep 'cp ' stdout && exit 1
+ grep 'echo ' stdout && exit 1
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
- grep 'GEN ' stdout && Exit 1
+ grep 'GEN ' stdout && exit 1
grep 'cp ' stdout
grep 'echo ' stdout
-# Ensure that setting 'silent-rules' in a Makefile.am produces an error.
-echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
-AUTOMAKE_fails --force
-
:
# Check texinfo rules in silent-rules mode.
-required='makeinfo-html tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
- . ./defs || Exit 1
+ . ./defs || exit 1
-cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
-AC_OUTPUT
-EOF
+echo AC_OUTPUT >> configure.ac
cat > Makefile.am <<'EOF'
info_TEXINFOS = foo.texi
./configure --disable-silent-rules
# Make sure that all labels work in silent-mode.
- $MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+ $MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
cat stdout
- grep 'DVIPS foo.ps' stdout || Exit 1
- grep 'MAKEINFO foo.html' stdout || Exit 1
+ grep 'DVIPS foo.ps' stdout || exit 1
+ grep 'MAKEINFO foo.html' stdout || exit 1
# NetBSD make will print './foo.info' instead of 'foo.info'.
- grep 'MAKEINFO.*foo.info' stdout || Exit 1
- grep 'TEXI2DVI foo.dvi' stdout || Exit 1
- grep 'TEXI2PDF foo.pdf' stdout || Exit 1
+ grep 'MAKEINFO.*foo.info' stdout || exit 1
+ grep 'TEXI2DVI foo.dvi' stdout || exit 1
+ grep 'TEXI2PDF foo.pdf' stdout || exit 1
# Now make sure the labels don't appear in verbose mode.
- $MAKE clean || Exit 1
- $MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+ $MAKE clean || exit 1
+ $MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; exit 1; }
cat stdout
- grep 'DVIPS foo.ps' stdout && Exit 1
- grep 'MAKEINFO foo.html' stdout && Exit 1
- grep 'MAKEINFO.*foo.info' stdout && Exit 1
- grep 'TEXI2DVI foo.dvi' stdout && Exit 1
- grep 'TEXI2PDF foo.pdf' stdout && Exit 1
+ grep 'DVIPS foo.ps' stdout && exit 1
+ grep 'MAKEINFO foo.html' stdout && exit 1
+ grep 'MAKEINFO.*foo.info' stdout && exit 1
+ grep 'TEXI2DVI foo.dvi' stdout && exit 1
+ grep 'TEXI2PDF foo.pdf' stdout && exit 1
:
# Please keep this file in sync with silent3.test and silent4.test.
required='cc libtoolize'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_CONFIG_FILES([sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
$AUTOCONF
./configure --disable-dependency-tracking --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep ' CC .*foo\.' stdout
grep ' CC .*bar\.' stdout
grep ' CC .*baz\.' stdout
grep ' CCLD .*bla' stdout
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c' stdout
grep ' -o libfoo' stdout
# The libtool command line can contain e.g. a '--tag=CC' option.
- sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
+ sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && exit 1
:
# test 'silentcxx.test', which should work with generic compilers.
required=g++
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
am_cv_CXX_dependencies_compiler_type=gcc
do
./configure $config_args --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CXX .*foo\.' stdout
grep 'CXX .*baz\.' stdout
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CC|CXX|LD) ' stdout && Exit 1
+ $EGREP '(CC|CXX|LD) ' stdout && exit 1
# Ensure a clean reconfiguration/rebuild.
$MAKE clean
# and forces the use of gcc depmode.
required=c++
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_CXX
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
--enable-dependency-tracking --disable-dependency-tracking
do
./configure $config_args --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'CXX .*foo\.' stdout
grep 'CXX .*baz\.' stdout
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(CXX|LD) ' stdout && Exit 1
+ $EGREP '(CXX|LD) ' stdout && exit 1
# Ensure a clean reconfiguration/rebuild.
$MAKE clean
# Keep this ins sync with the sister test silentf90.test.
required=fortran77
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_F77
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
$AUTOCONF
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'F77 .*foo\.' stdout
grep 'F77 .*bar\.' stdout
grep 'F77LD .*foo2' stdout
grep 'F77LD .*bar2' stdout
- $EGREP '(FC|FCLD) ' stdout && Exit 1
+ $EGREP '(FC|FCLD) ' stdout && exit 1
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(F77|FC|LD) ' stdout && Exit 1
+ $EGREP '(F77|FC|LD) ' stdout && exit 1
:
# Keep this ins sync with the sister test silentf77.test.
required=fortran
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
cat >>configure.ac <<'EOF'
-AM_SILENT_RULES
AC_PROG_FC
AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
$AUTOCONF
./configure --enable-silent-rules
- $MAKE >stdout || { cat stdout; Exit 1; }
+ $MAKE >stdout || { cat stdout; exit 1; }
cat stdout
# Avoid spurious failures with SunStudio Fortran compilers.
sed '/^NOTICE:/d' stdout > t
mv -f t stdout
cat stdout
- $EGREP ' (-c|-o)' stdout && Exit 1
- grep 'mv ' stdout && Exit 1
+ $EGREP ' (-c|-o)' stdout && exit 1
+ grep 'mv ' stdout && exit 1
grep 'FC .*foo\.' stdout
grep 'FC .*bar\.' stdout
grep 'FCLD .*foo2' stdout
grep 'FCLD .*bar2' stdout
- $EGREP '(F77|F77LD) ' stdout && Exit 1
+ $EGREP '(F77|F77LD) ' stdout && exit 1
# Ensure a clean rebuild.
$MAKE clean
- $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ $MAKE V=1 >stdout || { cat stdout; exit 1; }
cat stdout
grep ' -c ' stdout
grep ' -o ' stdout
- $EGREP '(F77|FC|LD) ' stdout && Exit 1
+ $EGREP '(F77|FC|LD) ' stdout && exit 1
:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure stamp-h* files are created where we expect
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << END
-AM_CONFIG_HEADER([1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin])
-# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
+AC_CONFIG_HEADERS([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
AC_CONFIG_HEADERS([sdir1/4.h
sdir1/5.h:config.hin
sdir1/6.h:sdir1/config1.hin
# with the Automake test harness".
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
cat > Makefile.am <<'END'
TEST_LOG_DRIVER = env AM_TAP_AWK='$(AWK)' $(SHELL) \
cat > configure.ac <<'END'
AC_INIT([GNU Try Tap], [1.0], [bug-automake@gnu.org])
AC_CONFIG_AUX_DIR([build-aux])
-AM_INIT_AUTOMAKE([foreign parallel-tests -Wall -Werror])
+AM_INIT_AUTOMAKE([foreign -Wall -Werror])
AC_CONFIG_FILES([Makefile])
AC_REQUIRE_AUX_FILE([tap-driver.sh])
AC_PROG_AWK
cp "$am_scriptdir"/tap-driver.sh build-aux \
|| framework_failure_ "fetching the perl TAP driver"
- (export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || Exit 1
+ (export AUTOMAKE ACLOCAL AUTOCONF && $AUTORECONF -vi) || exit 1
./configure --help # Sanity check.
./configure || skip_ "configure failed"
# Prevent Sun Distributed Make from trying to run in parallel.
DMAKE_MODE=serial; export DMAKE_MODE
- $MAKE check >stdout && { cat stdout; Exit 1; }
+ $MAKE check >stdout && { cat stdout; exit 1; }
cat stdout
cat > exp <<'END'
env \
TESTS='foo.test baz.test' \
TEST_LOG_DRIVER_FLAGS='--comments --ignore-exit' \
- $MAKE -e check >stdout || { cat stdout; Exit 1; }
+ $MAKE -e check >stdout || { cat stdout; exit 1; }
cat > exp <<'END'
PASS: foo.test 1 - Swallows fly
# defined in a subdir Makefile
am_create_testdir=empty
- . ./defs || Exit 1
+ . ./defs || exit 1
ocwd=$(pwd) || fatal_ "getting current working directory"
-do_check ()
-{
- whereopts=$1 auxdir=$2
- case $#,$whereopts in
- 2,ac) ac_opts=parallel-tests am_code= ;;
- 2,am) am_opts=parallel-tests ac_code= ;;
- *) fatal_ "do_check: bad usage";;
- esac
- mkdir $whereopts
- cd $whereopts
+for i in 1 2; do
+ mkdir D$i
+ cd D$i
+ if test $i -eq 1; then
+ auxdir=.
+ test_driver=test-driver
+ else
+ auxdir=build-aux
+ test_driver=$auxdir/test-driver
+ mkdir $auxdir
+ fi
mkdir tests
unindent > configure.ac << END
AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([$auxdir])
- AM_INIT_AUTOMAKE([$ac_opts])
+ AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile tests/Makefile])
AC_OUTPUT
END
- if test $auxdir = .; then
- test_driver=test-driver
- else
- mkdir $auxdir
- test_driver=$auxdir/test-driver
- fi
- # No 'AUTOMAKE_OPTIONS' in here -- purposely.
unindent > Makefile.am << END
SUBDIRS = tests
check-local: test-top
.PHONY: test-top
END
unindent > tests/Makefile.am << END
- AUTOMAKE_OPTIONS = $am_opts
check-local: test-sub
test-sub:
echo ' ' \$(DIST_COMMON) ' ' | grep '[ /]$test_driver '
$AUTOMAKE
diff Makefile.in Makefile.sav
diff tests/Makefile.in tests/Makefile.sav
- :
-}
-
-do_check ac .
-do_check am build-aux
+ cd "$ocwd" || fatal_ "cannot chdir back to '$ocwd'"
+done
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Custom test drivers and parallel-tests harness: check the documented
+# Custom test drivers and parallel test harness: check the documented
# semantics for deciding when the content of a test log file should be
# copied in the global test-suite.log file. Currently, this is done
# with the use of the reStructuredText field ':copy-in-global-log:' in
# the associated '.trs' files.
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
grep '^seen corn 2$' test-suite.log
grep '^seen corn 31$' test-suite.log
grep '^seen corn 32$' test-suite.log
- $FGREP 'not seen' test-suite.log && Exit 1
+ $FGREP 'not seen' test-suite.log && exit 1
:
# With old serial testsuite driver, TESTS_ENVIRONMENT can be used to
# define the "test runner", i.e. the program that the test scripts must
-# be run by (with the parallel-tests driver one should use LOG_COMPILER
+# be run by (with the parallel test harness one should use LOG_COMPILER
# for this). The behaviour tested here is also documented in the manual.
am_serial_tests=yes
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac <<END
AC_SUBST([PERL], ['$PERL'])
# The pdf, ps and dvi targets shouldn't let clutter in the build directory.
# Related to automake bug#11146.
-required='makeinfo tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
$MAKE $fmt
ls -l . sub # For debugging.
ls -d foo* baz* sub/bar* > lst
- $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info)$' lst && exit 1
+ $EGREP -v '^(foo|sub/bar|baz)\.(texi|dvi|ps|pdf|html|info|t2[dp])$' \
- lst && Exit 1
++ lst && exit 1
$MAKE clean
done
# Also make sure we do not distribute too much foo.info* files (Report
# from Vincent Lefevre).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
echo AC_OUTPUT >> configure.ac
# Test support for building HTML documentation, and the many
# install-DOC flavors.
-required='makeinfo-html tex texi2dvi'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >>configure.ac <<\EOF
AC_CONFIG_FILES([rec/Makefile])
# (Similar to txinfo13.test, plus DISTCLEANFILES).
# (See also txinfo24.test and txinfo25.test).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# (Similar to txinfo16.test, plus CLEANFILES).
# (See also txinfo23.test and txinfo25.test).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# (Similar to txinfo16.test, plus CLEANFILES).
# (See also txinfo23.test and txinfo24.test).
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
cat >> configure.ac << 'END'
AC_OUTPUT
# references.
# Report from Ralf Corsepius.
-required='makeinfo tex texi2dvi-o'
+required='makeinfo tex texi2dvi'
- . ./defs || Exit 1
+ . ./defs || exit 1
# This setting, when honored by GNU ls, used to cause an infinite loop
# in mdate-sh.
# DVIS, PDFS, PSS, HTMLS should not be cleaned upon 'mostlyclean'.
# Similar to txinfo25.test.
-required='makeinfo tex texi2dvi-o dvips'
+required='makeinfo tex texi2dvi dvips'
- . ./defs || Exit 1
+ . ./defs || exit 1
mkdir sub
$MAKE mostlyclean
- ls *.aux && Exit 1
- ls sub/*.aux && Exit 1
+ ls *.aux && exit 1
+ ls sub/*.aux && exit 1
test -f main.dvi
test -f main.ps
# for more vers*.texi files, and does not require makeinfo, tex and
# texi2dvi.
-required='makeinfo tex texi2dvi-o grep-nonprint'
+required='makeinfo tex texi2dvi grep-nonprint'
- . ./defs || Exit 1
+ . ./defs || exit 1
test $(LC_ALL=C date '+%u') -gt 0 && test $(LC_ALL=C date '+%u') -lt 8 \
&& day=$(LC_ALL=C date '+%d') && test -n "$day" \