automake-ng
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-ng] [PATCH 1/5] [ng] tests: no need to explicitly require GNU


From: Stefano Lattarini
Subject: [Automake-ng] [PATCH 1/5] [ng] tests: no need to explicitly require GNU make
Date: Sat, 17 Dec 2011 11:51:33 +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 (GNUmake): Drop this 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/yacc6.test: Likewise.
---
 ChangeLog                    |   29 +++++++++++++++++++++++++++++
 Makefile.am                  |   16 ++++++++++++++++
 Makefile.in                  |   13 +++++++++++++
 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/maken2.test            |    1 -
 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/vala2.test             |    2 +-
 tests/vala3.test             |    2 +-
 tests/vala5.test             |    2 +-
 tests/yacc6.test             |    2 +-
 23 files changed, 65 insertions(+), 30 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 052fe3c..05e96ff 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,34 @@
 2011-12-15  Stefano Lattarini  <address@hidden>
 
+       [ng] tests: no need to explicitly require GNU make
+       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 (GNUmake): Drop this 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/yacc6.test: Likewise.
+
+2011-12-15  Stefano Lattarini  <address@hidden>
+
        [ng] begin: branching automake-ng, from testsuite-work branch
        This is the starting point of an experimental non-hostile fork
        of automake, whose generated makefiles will only target GNU
diff --git a/Makefile.am b/Makefile.am
index cb6ecf5..2540436 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -188,6 +188,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 \
@@ -430,6 +431,21 @@ 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' \
+         $(srcdir)/tests/*.test \
+         $(srcdir)/tests/*.tap \
+         $(srcdir)/tests/*.sh \
+         $(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/Makefile.in b/Makefile.in
index 14edb72..c7be1e9 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -328,6 +328,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 \
@@ -1204,6 +1205,18 @@ sc_AMDEP_TRUE_in_automake_in:
          exit 1; \
        fi
 
+sc_tests_no_gmake_requirement:
+       @if grep -iE '^ *required=.*\b(gmake|gnumake)\b' \
+         $(srcdir)/tests/*.test \
+         $(srcdir)/tests/*.tap \
+         $(srcdir)/tests/*.sh \
+         $(srcdir)/tests/defs \
+         $(srcdir)/tests/defs-static.in \
+       ; then \
+         echo 'Tests should never require GNU make explicitly.' 1>&2; \
+         exit 1; \
+       fi
+
 sc_tests_make_without_am_makeflags:
        @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
                grep -v 'AM_MAKEFLAGS'; then \
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 cf15eab..ed43681 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/maken2.test b/tests/maken2.test
index a6625e2..ee998a3 100755
--- a/tests/maken2.test
+++ b/tests/maken2.test
@@ -20,7 +20,6 @@
 
 # Please keep this test in sync with sister test maken.test.
 
-required=GNUmake
 . ./defs || Exit 1
 
 mkdir sub
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 69ce1c1..daffc33 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/vala2.test b/tests/vala2.test
index 55e9b8e..0687f94 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -21,7 +21,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 8de96d6..e9aeac2 100755
--- a/tests/vala3.test
+++ b/tests/vala3.test
@@ -21,7 +21,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 66cffe7..5c7e00e 100755
--- a/tests/vala5.test
+++ b/tests/vala5.test
@@ -21,7 +21,7 @@
 
 # Test per-target flags.
 
-required="libtool libtoolize pkg-config valac gcc GNUmake"
+required="libtool libtoolize 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.2.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]