[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-ng] [PATCH 2/8] [ng] tests: no need to explicitly require GNU
From: |
Stefano Lattarini |
Subject: |
[Automake-ng] [PATCH 2/8] [ng] tests: no need to explicitly require GNU make |
Date: |
Thu, 19 Jan 2012 22:59:30 +0100 |
Automake-NG assumes the use of GNU make unconditionally, so
test cases should never require GNU make explicitly.
* Makefile.am (sc_tests_no_gmake_requirement): New maintainer
check.
(syntax_check_rules): Add it.
* tests/defs: Drop handling of the special "GNUmake" requirement.
* tests/colneq3.test: Drop "GNUmake" requirement.
* tests/dollar.test: Likewise.
* tests/extra10.test: Likewise.
* tests/extra11.test: Likewise.
* tests/extra12.test: Likewise.
* tests/gnumake.test: Likewise.
* tests/lisp8.test: Likewise.
* tests/make.test: Likewise.
* tests/makej.test: Likewise.
* tests/maken2.test: Likewise.
* tests/multlib.test: Likewise.
* tests/parallel-tests3.test: Likewise.
* tests/parallel-tests5.test: Likewise.
* tests/remake-subdir-gnu.test: Likewise.
* tests/suffix6b.test: Likewise.
* tests/vala2.test: Likewise.
* tests/vala3.test: Likewise.
* tests/vala5.test: Likewise.
* tests/vala-vpath.test: Likewise.
* tests/vala-mix.test: Likewise.
* tests/yacc6.test: Likewise.
---
Makefile.am | 11 +++++++++++
tests/colneq3.test | 1 -
tests/defs | 11 -----------
tests/dollar.test | 1 -
tests/extra10.test | 1 -
tests/extra11.test | 1 -
tests/extra12.test | 1 -
tests/gnumake.test | 1 -
tests/lisp8.test | 2 +-
tests/make.test | 1 -
tests/makej.test | 1 -
tests/maken.test | 2 +-
tests/multlib.test | 2 +-
tests/parallel-tests3.test | 1 -
tests/parallel-tests5.test | 2 +-
tests/remake-subdir-gnu.test | 1 -
tests/suffix6b.test | 1 -
tests/vala-mix.test | 2 +-
tests/vala-vpath.test | 2 +-
tests/vala2.test | 2 +-
tests/vala3.test | 2 +-
tests/vala5.test | 2 +-
tests/yacc6.test | 2 +-
23 files changed, 21 insertions(+), 32 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index fc37ef1..d23cb18 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -229,6 +229,7 @@ sc_perl_at_uscore_in_scalar_context \
sc_perl_local_no_parens \
sc_perl_local \
sc_AMDEP_TRUE_in_automake_in \
+sc_tests_no_gmake_requirement \
sc_tests_make_without_am_makeflags \
sc_tests_obsolete_variables \
sc_tests_plain_make \
@@ -465,6 +466,16 @@ sc_AMDEP_TRUE_in_automake_in:
exit 1; \
fi
+## Tests should never require GNU make explicitly: automake-ng assumes
+## it unconditionally.
+sc_tests_no_gmake_requirement:
+ @if grep -iE '^ *required=.*\b(gmake|gnumake)\b' \
+ $(xtests) $(srcdir)/tests/defs $(srcdir)/tests/defs-static.in \
+ ; then \
+ echo 'Tests should never require GNU make explicitly.' 1>&2; \
+ exit 1; \
+ fi
+
## Tests should never call make directly.
sc_tests_make_without_am_makeflags:
@if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
diff --git a/tests/colneq3.test b/tests/colneq3.test
index 96c02d7..d2f14dd 100755
--- a/tests/colneq3.test
+++ b/tests/colneq3.test
@@ -16,7 +16,6 @@
# Test that := definitions work as expected at make time.
-required=GNUmake
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/defs b/tests/defs
index d6bc51e..aed5d4f 100644
--- a/tests/defs
+++ b/tests/defs
@@ -682,17 +682,6 @@ do
etags --version -o /dev/null \
|| skip_all_ "required program \`etags' not available"
;;
- GNUmake)
- for make_ in "$MAKE" gmake gnumake :; do
- MAKE=$make_ am__using_gmake=''
- test "$MAKE" = : && break
- echo "$me: determine whether $MAKE is GNU make"
- using_gmake && break
- done
- test "$MAKE" = : && skip_all_ "this test requires GNU make"
- export MAKE
- unset make_
- ;;
gcc)
# When gcc is required, export `CC=gcc' so that ./configure
# always use it. This is important only when the user
diff --git a/tests/dollar.test b/tests/dollar.test
index 81d4cbc..271c6fe 100755
--- a/tests/dollar.test
+++ b/tests/dollar.test
@@ -20,7 +20,6 @@
# Require GNU make for this test. SunOS Make does not support
# `$$' in a target or a dependency (it outputs the empty string instead).
-required=GNUmake
. ./defs || Exit 1
echo AC_OUTPUT >> configure.in
diff --git a/tests/extra10.test b/tests/extra10.test
index f44b1e2..302ad77 100755
--- a/tests/extra10.test
+++ b/tests/extra10.test
@@ -17,7 +17,6 @@
# Check that wildcards in EXTRA_DIST are honoured.
# Suggested by observations from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
echo AC_OUTPUT >> configure.in
diff --git a/tests/extra11.test b/tests/extra11.test
index fb7c559..4450db5 100755
--- a/tests/extra11.test
+++ b/tests/extra11.test
@@ -17,7 +17,6 @@
# Check for more complex usage of wildcards in EXTRA_DIST.
# Suggested by observations from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
echo AC_OUTPUT >> configure.in
diff --git a/tests/extra12.test b/tests/extra12.test
index af079b0..75e2b44 100755
--- a/tests/extra12.test
+++ b/tests/extra12.test
@@ -18,7 +18,6 @@
# $srcdir != $builddir, if properly declared.
# Suggested by observations from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
echo AC_OUTPUT >> configure.in
diff --git a/tests/gnumake.test b/tests/gnumake.test
index f5f299f..22f2a65 100755
--- a/tests/gnumake.test
+++ b/tests/gnumake.test
@@ -17,7 +17,6 @@
# Automake should not assume that make files are called Makefile.
# Report from Braden McDaniel.
-required=GNUmake
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/lisp8.test b/tests/lisp8.test
index 5b8a6ff..81f748f 100755
--- a/tests/lisp8.test
+++ b/tests/lisp8.test
@@ -16,7 +16,7 @@
# Check the recover rule of lisp_LISP with parallel make.
-required='GNUmake emacs'
+required=emacs
. ./defs || Exit 1
cat > Makefile.am << 'EOF'
diff --git a/tests/make.test b/tests/make.test
index eb4656a..651e805 100755
--- a/tests/make.test
+++ b/tests/make.test
@@ -17,7 +17,6 @@
# Test to make sure `make' check works.
# From Ralf Corsepius.
-required=GNUmake
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/makej.test b/tests/makej.test
index e54c144..1ae4139 100755
--- a/tests/makej.test
+++ b/tests/makej.test
@@ -21,7 +21,6 @@
# depend on the time at which autoconf and automake update the cache
# via autom4te.
-required=GNUmake
. ./defs || Exit 1
cat >configure.in <<END
diff --git a/tests/maken.test b/tests/maken.test
index 01b4448..4b61b21 100755
--- a/tests/maken.test
+++ b/tests/maken.test
@@ -17,7 +17,7 @@
# Ensure that `make -n dist' and `make -n distcheck' do not change files
# on disk, due to GNU make executing rules containing `$(MAKE)'.
# Also, ensure that `make -n dist' and `make -n distcheck' show what
-# would happen, at least when using GNU make.
+# would happen.
. ./defs || Exit 1
diff --git a/tests/multlib.test b/tests/multlib.test
index abb5a16..0c418be 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -18,7 +18,7 @@
# Check multilib support.
# Based on a test case from Ralf Corsepius.
-required='gcc GNUmake'
+required=gcc
. ./defs || Exit 1
cat >configure.in <<'END'
diff --git a/tests/parallel-tests3.test b/tests/parallel-tests3.test
index d5275a8..ea486c9 100755
--- a/tests/parallel-tests3.test
+++ b/tests/parallel-tests3.test
@@ -18,7 +18,6 @@
# - concurrent parallel execution
am_parallel_tests=yes
-required=GNUmake
. ./defs || Exit 1
case $MAKE in
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests5.test
index cd062bd..997d011 100755
--- a/tests/parallel-tests5.test
+++ b/tests/parallel-tests5.test
@@ -21,7 +21,7 @@
# It merely serves as demonstration. :-)
am_parallel_tests=yes
-required='cc native GNUmake'
+required='cc native'
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/remake-subdir-gnu.test b/tests/remake-subdir-gnu.test
index bda1ac7..5537e66 100755
--- a/tests/remake-subdir-gnu.test
+++ b/tests/remake-subdir-gnu.test
@@ -20,7 +20,6 @@
# See also the other similar tests `remake-subdir*.test', and the
# related test `aclocal5.test'
-required=GNUmake
. ./defs || Exit 1
magic1='::MagicString::One::'
diff --git a/tests/suffix6b.test b/tests/suffix6b.test
index b4da6bb..badc969 100755
--- a/tests/suffix6b.test
+++ b/tests/suffix6b.test
@@ -17,7 +17,6 @@
# Test to make sure Automake supports implicit rules with dot-less
# extensions. Se also related "grepping" test suffix6.test.
-required=GNUmake # Other makes might not grok dot-less suffix rules.
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/vala-mix.test b/tests/vala-mix.test
index f597a7f..ba2f108 100755
--- a/tests/vala-mix.test
+++ b/tests/vala-mix.test
@@ -16,7 +16,7 @@
# Vala sources and C sources in the same program. Functional test.
-required='cc GNUmake'
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/vala-vpath.test b/tests/vala-vpath.test
index 8f2b677..04c1aa1 100755
--- a/tests/vala-vpath.test
+++ b/tests/vala-vpath.test
@@ -17,7 +17,7 @@
# Test to make sure vala support handles from-scratch VPATH builds.
# See automake bug#8753.
-required="valac GNUmake"
+required=valac
. ./defs || Exit 1
set -e
diff --git a/tests/vala2.test b/tests/vala2.test
index 2a320dd..be3cb99 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -17,7 +17,7 @@
# Test to make sure compiling Vala code really works with recursive make.
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="libtool libtoolize pkg-config valac gcc"
. ./defs || Exit 1
mkdir src
diff --git a/tests/vala3.test b/tests/vala3.test
index 338ca60..c25bb84 100755
--- a/tests/vala3.test
+++ b/tests/vala3.test
@@ -17,7 +17,7 @@
# Test to make sure compiling Vala code really works with non-recursive make.
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="libtool libtoolize pkg-config valac gcc"
. ./defs || Exit 1
mkdir src
diff --git a/tests/vala5.test b/tests/vala5.test
index 7633d48..e0bfed0 100755
--- a/tests/vala5.test
+++ b/tests/vala5.test
@@ -17,7 +17,7 @@
# Test per-target flags.
-required="pkg-config valac gcc GNUmake"
+required="pkg-config valac gcc"
. ./defs || Exit 1
mkdir src
diff --git a/tests/yacc6.test b/tests/yacc6.test
index 8992e95..edf9dea 100755
--- a/tests/yacc6.test
+++ b/tests/yacc6.test
@@ -20,7 +20,7 @@
# Also make sure depcomp does not needlessly update headers.
# Report from Paolo Bonzini.
-required='gcc yacc GNUmake'
+required='gcc yacc'
. ./defs || Exit 1
cat > configure.in << 'END'
--
1.7.7.3
- [Automake-ng] [FYI] More branches for Automake-NG, Stefano Lattarini, 2012/01/19
- Re: [Automake-ng] [FYI] More branches for Automake-NG, Jim Meyering, 2012/01/19
- [Automake-ng] [PATCH 4/8] [ng] tests: just assume make can chain suffix rules automatically, Stefano Lattarini, 2012/01/19
- [Automake-ng] [PATCH 6/8] [ng] tests: GNU make doesn't perform VPATH rewrites, Stefano Lattarini, 2012/01/19
- [Automake-ng] [PATCH 2/8] [ng] tests: no need to explicitly require GNU make,
Stefano Lattarini <=
- [Automake-ng] [PATCH 5/8] [ng] test: don't unset variables not influential on GNU make, Stefano Lattarini, 2012/01/19
- [Automake-ng] [PATCH 3/8] [ng] tests: no need explicitly check whether $MAKE is GNU make, Stefano Lattarini, 2012/01/19
- [Automake-ng] [PATCH 7/8] [ng] general: can override make macros on cmdline, Stefano Lattarini, 2012/01/19
- Re: [Automake-ng] [PATCH 7/8] [ng] general: can override make macros on cmdline, Jim Meyering, 2012/01/20
- Re: [Automake-ng] [PATCH 7/8] [ng] general: can override make macros on cmdline, Stefano Lattarini, 2012/01/20
- [Automake-ng] [PATCH 8/8] [ng] general: "make -e" is not needed anymore, Stefano Lattarini, 2012/01/19
- Re: [Automake-ng] [PATCH 8/8] [ng] general: "make -e" is not needed anymore, Jim Meyering, 2012/01/20
- Re: [Automake-ng] [PATCH 8/8] [ng] general: "make -e" is not needed anymore, Stefano Lattarini, 2012/01/20
- Re: [Automake-ng] More branches for Automake-NG, Stefano Lattarini, 2012/01/22