From ade2741bfbcbd4293e231490fd4f95a605d55383 Mon Sep 17 00:00:00 2001 From: Alexandre Duret-Lutz Date: Tue, 18 Jun 2002 19:08:20 +0000 Subject: [PATCH] * tests/defs (required): Handle `GNUmake'. (needs_gnu_make): Don't define anymore. * tests/cond4.test, tests/cond18.test, tests/cond19.test, tests/dollar.test, tests/exsource.test, tests/extra6.test, tests/lex3.test, tests/make.test, tests/pr9.test, tests/pr87.test, tests/subdir5.test, tests/target-cflags.test, tests/yacc7.test, tests/yaccvpath.test: Use `required=GNUmake' instead of `$needs_gnu_make'. --- ChangeLog | 11 +++++++++++ tests/cond18.test | 3 +-- tests/cond19.test | 3 +-- tests/cond4.test | 3 +-- tests/defs | 37 ++++++++++++++++++------------------- tests/dollar.test | 5 ++--- tests/exsource.test | 3 +-- tests/extra6.test | 5 ++--- tests/lex3.test | 4 +--- tests/make.test | 3 +-- tests/pr87.test | 4 ++-- tests/pr9.test | 8 ++------ tests/subdir5.test | 5 ++--- tests/target-cflags.test | 3 +-- tests/yacc7.test | 3 +-- tests/yaccvpath.test | 4 ++-- 16 files changed, 49 insertions(+), 55 deletions(-) diff --git a/ChangeLog b/ChangeLog index 9eb35065..d6fd296e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,14 @@ +2002-06-18 Alexandre Duret-Lutz + + * tests/defs (required): Handle `GNUmake'. + (needs_gnu_make): Don't define anymore. + * tests/cond4.test, tests/cond18.test, tests/cond19.test, + tests/dollar.test, tests/exsource.test, tests/extra6.test, + tests/lex3.test, tests/make.test, tests/pr9.test, tests/pr87.test, + tests/subdir5.test, tests/target-cflags.test, tests/yacc7.test, + tests/yaccvpath.test: Use `required=GNUmake' instead of + `$needs_gnu_make'. + 2002-06-17 Paolo Bonzini * automake.in (process_option_list): Recognize std-options. diff --git a/tests/cond18.test b/tests/cond18.test index fe1e9a74..8cac3065 100755 --- a/tests/cond18.test +++ b/tests/cond18.test @@ -3,6 +3,7 @@ # Regression test for substitution references to conditional variables. # Report from Richard Boulton +required=GNUmake . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -44,8 +45,6 @@ END CFLAGS= export CFLAGS -$needs_gnu_make - set -e $ACLOCAL diff --git a/tests/cond19.test b/tests/cond19.test index 95826fc7..8108d29a 100755 --- a/tests/cond19.test +++ b/tests/cond19.test @@ -3,6 +3,7 @@ # Regression test for substitution references to conditional variables. # Report from Richard Boulton +required=GNUmake . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -46,8 +47,6 @@ END CFLAGS= export CFLAGS -$needs_gnu_make - set -e $ACLOCAL diff --git a/tests/cond4.test b/tests/cond4.test index 7b99288a..15e89f86 100755 --- a/tests/cond4.test +++ b/tests/cond4.test @@ -2,6 +2,7 @@ # Another sources-in-conditional test. Report from Tim Goodwin. +required=GNUmake . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -43,8 +44,6 @@ $AUTOCONF || exit 1 CFLAGS= export CFLAGS -$needs_gnu_make - CC='gcc' CONDITION1=true CONDITION2=true ./configure || exit 1 msgtt=`$MAKE --no-print-directory echo-objects` CC='gcc' CONDITION1=true CONDITION2=false ./configure || exit 1 diff --git a/tests/defs b/tests/defs index dcfa97c2..684126ea 100644 --- a/tests/defs +++ b/tests/defs @@ -16,12 +16,28 @@ test -z "$VERBOSE" && { exec > /dev/null 2>&1 } +# User can override various tools used. +test -z "$PERL" && PERL=perl +test -z "$MAKE" && MAKE=make +test -z "$AUTOCONF" && AUTOCONF=autoconf +test -z "$AUTOHEADER" && AUTOHEADER=autoheader + if test -n "$required" then for tool in $required do - echo "$me: running $tool --version" - ( $tool --version ) || exit 77 + # Check that each required tool is present. + case $tool in + GNUmake) + echo "$me: running $MAKE --version" + ( $MAKE --version ) || exit 77 + ;; + # Generic case: the tool must support --version. + *) + echo "$me: running $tool --version" + ( $tool --version ) || exit 77 + ;; + esac done fi @@ -60,12 +76,6 @@ AC_PROG_MAKE_SET AC_CONFIG_FILES([Makefile]) END -# User can set PERL to change the perl interpreter used. -test -z "$PERL" && PERL=perl - -# User can set MAKE to choose which make to use. Must use GNU make. -test -z "$MAKE" && MAKE=make - # Unset some MAKE... variables that may cause $MAKE to act like a # recursively invoked sub-make. Any $MAKE invocation in a test is # conceptually an independent invocation, not part of the main @@ -75,17 +85,6 @@ unset MAKEFLAGS unset MAKELEVEL unset DESTDIR -if ($MAKE --version) > /dev/null 2>&1; then - needs_gnu_make=: -else - needs_gnu_make='exit 77' -fi - -# User can set which tools from Autoconf to use. -test -z "$AUTOCONF" && AUTOCONF=autoconf -test -z "$AUTOHEADER" && AUTOHEADER=autoheader - - echo "=== Running test $0" # See how Automake should be run. We put --foreign as the default diff --git a/tests/dollar.test b/tests/dollar.test index f4faf256..af084a39 100755 --- a/tests/dollar.test +++ b/tests/dollar.test @@ -4,11 +4,10 @@ # Java people need this. # PR/317, reported by Eric Siegerman and Philip Fong. -. $srcdir/defs - # Require GNU make for this test. SunOS Make does not support # `$$' in a target or a dependency (it outputs the empty string instead). -$needs_gnu_make +required=GNUmake +. $srcdir/defs set -e diff --git a/tests/exsource.test b/tests/exsource.test index 46f0798f..8b7749da 100755 --- a/tests/exsource.test +++ b/tests/exsource.test @@ -3,10 +3,9 @@ # Test to make sure EXTRA_..._SOURCES actually works. # Bug report from Henrik Frystyk Nielsen. +required=GNUmake . $srcdir/defs || exit 1 -$needs_gnu_make - cat >> configure.in << 'END' AC_PROG_CC END diff --git a/tests/extra6.test b/tests/extra6.test index b0f5d7b5..ed4a9fcc 100755 --- a/tests/extra6.test +++ b/tests/extra6.test @@ -3,10 +3,9 @@ # Check to make sure EXTRA_DIST can contain a directory or # a subdirectory, in $(builddir) or $(srcdir). -. $srcdir/defs || exit 1 - # 'make distdir' + VPATH does not work with Solaris make. -$needs_gnu_make +required=GNUmake +. $srcdir/defs || exit 1 set -e diff --git a/tests/lex3.test b/tests/lex3.test index f110ea30..be6c31d6 100755 --- a/tests/lex3.test +++ b/tests/lex3.test @@ -3,11 +3,9 @@ # Test associated with PR 19. # From Matthew D. Langston. +required=GNUmake . $srcdir/defs || exit 1 -# Likewise for GNU Make (we need VPATH support for `make distcheck'). -$needs_gnu_make - # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 diff --git a/tests/make.test b/tests/make.test index 6cc51191..ca7ea4e3 100755 --- a/tests/make.test +++ b/tests/make.test @@ -3,6 +3,7 @@ # Test to make sure `make' check works. # From Ralf Corsepius. +required=GNUmake . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -14,8 +15,6 @@ END : > Makefile.am -$needs_gnu_make - set -e $ACLOCAL diff --git a/tests/pr87.test b/tests/pr87.test index fbad9763..80499e93 100755 --- a/tests/pr87.test +++ b/tests/pr87.test @@ -2,10 +2,10 @@ # Test for PR automake/87. +# Require GNU make for `make distcheck' +required=GNUmake . $srcdir/defs || exit 1 -$needs_gnu_make # for `make distcheck' - subdirs="foo bar" for i in $subdirs; do diff --git a/tests/pr9.test b/tests/pr9.test index 5fa6abd8..9a9455fa 100755 --- a/tests/pr9.test +++ b/tests/pr9.test @@ -2,6 +2,8 @@ # Test for bug in PR 9. +# `distcheck' requires GNU make. +required='GNUmake gzip' . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -15,12 +17,6 @@ END mkdir support -# Likewise for gzip. -(gzip --version) > /dev/null 2>&1 || exit 77 - -# `distcheck' requires GNU make. -$needs_gnu_make - $ACLOCAL || exit 1 $AUTOCONF || exit 1 diff --git a/tests/subdir5.test b/tests/subdir5.test index 054416a0..48c9e310 100755 --- a/tests/subdir5.test +++ b/tests/subdir5.test @@ -3,11 +3,10 @@ # Test to make sure that adding a new directory works. # PR automake/46 -. $srcdir/defs || exit 1 - # This test assumes that the `make' utility is able to start # over and reload Makefiles which have been remade (a non-POSIX feature). -$needs_gnu_make +required=GNUmake +. $srcdir/defs || exit 1 cat > configure.in << 'END' AC_INIT(a.c) diff --git a/tests/target-cflags.test b/tests/target-cflags.test index f2e52566..14b1d6ce 100755 --- a/tests/target-cflags.test +++ b/tests/target-cflags.test @@ -3,6 +3,7 @@ # Test to make sure target specific CFLAGS work # Assar Westerlund +required=GNUmake . $srcdir/defs || exit 1 cat > configure.in << 'END' @@ -40,8 +41,6 @@ END # Likewise for gcc. (gcc -v) > /dev/null 2>&1 || exit 77 -$needs_gnu_make - set -e $ACLOCAL diff --git a/tests/yacc7.test b/tests/yacc7.test index 750692df..db4dd691 100755 --- a/tests/yacc7.test +++ b/tests/yacc7.test @@ -6,10 +6,9 @@ # Also check that the sources of the generated parser are distributed. # PR/47. +required=GNUmake . $srcdir/defs || exit 1 -$needs_gnu_make - cat >> configure.in << 'END' AC_PROG_CC AC_PROG_YACC diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index 04727993..923cc078 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -6,10 +6,10 @@ # `make' and `make distdir' and check whether the version of `parse.c' # to be distributed is up to date. +# Require GNU make for `make distdir' +required=GNUmake . $srcdir/defs || exit 1 -$needs_gnu_make # for `make distdir' - # Likewise for some other tools. (gcc -v) > /dev/null 2>&1 || exit 77 (bison -V) > /dev/null 2>&1 || exit 77 -- 2.43.5