From: Stefano Lattarini Date: Mon, 23 May 2011 19:53:44 +0000 (+0200) Subject: testsuite: require C compiler explicitly in tests needing it X-Git-Tag: ng-0.5a~89^2~227 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7a7fc5659e0be4bbfc4dfb7b3fc9a45e5fb8ef0e;p=thirdparty%2Fautomake.git testsuite: require C compiler explicitly in tests needing it The list of the test scripts which needed a C compiler but failed to require it explicitly has been found by running: $ am_explicit_skips=yes CC=false make check and looking for tests that reported FAIL instead of SKIP. After the present change, all those previously failing tests either pass or get correctly skipped. * tests/aclocal4.test ($required): Add `cc'. * tests/ansi.test: Likewise. * tests/ansi10.test: Likewise. * tests/ansi3.test: Likewise. * tests/ansi3b.test: Likewise. * tests/ansi5.test: Likewise. * tests/ansi6.test: Likewise. * tests/ansi7.test: Likewise. * tests/ansi9.test: Likewise. * tests/backcompat6.test: Likewise. * tests/canon7.test: Likewise. * tests/check5.test: Likewise. * tests/check7.test: Likewise. * tests/check8.test: Likewise. * tests/cond4.test: Likewise. * tests/cond11.test: Likewise. * tests/cond16.test: Likewise. * tests/cond18.test: Likewise. * tests/cond19.test: Likewise. * tests/cond22.test: Likewise. * tests/cond30.test: Likewise. * tests/cond31.test: Likewise. * tests/cond32.test: Likewise. * tests/cond34.test: Likewise. * tests/cond35.test: Likewise. * tests/cond39.test: Likewise. * tests/condd.test: Likewise. * tests/cygnus-dependency-tracking.test: Likewise. * tests/depcomp2.test: Likewise. * tests/depcomp6.test: Likewise. * tests/depcomp7.test: Likewise. * tests/depcomp8a.test: Likewise. * tests/depcomp8b.test: Likewise. * tests/depdist.test: Likewise. * tests/depend2.test: Likewise. * tests/depend5.test: Likewise. * tests/distcleancheck.test: Likewise. * tests/distname.test: Likewise. * tests/exeext.test: Likewise. * tests/exeext4.test: Likewise. * tests/extradep.test: Likewise. * tests/extradep2.test: Likewise. * tests/gnits2.test: Likewise. * tests/gnits3.test: Likewise. * tests/instdir-ltlib.test: Likewise. * tests/instdir-prog.test: Likewise. * tests/instfail.test: Likewise. * tests/instfail-libtool.test: Likewise. * tests/lex3.test: Likewise. * tests/lex5.test: Likewise. * tests/lexvpath.test: Likewise. * tests/lex-subobj-nodep.test: Likewise. * tests/lflags.test: Likewise. * tests/libobj-basic.test: Likewise. * tests/libobj2.test: Likewise. * tests/libobj7.test: Likewise. * tests/libobj10.test: Likewise. * tests/libobj16a.test: Likewise. * tests/libobj16b.test: Likewise. * tests/libobj17.test: Likewise. * tests/libobj19.test: Likewise. * tests/libtool2.test: Likewise. * tests/libtool3.test: Likewise. * tests/libtool7.test: Likewise. * tests/libtool9.test: Likewise. * tests/libtoo10.test: Likewise. * tests/libtoo11.test: Likewise. * tests/ltcond.test: Likewise. * tests/ltcond2.test: Likewise. * tests/ltconv.test: Likewise. * tests/ltinit.test: Likewise. * tests/ltlibsrc.test: Likewise. * tests/ltorder.test: Likewise. * tests/nobase.test: Likewise. * tests/nobase-libtool.test: Likewise. * tests/mmodely.test: Likewise. * tests/parallel-tests5.test: Likewise. * tests/parallel-tests-suffix-prog.test: Likewise. * tests/parallel-tests-ext-driver-prog.test: Likewise. * tests/posixsubst-ldadd.test: Likewise. * tests/posixsubst-libraries.test: Likewise. * tests/posixsubst-ltlibraries.test: Likewise. * tests/posixsubst-programs.test: Likewise. * tests/posixsubst-sources.test: Likewise. * tests/pr87.test: Likewise. * tests/pr204.test: Likewise. * tests/pr224.test: Likewise. * tests/pr300-lib.test: Likewise. * tests/pr300-ltlib.test: Likewise. * tests/pr300-prog.test: Likewise. * tests/pr401.test: Likewise. * tests/pr401b.test: Likewise. * tests/pr401c.test: Likewise. * tests/remake-gnulib-add-acsubst.test: Likewise. * tests/remake-gnulib-add-header.test: Likewise. * tests/regex.test: Likewise. * tests/repeated-options.test: Likewise. * tests/silent.test: Likewise. * tests/silent3.test: Likewise. * tests/silent9.test: Likewise. * tests/silent-lex-generic.test: Likewise. * tests/silent-many-generic.test: Likewise. * tests/silent-yacc-generic.test: Likewise. * tests/specflg7.test: Likewise. * tests/specflg9.test: Likewise. * tests/specflg10.test: Likewise. * tests/stdinc.test: Likewise. * tests/strip.test: Likewise. * tests/strip2.test: Likewise. * tests/strip3.test: Likewise. * tests/subdirbuiltsources.test: Likewise. * tests/subobj3.test: Likewise. * tests/subobj6.test: Likewise. * tests/subobj11a.test: Likewise. * tests/subpkg.test: Likewise. * tests/subst2.test: Likewise. * tests/subst3.test: Likewise. * tests/substref.test: Likewise. * tests/substre2.test: Likewise. * tests/suffix5.test: Likewise. * tests/suffix8.test: Likewise. * tests/suffix10.test: Likewise. * tests/suffix11.test: Likewise. * tests/suffix12.test: Likewise. * tests/suffix13.test: Likewise. * tests/target-cflags.test: Likewise. * tests/transform.test: Likewise. * tests/transform2.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-clean.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/yacc-nodist.test: Likewise. * tests/yaccvpath.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc4.test: Likewise. * tests/yacc7.test: Likewise. * tests/yacc8.test: Likewise. * tests/yaccdry.test: Likewise. * tests/yflags-cmdline-override.test: Likewise. * tests/yflags-force-override.test: Likewise. * tests/python-virtualenv.test: Likewise. Also, improve skip messages. * tests/subobj5.test ($required): Add `cc'. (Makefile.am): Set `AUTOMAKE_OPTIONS' to `subdir-objects', and add new checking rules `test-build' and `test-distdir'. Extend the test by building and examining the distdir, the program, and the object files. * tests/postproc.test ($required): Add `cc'. Avoid the explicit `|| Exit $?' after call to configure, which is now either redundant (e.g., when `am_explicit_skips' is unset), or counter-productive (e.g., when `am_explicit_skips' is set to "yes"). * tests/pr243.test: Likewise. * tests/pr266.test: Likewise. * tests/pr220.test: Simplify so that it doesn't require a C compiler anymore. * tests/subdir5.test: Likewise. * tests/subdir8.test: Likewise. * tests/lflags.test: Likewise. * tests/yflags.test: Likewise. * tests/yflags-force-conditional.test: Likewise. * tests/lflags2.test: Simplify so that it doesn't require a C++ compiler anymore. * tests/yflags2.test: Likewise. * tests/autohdrdry.test (configure.in): Remove unneeded call to `AC_PROG_CC'. * tests/pr287.test: Likewise. * tests/check6.test: Likewise. * tests/cond21.test: Likewise, plus some cosmetic adjustments. * tests/upc.test: Skip if configure fails with status `77'. * tests/upc3.test: Likewise. * tests/vala4.test: Likewise. * tests/nostdinc.test: Likewise. Also, make grepping checks on `Makefile.in'. Update heading comments. * tests/compile5.test: When we must skip, skip explicitly, and with a meaningful message. * tests/instspc-tests.sh: When running in "test-build" or "test-install" mode (as determined by the value of variable `$instspc_action'), require `cc'. Adjust comments. * tests/depmod-tests.sh: Likewise. --- diff --git a/ChangeLog b/ChangeLog index cab13f207..e7dcc98d7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,194 @@ +2011-05-25 Stefano Lattarini + + testsuite: require C compiler explicitly in tests needing it + The list of the test scripts which needed a C compiler but + failed to require it explicitly has been found by running: + $ am_explicit_skips=yes CC=false make check + and looking for tests that reported FAIL instead of SKIP. + After the present change, all those previously failing tests + either pass or get correctly skipped. + * tests/aclocal4.test ($required): Add `cc'. + * tests/ansi.test: Likewise. + * tests/ansi10.test: Likewise. + * tests/ansi3.test: Likewise. + * tests/ansi3b.test: Likewise. + * tests/ansi5.test: Likewise. + * tests/ansi6.test: Likewise. + * tests/ansi7.test: Likewise. + * tests/ansi9.test: Likewise. + * tests/backcompat6.test: Likewise. + * tests/canon7.test: Likewise. + * tests/check5.test: Likewise. + * tests/check7.test: Likewise. + * tests/check8.test: Likewise. + * tests/cond4.test: Likewise. + * tests/cond11.test: Likewise. + * tests/cond16.test: Likewise. + * tests/cond18.test: Likewise. + * tests/cond19.test: Likewise. + * tests/cond22.test: Likewise. + * tests/cond30.test: Likewise. + * tests/cond31.test: Likewise. + * tests/cond32.test: Likewise. + * tests/cond34.test: Likewise. + * tests/cond35.test: Likewise. + * tests/cond39.test: Likewise. + * tests/condd.test: Likewise. + * tests/cygnus-dependency-tracking.test: Likewise. + * tests/depcomp2.test: Likewise. + * tests/depcomp6.test: Likewise. + * tests/depcomp7.test: Likewise. + * tests/depcomp8a.test: Likewise. + * tests/depcomp8b.test: Likewise. + * tests/depdist.test: Likewise. + * tests/depend2.test: Likewise. + * tests/depend5.test: Likewise. + * tests/distcleancheck.test: Likewise. + * tests/distname.test: Likewise. + * tests/exeext.test: Likewise. + * tests/exeext4.test: Likewise. + * tests/extradep.test: Likewise. + * tests/extradep2.test: Likewise. + * tests/gnits2.test: Likewise. + * tests/gnits3.test: Likewise. + * tests/instdir-ltlib.test: Likewise. + * tests/instdir-prog.test: Likewise. + * tests/instfail.test: Likewise. + * tests/instfail-libtool.test: Likewise. + * tests/lex3.test: Likewise. + * tests/lex5.test: Likewise. + * tests/lexvpath.test: Likewise. + * tests/lex-subobj-nodep.test: Likewise. + * tests/lflags.test: Likewise. + * tests/libobj-basic.test: Likewise. + * tests/libobj2.test: Likewise. + * tests/libobj7.test: Likewise. + * tests/libobj10.test: Likewise. + * tests/libobj16a.test: Likewise. + * tests/libobj16b.test: Likewise. + * tests/libobj17.test: Likewise. + * tests/libobj19.test: Likewise. + * tests/libtool2.test: Likewise. + * tests/libtool3.test: Likewise. + * tests/libtool7.test: Likewise. + * tests/libtool9.test: Likewise. + * tests/libtoo10.test: Likewise. + * tests/libtoo11.test: Likewise. + * tests/ltcond.test: Likewise. + * tests/ltcond2.test: Likewise. + * tests/ltconv.test: Likewise. + * tests/ltinit.test: Likewise. + * tests/ltlibsrc.test: Likewise. + * tests/ltorder.test: Likewise. + * tests/nobase.test: Likewise. + * tests/nobase-libtool.test: Likewise. + * tests/mmodely.test: Likewise. + * tests/parallel-tests5.test: Likewise. + * tests/parallel-tests-suffix-prog.test: Likewise. + * tests/parallel-tests-ext-driver-prog.test: Likewise. + * tests/posixsubst-ldadd.test: Likewise. + * tests/posixsubst-libraries.test: Likewise. + * tests/posixsubst-ltlibraries.test: Likewise. + * tests/posixsubst-programs.test: Likewise. + * tests/posixsubst-sources.test: Likewise. + * tests/pr87.test: Likewise. + * tests/pr204.test: Likewise. + * tests/pr224.test: Likewise. + * tests/pr300-lib.test: Likewise. + * tests/pr300-ltlib.test: Likewise. + * tests/pr300-prog.test: Likewise. + * tests/pr401.test: Likewise. + * tests/pr401b.test: Likewise. + * tests/pr401c.test: Likewise. + * tests/remake-gnulib-add-acsubst.test: Likewise. + * tests/remake-gnulib-add-header.test: Likewise. + * tests/regex.test: Likewise. + * tests/repeated-options.test: Likewise. + * tests/silent.test: Likewise. + * tests/silent3.test: Likewise. + * tests/silent9.test: Likewise. + * tests/silent-lex-generic.test: Likewise. + * tests/silent-many-generic.test: Likewise. + * tests/silent-yacc-generic.test: Likewise. + * tests/specflg7.test: Likewise. + * tests/specflg9.test: Likewise. + * tests/specflg10.test: Likewise. + * tests/stdinc.test: Likewise. + * tests/strip.test: Likewise. + * tests/strip2.test: Likewise. + * tests/strip3.test: Likewise. + * tests/subdirbuiltsources.test: Likewise. + * tests/subobj3.test: Likewise. + * tests/subobj6.test: Likewise. + * tests/subobj11a.test: Likewise. + * tests/subpkg.test: Likewise. + * tests/subst2.test: Likewise. + * tests/subst3.test: Likewise. + * tests/substref.test: Likewise. + * tests/substre2.test: Likewise. + * tests/suffix5.test: Likewise. + * tests/suffix8.test: Likewise. + * tests/suffix10.test: Likewise. + * tests/suffix11.test: Likewise. + * tests/suffix12.test: Likewise. + * tests/suffix13.test: Likewise. + * tests/target-cflags.test: Likewise. + * tests/transform.test: Likewise. + * tests/transform2.test: Likewise. + * tests/yacc-basic.test: Likewise. + * tests/yacc-d-basic.test: Likewise. + * tests/yacc-clean.test: Likewise. + * tests/yacc-dist-nobuild.test: Likewise. + * tests/yacc-nodist.test: Likewise. + * tests/yaccvpath.test: Likewise. + * tests/yacc-d-vpath.test: Likewise. + * tests/yacc4.test: Likewise. + * tests/yacc7.test: Likewise. + * tests/yacc8.test: Likewise. + * tests/yaccdry.test: Likewise. + * tests/yflags-cmdline-override.test: Likewise. + * tests/yflags-force-override.test: Likewise. + * tests/python-virtualenv.test: Likewise. Also, improve skip + messages. + * tests/subobj5.test ($required): Add `cc'. + (Makefile.am): Set `AUTOMAKE_OPTIONS' to `subdir-objects', and + add new checking rules `test-build' and `test-distdir'. + Extend the test by building and examining the distdir, the + program, and the object files. + * tests/postproc.test ($required): Add `cc'. + Avoid the explicit `|| Exit $?' after call to configure, which + is now either redundant (e.g., when `am_explicit_skips' is + unset), or counter-productive (e.g., when `am_explicit_skips' + is set to "yes"). + * tests/pr243.test: Likewise. + * tests/pr266.test: Likewise. + * tests/pr220.test: Simplify so that it doesn't require a + C compiler anymore. + * tests/subdir5.test: Likewise. + * tests/subdir8.test: Likewise. + * tests/lflags.test: Likewise. + * tests/yflags.test: Likewise. + * tests/yflags-force-conditional.test: Likewise. + * tests/lflags2.test: Simplify so that it doesn't require a + C++ compiler anymore. + * tests/yflags2.test: Likewise. + * tests/autohdrdry.test (configure.in): Remove unneeded call + to `AC_PROG_CC'. + * tests/pr287.test: Likewise. + * tests/check6.test: Likewise. + * tests/cond21.test: Likewise, plus some cosmetic adjustments. + * tests/upc.test: Skip if configure fails with status `77'. + * tests/upc3.test: Likewise. + * tests/vala4.test: Likewise. + * tests/nostdinc.test: Likewise. Also, make grepping checks + on `Makefile.in'. Update heading comments. + * tests/compile5.test: When we must skip, skip explicitly, + and with a meaningful message. + * tests/instspc-tests.sh: When running in "test-build" or + "test-install" mode (as determined by the value of variable + `$instspc_action'), require `cc'. Adjust comments. + * tests/depmod-tests.sh: Likewise. + 2011-05-24 Stefano Lattarini testsuite: allow user to ask for stricter skip semantics diff --git a/tests/aclocal4.test b/tests/aclocal4.test index 7b637bdbb..aa16aba9c 100755 --- a/tests/aclocal4.test +++ b/tests/aclocal4.test @@ -17,6 +17,7 @@ # Make sure dependencies on aclocal.m4 are set correctly. # Report from Jim Meyering. +required=cc . ./defs || Exit 1 cat >>configure.in < Makefile.am << 'END' diff --git a/tests/ansi10.test b/tests/ansi10.test index 5cba1ce96..208bbc538 100755 --- a/tests/ansi10.test +++ b/tests/ansi10.test @@ -16,7 +16,7 @@ # Make sure ansi2knr works with $(LIBOBJS). -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/ansi3.test b/tests/ansi3.test index f41035cd1..4aca8a250 100755 --- a/tests/ansi3.test +++ b/tests/ansi3.test @@ -17,7 +17,7 @@ # Actual test of ansi2knr functionality. -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/ansi3b.test b/tests/ansi3b.test index 59eef0882..48ca7cbe7 100755 --- a/tests/ansi3b.test +++ b/tests/ansi3b.test @@ -19,7 +19,7 @@ # of working gcc. Same as ansi3.test, but with AUTOMAKE_OPTIONS # defined in configure.in. -required=native +required='cc native' . ./defs || Exit 1 cat > configure.in << 'END' diff --git a/tests/ansi5.test b/tests/ansi5.test index b29183c06..4490d8b5e 100755 --- a/tests/ansi5.test +++ b/tests/ansi5.test @@ -16,7 +16,7 @@ # Test for ansi2knr in another directory. -required=native +required='cc native' . ./defs || Exit 1 cat > configure.in << 'END' diff --git a/tests/ansi6.test b/tests/ansi6.test index 2a25ee1d2..7892d2be0 100755 --- a/tests/ansi6.test +++ b/tests/ansi6.test @@ -17,7 +17,7 @@ # Check ansi2knr on a source file in subdirectory. # From Kevin Ryde. -required=native +required='cc native' . ./defs || Exit 1 cat > configure.in << 'END' diff --git a/tests/ansi7.test b/tests/ansi7.test index 3b0a37f1a..231d8c81d 100755 --- a/tests/ansi7.test +++ b/tests/ansi7.test @@ -18,7 +18,7 @@ # ansi6.test is the same test without subdir-objects. # From Kevin Ryde. -required=native +required='cc native' . ./defs || Exit 1 cat > configure.in << 'END' diff --git a/tests/ansi9.test b/tests/ansi9.test index aba430d99..52a68e877 100755 --- a/tests/ansi9.test +++ b/tests/ansi9.test @@ -18,6 +18,7 @@ # can still be deansified. # Report from Paul D. Smith. +required=cc . ./defs || Exit 1 cat >>configure.in <>configure.in <<'EOF' diff --git a/tests/autohdrdry.test b/tests/autohdrdry.test index c77315464..b6208ff51 100755 --- a/tests/autohdrdry.test +++ b/tests/autohdrdry.test @@ -20,7 +20,6 @@ . ./defs || Exit 1 cat >>configure.in <<'EOF' -AC_PROG_CC AC_CONFIG_HEADERS([config.h]) AC_OUTPUT EOF diff --git a/tests/backcompat6.test b/tests/backcompat6.test index 8db46303f..343fd4e31 100755 --- a/tests/backcompat6.test +++ b/tests/backcompat6.test @@ -19,6 +19,7 @@ # This script can also serve as mild stress-testing for Automake. # See also the similar test `backcompat5.test'. +required=cc . ./defs || Exit 1 # Anyone doing something like this in a real-life package probably diff --git a/tests/canon7.test b/tests/canon7.test index 8df283c2d..4a4d66ff4 100755 --- a/tests/canon7.test +++ b/tests/canon7.test @@ -16,7 +16,7 @@ # Stress test on canonicalization. -required='libtool libtoolize' +required='cc libtool libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/check-subst-prog.test b/tests/check-subst-prog.test index b8931d5a3..245a2512f 100755 --- a/tests/check-subst-prog.test +++ b/tests/check-subst-prog.test @@ -17,7 +17,7 @@ # Check @substituted@ TESTS, some of which are also PROGRAMS. # See also sister test `check-subst.test'. -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/check5.test b/tests/check5.test index 639f34342..a10989cf8 100755 --- a/tests/check5.test +++ b/tests/check5.test @@ -17,7 +17,7 @@ # Test TESTS = $(check_PROGRAMS) -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/check6.test b/tests/check6.test index 982ffbf70..9687008d7 100755 --- a/tests/check6.test +++ b/tests/check6.test @@ -20,7 +20,6 @@ . ./defs || Exit 1 cat >> configure.in << 'END' -AC_PROG_CC AC_OUTPUT END diff --git a/tests/check7.test b/tests/check7.test index 39c9d77dc..e0b37c9c8 100755 --- a/tests/check7.test +++ b/tests/check7.test @@ -16,6 +16,7 @@ # Check EXEEXT extension for XFAIL_TESTS. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/check8.test b/tests/check8.test index ae9d37528..225816100 100755 --- a/tests/check8.test +++ b/tests/check8.test @@ -16,7 +16,7 @@ # Check subdir TESTS. -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/compile5.test b/tests/compile5.test index 6f4f4bdd2..cd8baee3c 100755 --- a/tests/compile5.test +++ b/tests/compile5.test @@ -37,20 +37,21 @@ END : >Makefile.am +# This will be sourced, nor executed. cat >check_host.in << 'END' -#! /bin/sh -case @host_os@ in +case '@host_os@' in mingw*) ;; *) - exit 77 + skip_ "target OS is not MinGW" ;; esac case @build_os@ in mingw* | cygwin*) ;; *) - winepath -w / || exit 77 + winepath -w / \ + || skip_ "not on MinGW or Cygwin, and winepath not available" ;; esac END @@ -59,7 +60,7 @@ $ACLOCAL $AUTOCONF $AUTOMAKE -a ./configure -./check_host +. ./check_host pwd=`pwd` diff --git a/tests/cond11.test b/tests/cond11.test index 1df840aab..9e7f6da53 100755 --- a/tests/cond11.test +++ b/tests/cond11.test @@ -18,6 +18,7 @@ # This checks that, if LDADD is set from a conditional variable # and an AC_SUBST, the _DEPENDENCIES variable is set correctly. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cond16.test b/tests/cond16.test index 483fa64be..d27472c33 100755 --- a/tests/cond16.test +++ b/tests/cond16.test @@ -18,6 +18,7 @@ # references. # Report from Richard Boulton +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cond18.test b/tests/cond18.test index 577c31a4f..57c5516d7 100755 --- a/tests/cond18.test +++ b/tests/cond18.test @@ -17,7 +17,7 @@ # Regression test for substitution references to conditional variables. # Report from Richard Boulton -required=GNUmake +required='cc GNUmake' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cond19.test b/tests/cond19.test index a91357504..c5ac15a32 100755 --- a/tests/cond19.test +++ b/tests/cond19.test @@ -17,7 +17,7 @@ # Regression test for substitution references to conditional variables. # Report from Richard Boulton -required=GNUmake +required='cc GNUmake' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cond21.test b/tests/cond21.test index 5d1db769c..cf204527e 100755 --- a/tests/cond21.test +++ b/tests/cond21.test @@ -19,10 +19,9 @@ . ./defs || Exit 1 cat >> configure.in << 'END' -AC_PROG_CC -AM_CONDITIONAL(COND1, true) -AM_CONDITIONAL(COND2, true) -AM_CONDITIONAL(COND3, true) +AM_CONDITIONAL([COND1], [true]) +AM_CONDITIONAL([COND2], [true]) +AM_CONDITIONAL([COND3], [true]) AC_OUTPUT END @@ -61,6 +60,7 @@ if COND3 BAR += bar3 endif +.PHONY: test test: @echo BAR: $(BAR) :BAR @echo FOO: $(FOO) :FOO @@ -72,3 +72,5 @@ $AUTOMAKE -a ./configure $MAKE test | $FGREP 'BAR: bar12 bar bar3 :BAR' $MAKE test | $FGREP 'FOO: foo foo1 foo2 foo1b :FOO' + +: diff --git a/tests/cond22.test b/tests/cond22.test index 335407724..4d88f9d2d 100755 --- a/tests/cond22.test +++ b/tests/cond22.test @@ -17,6 +17,7 @@ # Regression test for bug when sources listed in conditional. # Report from Richard Boulton. PR/326. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cond30.test b/tests/cond30.test index d15629761..e1c134194 100755 --- a/tests/cond30.test +++ b/tests/cond30.test @@ -16,6 +16,7 @@ # For PR/352: make sure we support bin_PROGRAMS being defined conditionally. +required=cc . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/cond31.test b/tests/cond31.test index 7deb999a7..70feffc1e 100755 --- a/tests/cond31.test +++ b/tests/cond31.test @@ -16,6 +16,7 @@ # Make sure we define conditional _DEPENDENCIES correctly. +required=cc . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/cond32.test b/tests/cond32.test index 0e5e5d2a6..57113dd44 100755 --- a/tests/cond32.test +++ b/tests/cond32.test @@ -16,6 +16,7 @@ # Make sure the user can override a conditional _DEPENDENCIES. +required=cc . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/cond34.test b/tests/cond34.test index 9b951f54d..13b7a2751 100755 --- a/tests/cond34.test +++ b/tests/cond34.test @@ -17,6 +17,7 @@ # Check for _DEPDENDENCIES definition with conditional _LDADD. # Report from Elena A. Vengerova +required=cc . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/cond35.test b/tests/cond35.test index 8aa1333ea..2fba1f1e1 100755 --- a/tests/cond35.test +++ b/tests/cond35.test @@ -17,7 +17,7 @@ # Check rules output for parser defined conditionally. # Report from Roman Fietze. -required='flex yacc' +required='cc flex yacc' . ./defs || Exit 1 cat >>configure.in <<'EOF' diff --git a/tests/cond39.test b/tests/cond39.test index 3deb1cfd4..f6a916e01 100755 --- a/tests/cond39.test +++ b/tests/cond39.test @@ -20,7 +20,9 @@ # Build either as CONFIG_FILE or as PROGRAM. +required=cc . ./defs || Exit 1 + mkdir sub cat >>configure.in <<'END' diff --git a/tests/cond4.test b/tests/cond4.test index 7c561032d..8a7fcd324 100755 --- a/tests/cond4.test +++ b/tests/cond4.test @@ -17,7 +17,7 @@ # Another sources-in-conditional test. Report from Tim Goodwin. -required=GNUmake +required='cc GNUmake' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/condd.test b/tests/condd.test index ef5f7c71f..71d10eae5 100755 --- a/tests/condd.test +++ b/tests/condd.test @@ -17,6 +17,7 @@ # Test for bug in conditionals. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/cygnus-dependency-tracking.test b/tests/cygnus-dependency-tracking.test index 1bfec252c..e5df33c66 100755 --- a/tests/cygnus-dependency-tracking.test +++ b/tests/cygnus-dependency-tracking.test @@ -17,6 +17,7 @@ # Check that cygnus mode disables automatic dependency tracking. # And check that this *cannot* be overridden. +required=cc . ./defs || Exit 1 cat >> configure.in <<'END' diff --git a/tests/depcomp2.test b/tests/depcomp2.test index 63398db53..2bceaaf26 100755 --- a/tests/depcomp2.test +++ b/tests/depcomp2.test @@ -17,6 +17,7 @@ # Test to make sure that depcomp is not used when it's not installed # From Pavel Roskin. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depcomp6.test b/tests/depcomp6.test index baf9fd58f..13e8c83d4 100755 --- a/tests/depcomp6.test +++ b/tests/depcomp6.test @@ -16,6 +16,7 @@ # Check dependency generation (non libtool case). +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depcomp7.test b/tests/depcomp7.test index f404039ea..87f86b93e 100755 --- a/tests/depcomp7.test +++ b/tests/depcomp7.test @@ -16,7 +16,7 @@ # Check dependency generation (libtool case). -required='libtoolize' +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depcomp8a.test b/tests/depcomp8a.test index 06544d830..9866cfdc2 100755 --- a/tests/depcomp8a.test +++ b/tests/depcomp8a.test @@ -19,6 +19,7 @@ # Keep this in sync with sister test `depcomp8b.test', which checks the # same thing for libtool objects. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depcomp8b.test b/tests/depcomp8b.test index e4cd632e8..15dd109ce 100755 --- a/tests/depcomp8b.test +++ b/tests/depcomp8b.test @@ -19,7 +19,7 @@ # Keep this in sync with sister test `depcomp8a.test', which checks the # same thing for non-libtool objects. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depdist.test b/tests/depdist.test index 338763a65..d5644dee3 100755 --- a/tests/depdist.test +++ b/tests/depdist.test @@ -17,6 +17,7 @@ # Make sure depcomp is found for the distribution. # From Eric Magnien. +required=cc . ./defs || Exit 1 rm -f configure.in diff --git a/tests/depend2.test b/tests/depend2.test index a5ca0c090..995680426 100755 --- a/tests/depend2.test +++ b/tests/depend2.test @@ -19,6 +19,7 @@ # --disable-dependency-tracking. # Report from Robert Boehne +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/depend5.test b/tests/depend5.test index bd14c72d5..9d1bb4151 100755 --- a/tests/depend5.test +++ b/tests/depend5.test @@ -17,6 +17,7 @@ # Check that _AM_OUTPUT_DEPENDENCY_COMMANDS works with eval-style # quoting in $CONFIG_FILES, done by newer Autoconf. +required=cc . ./defs || Exit 1 cat >>configure.in << END diff --git a/tests/depmod-tests.sh b/tests/depmod-tests.sh index 2be8af052..36b57190f 100755 --- a/tests/depmod-tests.sh +++ b/tests/depmod-tests.sh @@ -166,9 +166,12 @@ fi # the errexit flag, since the setup code might not be prepared to deal # with it. Also pre-set `$me' for `tests/defs', so that different calls # to `depmod-tests.sh' won't try to use the same temporary directory. +# The actual tests require a C compiler, so require it for them; but do +# not require it when generating data, as it's not needed then. if test x"$action" = x"generate-data"; then me=depmod-data else + required=cc me=depcomp-$depmode fi set +e diff --git a/tests/distcleancheck.test b/tests/distcleancheck.test index b27ab07a1..cf2b0fe48 100755 --- a/tests/distcleancheck.test +++ b/tests/distcleancheck.test @@ -17,6 +17,7 @@ # Make sure the suggested `distcleancheck_listfiles' in the manual works. # The example Makefile.am we use is from the FAQ entry `distcleancheck'. +required=cc . ./defs || Exit 1 cat >>configure.in << 'END' diff --git a/tests/distname.test b/tests/distname.test index f940045a6..d090fe9a0 100755 --- a/tests/distname.test +++ b/tests/distname.test @@ -18,6 +18,7 @@ # Test of names in tar file. # From Rainer Orth +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/exeext.test b/tests/exeext.test index 70d7efa2e..08cc0346a 100755 --- a/tests/exeext.test +++ b/tests/exeext.test @@ -22,6 +22,7 @@ # Also make sure the old definitions of bin_PROGRAMS and friend # aren't left around. Report from Jim Meyering. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/exeext4.test b/tests/exeext4.test index c3f968c42..e78a508b7 100755 --- a/tests/exeext4.test +++ b/tests/exeext4.test @@ -17,6 +17,7 @@ # Make sure $(EXEEXT) is appended to programs and to tests that are # programs, but not to @substitutions@. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/extradep.test b/tests/extradep.test index 623d73a62..7f3478ed3 100755 --- a/tests/extradep.test +++ b/tests/extradep.test @@ -16,6 +16,7 @@ # Test EXTRA_*_DEPENDENCIES. See extradep2 for libtool variant. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/extradep2.test b/tests/extradep2.test index 9a97de4ec..86caa5d28 100755 --- a/tests/extradep2.test +++ b/tests/extradep2.test @@ -16,7 +16,7 @@ # Test EXTRA_*_DEPENDENCIES, libtool version; see extradep.test. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/gnits2.test b/tests/gnits2.test index 1b60387b3..255ba7b0f 100755 --- a/tests/gnits2.test +++ b/tests/gnits2.test @@ -17,7 +17,7 @@ # Test to ensure std-options checking is correct. -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/gnits3.test b/tests/gnits3.test index 0c8683529..5813527a0 100755 --- a/tests/gnits3.test +++ b/tests/gnits3.test @@ -16,6 +16,7 @@ # Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test index a90536dbd..0d9afd6b3 100755 --- a/tests/instdir-ltlib.test +++ b/tests/instdir-ltlib.test @@ -18,7 +18,7 @@ # be installed there. # This test exercises the libtool code paths. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test index eb52933ae..9ca67ad69 100755 --- a/tests/instdir-prog.test +++ b/tests/instdir-prog.test @@ -18,6 +18,7 @@ # nothing should be installed there. # This test exercises the prog and libs code paths. +required=cc . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/instfail-libtool.test b/tests/instfail-libtool.test index 114f29089..3d520f1c7 100755 --- a/tests/instfail-libtool.test +++ b/tests/instfail-libtool.test @@ -19,7 +19,7 @@ # This is the libtool sister test of instfail.test -required='libtool libtoolize' +required='cc libtool libtoolize' . ./defs || Exit 1 cat >>configure.in <>configure.in <>configure.in <<\END diff --git a/tests/lex3.test b/tests/lex3.test index 2b7f3d15a..7def55ad9 100755 --- a/tests/lex3.test +++ b/tests/lex3.test @@ -19,7 +19,7 @@ # Test associated with PR 19. # From Matthew D. Langston. -required='flex GNUmake' +required='cc flex GNUmake' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/lex5.test b/tests/lex5.test index d57a619d7..ee4306fb8 100755 --- a/tests/lex5.test +++ b/tests/lex5.test @@ -17,7 +17,7 @@ # Test for subdir lexers. -required='GNUmake flex' +required='cc GNUmake flex' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/lexvpath.test b/tests/lexvpath.test index 4b7595030..212db3143 100755 --- a/tests/lexvpath.test +++ b/tests/lexvpath.test @@ -22,7 +22,7 @@ # Please keep this in sync with sister test `yaccvapth.test'. -required=flex +required='cc flex' . ./defs || Exit 1 cat > lexoutroot.in << 'END' diff --git a/tests/lflags.test b/tests/lflags.test index da207fb2e..42e6da0a4 100755 --- a/tests/lflags.test +++ b/tests/lflags.test @@ -19,6 +19,7 @@ # Please keep this in sync with the sister tests lflags2.test, yflags.test # and yflags2.test +required=cc . ./defs || Exit 1 cat >fake-lex <<'END' @@ -33,7 +34,7 @@ chmod a+x fake-lex unset LEX || : cat >> configure.in <<'END' -AC_PROG_CC +AC_SUBST([CC], [false]) # Simulate presence of Lex using our fake-lex script. AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex]) AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) @@ -42,6 +43,7 @@ AC_OUTPUT END cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = no-dependencies bin_PROGRAMS = foo bar foo_SOURCES = main.c foo.l bar_SOURCES = main.c bar.l @@ -55,19 +57,17 @@ $AUTOMAKE -a grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1 grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1 -echo 'int main(void){ return 0; }' > main.c : > foo.l : > bar.l $AUTOCONF ./configure -env LFLAGS=__user_flags__ $MAKE -e - -ls -l +env LFLAGS=__user_flags__ $MAKE -e foo.c bar-bar.c cat foo.c -grep '__am_flags__.*__user_flags__' foo.c cat bar-bar.c + +grep '__am_flags__.*__user_flags__' foo.c grep '__bar_flags__.*__user_flags__' bar-bar.c : diff --git a/tests/lflags2.test b/tests/lflags2.test index 6c731216a..f78de85cc 100755 --- a/tests/lflags2.test +++ b/tests/lflags2.test @@ -33,7 +33,7 @@ chmod a+x fake-lex unset LEX || : cat >> configure.in <<'END' -AC_PROG_CXX +AC_SUBST([CXX], [false]) # Simulate presence of Lex using our fake-lex script. AC_SUBST([LEX], ['$(abs_top_srcdir)'/fake-lex]) AC_SUBST([LEX_OUTPUT_ROOT], [lex.yy]) @@ -42,6 +42,7 @@ AC_OUTPUT END cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = no-dependencies bin_PROGRAMS = foo bar foo_SOURCES = main.cc foo.ll bar_SOURCES = main.cc bar.l++ @@ -55,19 +56,17 @@ $AUTOMAKE -a grep '\$(LFLAGS).*\$(bar_LFLAGS)' Makefile.in && Exit 1 grep '\$(LFLAGS).*\$(AM_LFLAGS)' Makefile.in && Exit 1 -echo 'int main(void) { return 0; }' > main.cc : > foo.ll : > bar.l++ $AUTOCONF ./configure -env LFLAGS=__user_flags__ $MAKE -e - -ls -l +env LFLAGS=__user_flags__ $MAKE -e foo.cc bar-bar.c++ cat foo.cc -grep '__am_flags__.*__user_flags__' foo.cc cat bar-bar.c++ + +grep '__am_flags__.*__user_flags__' foo.cc grep '__bar_flags__.*__user_flags__' bar-bar.c++ : diff --git a/tests/libobj-basic.test b/tests/libobj-basic.test index 0fe0278c7..157dd01ec 100755 --- a/tests/libobj-basic.test +++ b/tests/libobj-basic.test @@ -16,6 +16,7 @@ # Make sure AC_LIBSOURCE and AC_LIBSOURCES work. +required=cc . ./defs || Exit 1 mv configure.in configure.proto diff --git a/tests/libobj10.test b/tests/libobj10.test index f891e85f4..85b3d8a96 100755 --- a/tests/libobj10.test +++ b/tests/libobj10.test @@ -18,6 +18,7 @@ # Do not complain about the nonexistence of a source for LIBOBJS if # it's in BUILT_SOURCES. Reported by Erez Zadok. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libobj16a.test b/tests/libobj16a.test index 9946bc5b0..9b7c6fbdc 100755 --- a/tests/libobj16a.test +++ b/tests/libobj16a.test @@ -17,6 +17,7 @@ # Make sure AC_LIBOBJ and friends work. # Please keep this in sync with sister test `libobj16b.test'. +required=cc . ./defs || Exit 1 mv configure.in configure.proto diff --git a/tests/libobj16b.test b/tests/libobj16b.test index 1039558e0..9f6088358 100755 --- a/tests/libobj16b.test +++ b/tests/libobj16b.test @@ -15,8 +15,9 @@ # along with this program. If not, see . # Make sure AC_LIBOBJ and friends work. -# Please keep this in sync with sister test `libobj16b.test'. +# Please keep this in sync with sister test `libobj16a.test'. +required=cc . ./defs || Exit 1 mv configure.in configure.proto diff --git a/tests/libobj17.test b/tests/libobj17.test index 4f9db57f9..c753f7da6 100755 --- a/tests/libobj17.test +++ b/tests/libobj17.test @@ -16,6 +16,7 @@ # Make sure AC_LIBOBJ accept non-literal arguments. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libobj19.test b/tests/libobj19.test index bc495b5b5..8e595c2c0 100755 --- a/tests/libobj19.test +++ b/tests/libobj19.test @@ -16,6 +16,7 @@ # Test support for AC_CONFIG_LIBOBJ_DIR. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libobj2.test b/tests/libobj2.test index 66ca0d04e..350f60516 100755 --- a/tests/libobj2.test +++ b/tests/libobj2.test @@ -18,6 +18,7 @@ # Test to make sure LIBOBJS works in subdirs. # Bug from Josh MacDonald. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libobj7.test b/tests/libobj7.test index b7556b70b..22207d7a2 100755 --- a/tests/libobj7.test +++ b/tests/libobj7.test @@ -17,6 +17,7 @@ # Test for multiple replacement functions. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libtoo10.test b/tests/libtoo10.test index 72310bb72..0d999dce8 100755 --- a/tests/libtoo10.test +++ b/tests/libtoo10.test @@ -17,8 +17,9 @@ # Make sure .libs directories are removed for _PROGRAMS. # Report from Guillermo Ontañón. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 + cat >> configure.in << 'END' AC_PROG_LIBTOOL AC_OUTPUT diff --git a/tests/libtoo11.test b/tests/libtoo11.test index 4cfcda5bd..e7b7354dc 100755 --- a/tests/libtoo11.test +++ b/tests/libtoo11.test @@ -17,8 +17,9 @@ # Make sure config.lt is removed with Libtool 2.2.x's LT_OUTPUT. # Report by Charles Wilson. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 + cat >> configure.in << 'END' AC_PROG_LIBTOOL m4_ifdef([LT_OUTPUT], [LT_OUTPUT]) @@ -33,4 +34,5 @@ $AUTOMAKE --add-missing $AUTOCONF ./configure $MAKE distcheck + : diff --git a/tests/libtool3.test b/tests/libtool3.test index b50cde2a4..86a04b428 100755 --- a/tests/libtool3.test +++ b/tests/libtool3.test @@ -17,7 +17,7 @@ # Try to build and package a program linked to a Libtool library. # Also make sure we do not bloat the Makefile with unneeded rules. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libtool7.test b/tests/libtool7.test index ad8e2ecb0..90ae862a1 100755 --- a/tests/libtool7.test +++ b/tests/libtool7.test @@ -17,7 +17,7 @@ # Make sure we allow Libtool's -dlopen/-dlpreopen # Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/libtool9.test b/tests/libtool9.test index b025719a7..ab6266eb8 100755 --- a/tests/libtool9.test +++ b/tests/libtool9.test @@ -19,7 +19,7 @@ # Quite similar to libtool7.test, using AM_LDFLAGS in addition to # xxx_LDFLAGS. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/ltcond.test b/tests/ltcond.test index 1c4069dd9..2dc64e0e0 100755 --- a/tests/ltcond.test +++ b/tests/ltcond.test @@ -17,7 +17,7 @@ # Test for conditional libtool libraries. # This combines two examples from the manual. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/ltcond2.test b/tests/ltcond2.test index b917eb4b7..42da11bb1 100755 --- a/tests/ltcond2.test +++ b/tests/ltcond2.test @@ -16,7 +16,7 @@ # Test for bug in conditionals. -required='native libtoolize' +required='cc native libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/ltconv.test b/tests/ltconv.test index 65ee86ded..c0a1099e0 100755 --- a/tests/ltconv.test +++ b/tests/ltconv.test @@ -17,7 +17,7 @@ # Test for libtool convenience libraries. # This example is taken from the manual. -required='native libtoolize' +required='cc native libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/ltinit.test b/tests/ltinit.test index 189e5c26c..a6131f94b 100755 --- a/tests/ltinit.test +++ b/tests/ltinit.test @@ -18,7 +18,7 @@ # interface (with LT_INIT etc.) is used (this interface has been # present since libtool 1.9b, circa 2004). -required='libtoolize' +required='cc libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/ltlibsrc.test b/tests/ltlibsrc.test index 404d27458..f1506267e 100755 --- a/tests/ltlibsrc.test +++ b/tests/ltlibsrc.test @@ -16,7 +16,7 @@ # Test to make sure a sensible default source for libraries is used. -required=libtool +required='cc libtool' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/ltorder.test b/tests/ltorder.test index c41134137..7c4b78c87 100755 --- a/tests/ltorder.test +++ b/tests/ltorder.test @@ -16,7 +16,7 @@ # Test for correct installation order of nobase libtool libraries. -required='libtoolize' +required='cc libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' @@ -57,4 +57,5 @@ grep 'has not been installed' stderr && Exit 1 $MAKE uninstall test `find inst -type f -print | wc -l` -eq 0 + : diff --git a/tests/mmodely.test b/tests/mmodely.test index f2ad334eb..f232058b2 100755 --- a/tests/mmodely.test +++ b/tests/mmodely.test @@ -19,6 +19,7 @@ # sources in maintainer mode. # From Derek R. Price. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/nobase-libtool.test b/tests/nobase-libtool.test index e2d284700..c9e057acd 100755 --- a/tests/nobase-libtool.test +++ b/tests/nobase-libtool.test @@ -19,7 +19,7 @@ # This is just the libtool equivalent of nobase.test, split # up for greater exposure of nobase.test. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in <<'EOF' diff --git a/tests/nobase.test b/tests/nobase.test index 52335d453..aca646ace 100755 --- a/tests/nobase.test +++ b/tests/nobase.test @@ -17,6 +17,7 @@ # Make sure nobase_* works. +required=cc . ./defs || Exit 1 cat >> configure.in <<'EOF' diff --git a/tests/nostdinc.test b/tests/nostdinc.test index a693003cc..07f91f154 100755 --- a/tests/nostdinc.test +++ b/tests/nostdinc.test @@ -17,6 +17,11 @@ # Test to make sure nostdinc option works correctly. +# We don't require a C compiler explicitly, because the first part of the +# test (where `Makefile.in' is grepped) does not require one. Insted, we +# just skip the rest of the test if configure fails to find a working C +# compiler. + . ./defs || Exit 1 cat >> configure.in << 'END' @@ -33,7 +38,7 @@ END $ACLOCAL $AUTOMAKE -grep '.*-I *\.' Makefile.in && Exit 1 +$EGREP '(-I *\.|-I.*srcdir|am__isrc)' Makefile.in && Exit 1 # We'll test the fully-processed Makefile too. $AUTOCONF @@ -41,12 +46,12 @@ $AUTOCONF # Test with $builddir != $srcdir mkdir build cd build -../configure +../configure || Exit $? $EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1 # Test with $builddir = $srcdir cd .. -./configure +./configure || Exit $? $EGREP '.*-I *(\.|\$.srcdir.)' Makefile && Exit 1 Exit 0 diff --git a/tests/parallel-tests-ext-driver-prog.test b/tests/parallel-tests-ext-driver-prog.test index fca4746cf..e92d26274 100755 --- a/tests/parallel-tests-ext-driver-prog.test +++ b/tests/parallel-tests-ext-driver-prog.test @@ -20,7 +20,7 @@ # See also related test 'parallel-tests-ext-driver.test'. parallel_tests=yes -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/parallel-tests-suffix-prog.test b/tests/parallel-tests-suffix-prog.test index 5e7c2ab1b..1ea730acb 100755 --- a/tests/parallel-tests-suffix-prog.test +++ b/tests/parallel-tests-suffix-prog.test @@ -19,7 +19,7 @@ # See also sister test 'parallel-tests-suffix.test'. parallel_tests=yes -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/parallel-tests5.test b/tests/parallel-tests5.test index b1bc5b055..6b3e70b7a 100755 --- a/tests/parallel-tests5.test +++ b/tests/parallel-tests5.test @@ -21,7 +21,7 @@ # It merely serves as demonstration. :-) parallel_tests=yes -required='native GNUmake' +required='cc native GNUmake' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/posixsubst-ldadd.test b/tests/posixsubst-ldadd.test index a418fc26e..9d6cc2dc5 100755 --- a/tests/posixsubst-ldadd.test +++ b/tests/posixsubst-ldadd.test @@ -15,8 +15,9 @@ # along with this program. If not, see . # Test that POSIX variable expansion `$(var:str=rpl)' works -# in when used in LDADD. +# when used in LDADD. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/posixsubst-libraries.test b/tests/posixsubst-libraries.test index 418d24175..00283090e 100755 --- a/tests/posixsubst-libraries.test +++ b/tests/posixsubst-libraries.test @@ -18,6 +18,7 @@ # with the LIBRARIES primary in a "simple" way. # Keep this in sync with sister test `posixsubst-ltlibraries.test'. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/posixsubst-ltlibraries.test b/tests/posixsubst-ltlibraries.test index e95023c94..b601672cf 100755 --- a/tests/posixsubst-ltlibraries.test +++ b/tests/posixsubst-ltlibraries.test @@ -18,7 +18,7 @@ # with the LTLIBRARIES primary in a "simple" way. # Keep this in sync with sister test `posixsubst-libraries.test'. -required='libtool libtoolize' +required='cc libtool libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/posixsubst-programs.test b/tests/posixsubst-programs.test index 947cf79bb..2b50e36d5 100755 --- a/tests/posixsubst-programs.test +++ b/tests/posixsubst-programs.test @@ -17,6 +17,7 @@ # Test that POSIX variable expansion `$(var:str=rpl)' works when used # with the PROGRAMS primary. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/posixsubst-sources.test b/tests/posixsubst-sources.test index aef4c2f0b..62e9d3d81 100755 --- a/tests/posixsubst-sources.test +++ b/tests/posixsubst-sources.test @@ -17,6 +17,7 @@ # Test that POSIX variable expansion `$(var:str=rpl)' works when used # with the SOURCES primary. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/postproc.test b/tests/postproc.test index 0a8b1f388..2208d66ab 100755 --- a/tests/postproc.test +++ b/tests/postproc.test @@ -18,6 +18,7 @@ # Check to make sure we recognize a Makefile.in, even if post-processed # and renamed. +required=cc . ./defs || Exit 1 cat >configure.in < myMakefile.in cat myMakefile.old >> myMakefile.in -./configure || Exit $? +./configure test -f .deps/fred.Po || test -f _deps/fred.Po || Exit 1 diff --git a/tests/pr204.test b/tests/pr204.test index c0db1b404..1c4b0faf4 100755 --- a/tests/pr204.test +++ b/tests/pr204.test @@ -17,7 +17,7 @@ # For PR 204. # Sources derived from nodist_ sources should not be distributed. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in <<'EOF' diff --git a/tests/pr220.test b/tests/pr220.test index 6e8040e99..b068c1025 100755 --- a/tests/pr220.test +++ b/tests/pr220.test @@ -25,24 +25,14 @@ . ./defs || Exit 1 -cat > main.c << 'EOF' -int main (void) -{ - return 0; -} -EOF - cat > Makefile.am << 'EOF' if NEVER_TRUE -NEVER_DEFINED = missingfile.c +NEVER_DEFINED = foo.txt endif - -bin_PROGRAMS = main -main_SOURCES = main.c $(NEVER_DEFINED) +data_DATA = $(NEVER_DEFINED) EOF cat >> configure.in << 'EOF' -AC_PROG_CC AC_ARG_ENABLE([foo], [ --enable-foo Enable foo], [ if test "foo" = "bar" ; then diff --git a/tests/pr224.test b/tests/pr224.test index 8e9414a8b..bf249352f 100755 --- a/tests/pr224.test +++ b/tests/pr224.test @@ -23,6 +23,7 @@ # `$(top_srcdir)/build', the location of the `.deps' directory # should be `$(top_builddir)/bar/.deps'. +required=cc . ./defs || Exit 1 mkdir foo diff --git a/tests/pr243.test b/tests/pr243.test index 30b0d70a8..2b11fb704 100755 --- a/tests/pr243.test +++ b/tests/pr243.test @@ -27,6 +27,7 @@ # the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with # the colon in the CONFIG_FILES variable. +required=cc . ./defs || Exit 1 cat > configure.in << END @@ -50,8 +51,7 @@ END $ACLOCAL $AUTOMAKE $AUTOCONF -# FIXME: require compiler in $required rather than skipping here -./configure || Exit $? +./configure test -f .deps/fx64.Po diff --git a/tests/pr266.test b/tests/pr266.test index c3fd5598e..cff6bcae1 100755 --- a/tests/pr266.test +++ b/tests/pr266.test @@ -18,6 +18,7 @@ # Test for PR 266. # Dependency tracking -vs- nonstandard Makefile names +required=cc . ./defs || Exit 1 cat > configure.in << END @@ -39,8 +40,7 @@ END $ACLOCAL $AUTOMAKE $AUTOCONF -# FIXME: require compiler in $required rather than skipping here -./configure --enable-dependency-tracking || Exit $? +./configure --enable-dependency-tracking test -f .deps/fx64.Po diff --git a/tests/pr287.test b/tests/pr287.test index 33587022b..fc987f629 100755 --- a/tests/pr287.test +++ b/tests/pr287.test @@ -19,7 +19,6 @@ . ./defs || Exit 1 cat >> configure.in << 'END' -AC_PROG_CC AC_OUTPUT END diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test index 951ec52b7..c27c2be86 100755 --- a/tests/pr300-lib.test +++ b/tests/pr300-lib.test @@ -17,6 +17,7 @@ # Make sure that installing subdirectory libraries works. # PR/300 +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test index 1ac26afe4..43a1b8d34 100755 --- a/tests/pr300-ltlib.test +++ b/tests/pr300-ltlib.test @@ -18,7 +18,7 @@ # Make sure that installing subdirectory libtool libraries works. # PR/300 -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test index c66301218..7a2aa991b 100755 --- a/tests/pr300-prog.test +++ b/tests/pr300-prog.test @@ -18,6 +18,7 @@ # Make sure that installing subdirectory programs works. # PR/300 +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/pr401.test b/tests/pr401.test index e150190b1..b2f3c11d4 100755 --- a/tests/pr401.test +++ b/tests/pr401.test @@ -19,6 +19,7 @@ # (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA) parallel_tests=no +required=cc . ./defs || Exit 1 mkdir lib src diff --git a/tests/pr401b.test b/tests/pr401b.test index 58b3d8a16..ccd5cbd4f 100755 --- a/tests/pr401b.test +++ b/tests/pr401b.test @@ -19,7 +19,7 @@ # (pr401.test and pr401c.test do the same for LIBOBJS and ALLOCA) parallel_tests=no -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 mkdir lib src diff --git a/tests/pr401c.test b/tests/pr401c.test index 91156cd4e..0ab785ec1 100755 --- a/tests/pr401c.test +++ b/tests/pr401c.test @@ -19,6 +19,7 @@ # (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS) parallel_tests=no +required=cc . ./defs || Exit 1 mkdir lib src diff --git a/tests/pr87.test b/tests/pr87.test index c8c2e9167..9c92c71d0 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -18,6 +18,7 @@ # Test for PR automake/87. # "make distcheck" fails when two source dirs exist. +required=cc . ./defs || Exit 1 subdirs="foo bar" diff --git a/tests/primary3.test b/tests/primary3.test index 0b0aacf63..a7a915fbf 100755 --- a/tests/primary3.test +++ b/tests/primary3.test @@ -16,6 +16,7 @@ # Make sure we can build programs ending in `.la' +required=cc . ./defs || Exit 1 cat >>configure.in <> configure.in << 'END' diff --git a/tests/remake-gnulib-add-acsubst.test b/tests/remake-gnulib-add-acsubst.test index 74bd20282..6b3549fea 100755 --- a/tests/remake-gnulib-add-acsubst.test +++ b/tests/remake-gnulib-add-acsubst.test @@ -21,6 +21,7 @@ # # for more info). +required=cc . ./defs || Exit 1 cat >> configure.in <<'END' diff --git a/tests/remake-gnulib-add-header.test b/tests/remake-gnulib-add-header.test index 597a19afd..7b0110c71 100755 --- a/tests/remake-gnulib-add-header.test +++ b/tests/remake-gnulib-add-header.test @@ -21,6 +21,7 @@ # # for more info). +required=cc . ./defs || Exit 1 cat >> configure.in <<'END' diff --git a/tests/remake-gnulib-remove-header.test b/tests/remake-gnulib-remove-header.test index ab77f11ba..de5a2fa1b 100755 --- a/tests/remake-gnulib-remove-header.test +++ b/tests/remake-gnulib-remove-header.test @@ -22,6 +22,7 @@ # # for more info). +required=cc . ./defs || Exit 1 cat >> configure.in <<'END' diff --git a/tests/repeated-options.test b/tests/repeated-options.test index c3c2e29a9..4667d0d63 100755 --- a/tests/repeated-options.test +++ b/tests/repeated-options.test @@ -17,7 +17,7 @@ # Check that automake does not complain on repeated options, nor # generate broken or incorrect makefiles. -required=bzip2 +required='cc bzip2' . ./defs || Exit 1 cat >configure.in <> configure.in << 'END' diff --git a/tests/specflg7.test b/tests/specflg7.test index a7aa38ab4..60c1a9d4c 100755 --- a/tests/specflg7.test +++ b/tests/specflg7.test @@ -16,7 +16,7 @@ # The true/false example from the manual, plus a check for _SHORTNAME. -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/specflg8.test b/tests/specflg8.test index 7f8aa1440..f46224a50 100755 --- a/tests/specflg8.test +++ b/tests/specflg8.test @@ -18,7 +18,7 @@ # with one extra indirection in the sources (PR/315), and # use of _CPPFLAGS (PR/337). -required=native +required='cc native' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/stdinc.test b/tests/stdinc.test index 2b619d854..1a0b48572 100755 --- a/tests/stdinc.test +++ b/tests/stdinc.test @@ -17,6 +17,7 @@ # Test to make sure the standard include order is stable. # Report by Kent Boortz. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/strip.test b/tests/strip.test index c63af43ea..84ae5e9f7 100755 --- a/tests/strip.test +++ b/tests/strip.test @@ -16,6 +16,7 @@ # Test for install-strip. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/strip2.test b/tests/strip2.test index 01f66f186..9e1c5ffe1 100755 --- a/tests/strip2.test +++ b/tests/strip2.test @@ -17,7 +17,7 @@ # Ensure install-strip works when STRIP consists of more than one word. # This test needs GNU binutils strip. See sister test strip3. -required=strip +required='cc strip' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/strip3.test b/tests/strip3.test index 5f6f163d3..51e04d5a1 100755 --- a/tests/strip3.test +++ b/tests/strip3.test @@ -17,7 +17,7 @@ # Ensure install-strip works when STRIP consists of more than one word. # This test needs GNU binutils strip. Libtool variant. -required='libtoolize strip' +required='cc libtoolize strip' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/subdir5.test b/tests/subdir5.test index 9d223d477..42c9ad6dc 100755 --- a/tests/subdir5.test +++ b/tests/subdir5.test @@ -27,28 +27,14 @@ required=GNUmake . ./defs || Exit 1 cat >> configure.in << 'END' -AC_PROG_CC -AM_PROG_CC_C_O AC_OUTPUT END -cat > Makefile.am << 'END' -bin_PROGRAMS = wish -wish_SOURCES = a.c -END - -cat > a.c << 'END' -#include -int main () -{ - printf ("hi liver!\n"); - return 0; -} -END +: > Makefile.am $ACLOCAL $AUTOCONF -$AUTOMAKE --include-deps --copy --add-missing +$AUTOMAKE ./configure $MAKE diff --git a/tests/subdir8.test b/tests/subdir8.test index 1bb4c3cad..dc13c2b55 100755 --- a/tests/subdir8.test +++ b/tests/subdir8.test @@ -27,8 +27,6 @@ required=GNUmake . ./defs || Exit 1 cat >> configure.in << 'END' -AC_PROG_CC -AM_PROG_CC_C_O m4_include([confiles.m4]) MORE_DEFS AC_OUTPUT @@ -43,26 +41,14 @@ END mkdir sub -cat > sub/Makefile.am << 'END' -bin_PROGRAMS = wish -wish_SOURCES = a.c -END - -cat > sub/a.c << 'END' -#include -int main () -{ - printf ("hi liver!\n"); - return 0; -} -END +: > sub/Makefile.am mkdir m4 echo 'AC_DEFUN([MORE_DEFS], [])' > m4/moredefs.m4 $ACLOCAL -I m4 $AUTOCONF -$AUTOMAKE --copy --add-missing +$AUTOMAKE ./configure $MAKE diff --git a/tests/subdirbuiltsources.test b/tests/subdirbuiltsources.test index 18cacd91d..5401f97e7 100755 --- a/tests/subdirbuiltsources.test +++ b/tests/subdirbuiltsources.test @@ -18,6 +18,7 @@ # A bug occurred where subdirs do not have all-recursive or # all-recursive-am which depended on BUILT_SOURCES. +required=cc . ./defs || Exit 1 mkdir lib diff --git a/tests/subobj11a.test b/tests/subobj11a.test index fc674b83c..60ad5a51b 100755 --- a/tests/subobj11a.test +++ b/tests/subobj11a.test @@ -26,6 +26,7 @@ # See also sister "grepping" test `subobj11b.test', and related test # `subobj11c.test'. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/subobj3.test b/tests/subobj3.test index 404965f48..bb08beb27 100755 --- a/tests/subobj3.test +++ b/tests/subobj3.test @@ -17,7 +17,7 @@ # Test of subdir objects with ansi2knr. -required=native +required='cc native' . ./defs || Exit 1 cat > configure.in << END diff --git a/tests/subobj5.test b/tests/subobj5.test index 1b05db39a..00402db44 100755 --- a/tests/subobj5.test +++ b/tests/subobj5.test @@ -18,6 +18,7 @@ # Test of subdir make dist rules. # From Robert Collins +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' @@ -28,20 +29,43 @@ AC_OUTPUT END cat > Makefile.am << 'END' +AUTOMAKE_OPTIONS = subdir-objects bin_PROGRAMS = wish wish_SOURCES = generic/a.c + +.PHONY: test-distdir test-build +test-distdir: distdir + ls -l $(distdir) $(distdir)/* ;: For debugging. + test ! -r $(distdir)/a.c + test -f $(distdir)/generic/a.c +test-build: all + ls -l . generic ;: For debugging. + test -f generic/a.$(OBJEXT) + test -f wish$(EXEEXT) + test ! -r a.$(OBJEXT) + test ! -r a$(EXEEXT) + test ! -r generic/wish$(EXEEXT) + test ! -r generic/a$(EXEEXT) END mkdir generic -: > generic/a.c : > generic/Makefile.am +cat > generic/a.c << 'END' +int main (void) +{ + return 0; +} +END + $ACLOCAL $AUTOCONF $AUTOMAKE --include-deps --copy --add-missing ./configure +$MAKE test-distdir $MAKE dist +$MAKE test-build : diff --git a/tests/subobj6.test b/tests/subobj6.test index 9686bf041..fff515174 100755 --- a/tests/subobj6.test +++ b/tests/subobj6.test @@ -18,6 +18,7 @@ # Test of subdir make distclean rules. # From Robert Collins +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/subpkg.test b/tests/subpkg.test index a89d0cf36..5987ac3d5 100755 --- a/tests/subpkg.test +++ b/tests/subpkg.test @@ -17,7 +17,7 @@ # Check subpackage handling. -required=yacc +required='cc yacc' . ./defs || Exit 1 mkdir m4 diff --git a/tests/subst2.test b/tests/subst2.test index 1dbb5110a..d64d8c0a6 100755 --- a/tests/subst2.test +++ b/tests/subst2.test @@ -16,6 +16,8 @@ # Make sure a multi-line definition cannot be terminated by an empty # line (when there are @substitutions@ inside). + +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/subst3.test b/tests/subst3.test index d6964a21d..d87f7440f 100755 --- a/tests/subst3.test +++ b/tests/subst3.test @@ -17,6 +17,7 @@ # Test installation with substitutions. This test is based on nobase.test. +required=cc . ./defs || Exit 1 cat >> configure.in <<'EOF' diff --git a/tests/substre2.test b/tests/substre2.test index 10179cce4..ec920627b 100755 --- a/tests/substre2.test +++ b/tests/substre2.test @@ -17,6 +17,7 @@ # Test for bug in variable substitution references, where # undefined variables break later substitutions. +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/substref.test b/tests/substref.test index 694563bfb..47f4d410b 100755 --- a/tests/substref.test +++ b/tests/substref.test @@ -18,6 +18,7 @@ # pattern is null. # Report from Richard Boulton +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/suffix10.test b/tests/suffix10.test index 026da2430..bd870f381 100755 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@ -17,7 +17,7 @@ # Make sure that derivations work with .lo too. # (related to PR/37) -required='libtoolize yacc' +required='cc libtoolize yacc' . ./defs || Exit 1 cat >>configure.in <>configure.in <>configure.in <>configure.in <. -required=libtool +required='cc libtool' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/suffix8.test b/tests/suffix8.test index 921c6419e..27ac88467 100755 --- a/tests/suffix8.test +++ b/tests/suffix8.test @@ -18,7 +18,7 @@ # same suffix. # From PR/37. -required=libtoolize +required='cc libtoolize' . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/target-cflags.test b/tests/target-cflags.test index 499b7523c..cbb5e3338 100755 --- a/tests/target-cflags.test +++ b/tests/target-cflags.test @@ -18,6 +18,7 @@ # Test to make sure target specific CFLAGS work # Assar Westerlund +required=cc . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/transform.test b/tests/transform.test index 67da70e45..fb1550397 100755 --- a/tests/transform.test +++ b/tests/transform.test @@ -17,6 +17,7 @@ # Make sure that --program-transform works. +required=cc . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/transform2.test b/tests/transform2.test index d6411d2b5..010ca4013 100755 --- a/tests/transform2.test +++ b/tests/transform2.test @@ -18,6 +18,7 @@ # Make sure that --program-transform works even when multiple files are # collapsed. +required=cc . ./defs || Exit 1 cat >>configure.in <<'END' diff --git a/tests/upc.test b/tests/upc.test index ad072bf66..547aa79f4 100755 --- a/tests/upc.test +++ b/tests/upc.test @@ -17,6 +17,7 @@ # A simple Hello World for UPC. . ./defs || Exit 1 + cat >> configure.in << 'END' AM_PROG_UPC AC_OUTPUT @@ -43,5 +44,7 @@ $ACLOCAL $AUTOMAKE $AUTOCONF -./configure +./configure || Exit $? $MAKE distcheck + +: diff --git a/tests/upc3.test b/tests/upc3.test index 4692398b1..3c2acfda7 100755 --- a/tests/upc3.test +++ b/tests/upc3.test @@ -17,6 +17,7 @@ # Test that C and Unified Parallel C link safely. . ./defs || Exit 1 + cat >> configure.in << 'END' AC_PROG_CC AM_PROG_UPC @@ -58,5 +59,7 @@ $ACLOCAL $AUTOMAKE $AUTOCONF -./configure +./configure || Exit $? $MAKE distcheck + +: diff --git a/tests/vala4.test b/tests/vala4.test index acd4f7ee9..a7e6a7114 100755 --- a/tests/vala4.test +++ b/tests/vala4.test @@ -50,7 +50,7 @@ libtoolize $ACLOCAL $AUTOMAKE -a $AUTOCONF -./configure "VALAC=$cwd/valac" +./configure "VALAC=$cwd/valac" || Exit $? sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([9999.9])/' < configure.in >t mv -f t configure.in @@ -60,5 +60,6 @@ $AUTOCONF --force sed 's/AM_PROG_VALAC.*/AM_PROG_VALAC([1.2.3])/' < configure.in >t mv -f t configure.in $AUTOCONF --force -./configure "VALAC=$cwd/valac" +./configure "VALAC=$cwd/valac" || Exit $? + : diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test index 16caeb22c..6ce8256a3 100755 --- a/tests/yacc-basic.test +++ b/tests/yacc-basic.test @@ -16,7 +16,7 @@ # Basic semantic checks on Yacc support. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc-clean.test b/tests/yacc-clean.test index a05e5f23d..f97e18245 100755 --- a/tests/yacc-clean.test +++ b/tests/yacc-clean.test @@ -18,7 +18,7 @@ # are cleaned by "make clean", while .c and .h files derived from # distributed .y sources are cleaned by "make maintainer-clean". -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc-d-basic.test b/tests/yacc-d-basic.test index 015c44cec..e705f06c6 100755 --- a/tests/yacc-d-basic.test +++ b/tests/yacc-d-basic.test @@ -17,7 +17,7 @@ # Tests on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS # or maude_YFLAGS. -required=yacc +required='cc yacc' . ./defs || Exit 1 tab=' ' diff --git a/tests/yacc-d-vpath.test b/tests/yacc-d-vpath.test index 401998ec0..2e38529c0 100755 --- a/tests/yacc-d-vpath.test +++ b/tests/yacc-d-vpath.test @@ -22,7 +22,7 @@ # Please keep this in sync with sister test `yaccvpath.test'. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc-dist-nobuild.test b/tests/yacc-dist-nobuild.test index 7961a5f69..acdba6aa4 100755 --- a/tests/yacc-dist-nobuild.test +++ b/tests/yacc-dist-nobuild.test @@ -17,7 +17,7 @@ # Check that distributed Yacc-generated parsers are not uselessly # remade from an unpacked distributed tarball. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc-nodist.test b/tests/yacc-nodist.test index c55f40035..83f63dd03 100755 --- a/tests/yacc-nodist.test +++ b/tests/yacc-nodist.test @@ -16,7 +16,7 @@ # Checks for .c and .h files derived from non-distributed .y sources. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc4.test b/tests/yacc4.test index b66330062..eee210e8d 100755 --- a/tests/yacc4.test +++ b/tests/yacc4.test @@ -16,7 +16,7 @@ # Some simple tests of ylwrap functionality. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc7.test b/tests/yacc7.test index 5cea7afc5..0bd0b64d2 100755 --- a/tests/yacc7.test +++ b/tests/yacc7.test @@ -21,7 +21,7 @@ # Also check that the sources of the generated parser are distributed. # PR/47. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yacc8.test b/tests/yacc8.test index 88e41237d..c7cedc72f 100755 --- a/tests/yacc8.test +++ b/tests/yacc8.test @@ -17,7 +17,7 @@ # Test for subdir parsers. -required=yacc +required='cc yacc' . ./defs || Exit 1 diff --git a/tests/yaccdry.test b/tests/yaccdry.test index f30e7f3f2..fed10d38b 100755 --- a/tests/yaccdry.test +++ b/tests/yaccdry.test @@ -16,7 +16,7 @@ # Removal recovery rules for headers should not remove files with `make -n'. -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in << 'END' diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index c998373c6..aaebcaa40 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -23,7 +23,7 @@ # Please keep this in sync with sister test `yacc-d-vpath.test'. -required=yacc +required='cc yacc' . ./defs || Exit 1 distdir=$me-1.0 diff --git a/tests/yflags-cmdline-override.test b/tests/yflags-cmdline-override.test index aecff9fa7..accebe351 100755 --- a/tests/yflags-cmdline-override.test +++ b/tests/yflags-cmdline-override.test @@ -17,7 +17,7 @@ # Check that automake can cope with user-redefinition of $(YFLAGS) # at configure time and/or at make time. -required=yacc +required='cc yacc' . ./defs || Exit 1 unset YFLAGS || : diff --git a/tests/yflags-force-conditional.test b/tests/yflags-force-conditional.test index dd3b2dea3..a5b3599fb 100755 --- a/tests/yflags-force-conditional.test +++ b/tests/yflags-force-conditional.test @@ -20,7 +20,7 @@ . ./defs || Exit 1 cat >> configure.in <<'END' -AC_PROG_CC +AC_SUBST([CC], [false]) AC_PROG_YACC AM_CONDITIONAL([COND], [test x"$cond" = x"yes"]) AC_OUTPUT @@ -37,6 +37,7 @@ PATH=`pwd`/bin$PATH_SEPARATOR$PATH; export PATH YACC=fake-yacc; export YACC cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = no-dependencies bin_PROGRAMS = foo bar foo_SOURCES = foo.y main.c bar_SOURCES = $(foo_SOURCES) @@ -50,13 +51,6 @@ bar_yflags2 = __bar_cond_no__ endif !COND END -cat > main.c <<'END' -int main (void) -{ - return 0; -} -END - : > foo.y $ACLOCAL @@ -66,9 +60,8 @@ $AUTOMAKE -a -Wno-unsupported $EGREP '(YFLAGS|yflags|am__append)' Makefile.in # For debugging. ./configure cond=yes -$MAKE +$MAKE foo.c bar-foo.c -ls -l cat foo.c cat bar-foo.c @@ -80,9 +73,8 @@ $MAKE maintainer-clean ls -l ./configure cond=no -$MAKE +$MAKE foo.c bar-foo.c -ls -l cat foo.c cat bar-foo.c diff --git a/tests/yflags-force-override.test b/tests/yflags-force-override.test index b76b529ea..cf30f4666 100755 --- a/tests/yflags-force-override.test +++ b/tests/yflags-force-override.test @@ -18,7 +18,7 @@ # in Makefile.am (even if that is extremely bad practice, because that # variable is user-reserved). -required=yacc +required='cc yacc' . ./defs || Exit 1 cat >> configure.in <<'END' diff --git a/tests/yflags.test b/tests/yflags.test index aac198661..bf5611d3e 100755 --- a/tests/yflags.test +++ b/tests/yflags.test @@ -33,13 +33,14 @@ chmod a+x fake-yacc unset YACC || : cat >> configure.in <<'END' -AC_PROG_CC +AC_SUBST([CC], [false]) # Simulate presence of Yacc using our fake-yacc script. AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc]) AC_OUTPUT END cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = no-dependencies bin_PROGRAMS = foo bar foo_SOURCES = main.c foo.y bar_SOURCES = main.c bar.y @@ -53,19 +54,17 @@ $AUTOMAKE -a grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1 grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1 -echo 'int main(void){ return 0; }' > main.c : > foo.y : > bar.y $AUTOCONF ./configure -env YFLAGS=__user_flags__ $MAKE -e - -ls -l +env YFLAGS=__user_flags__ $MAKE -e foo.c bar-bar.c cat foo.c -grep '__am_flags__.*__user_flags__' foo.c cat bar-bar.c + +grep '__am_flags__.*__user_flags__' foo.c grep '__bar_flags__.*__user_flags__' bar-bar.c : diff --git a/tests/yflags2.test b/tests/yflags2.test index 803cecc28..8e17d08da 100755 --- a/tests/yflags2.test +++ b/tests/yflags2.test @@ -33,13 +33,14 @@ chmod a+x fake-yacc unset YACC || : cat >> configure.in <<'END' -AC_PROG_CXX +AC_SUBST([CXX], [false]) # Simulate presence of Yacc using our fake-yacc script. AC_SUBST([YACC], ['$(abs_top_srcdir)'/fake-yacc]) AC_OUTPUT END cat > Makefile.am <<'END' +AUTOMAKE_OPTIONS = no-dependencies bin_PROGRAMS = foo bar foo_SOURCES = main.cc foo.yy bar_SOURCES = main.cc bar.y++ @@ -53,19 +54,17 @@ $AUTOMAKE -a grep '\$(YFLAGS).*\$(bar_YFLAGS)' Makefile.in && Exit 1 grep '\$(YFLAGS).*\$(AM_YFLAGS)' Makefile.in && Exit 1 -echo 'int main(void) { return 0; }' > main.cc : > foo.yy : > bar.y++ $AUTOCONF ./configure -env YFLAGS=__user_flags__ $MAKE -e - -ls -l +env YFLAGS=__user_flags__ $MAKE -e foo.cc bar-bar.c++ cat foo.cc -grep '__am_flags__.*__user_flags__' foo.cc cat bar-bar.c++ + +grep '__am_flags__.*__user_flags__' foo.cc grep '__bar_flags__.*__user_flags__' bar-bar.c++ :