automake-ng
[Top][All Lists]
Advanced

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

[Automake-ng] [PATCH 2/5] [ng] tests: no need explicitly check whether $


From: Stefano Lattarini
Subject: [Automake-ng] [PATCH 2/5] [ng] tests: no need explicitly check whether $MAKE is GNU make
Date: Sat, 17 Dec 2011 11:51:34 +0100

Automake-NG assumes the use of GNU make unconditionally, so test
cases should never check explicitly whether the make program
being used in the test suite is indeed GNU make.

* Makefile.am (sc_tests_no_gmake_checking): New maintainer check.
(syntax_check_rules): Add it.
* tests/defs (using_gmake): Remove this function.
(make_can_chain_suffix_rules): Simplify by always assuming that
$MAKE is GNU make.
* tests/aclocal4.test: Remove usages of `using_gmake', and, where
possible, simplify code and logic by assuming that $MAKE is always
GNU make.
* tests/check4.test: Likewise.
* tests/distcheck-missing-m4.test: Likewise.
* tests/distcheck-outdated-m4.test: Likewise.
* tests/lex5.test: Likewise.
* tests/maken4.test: Likewise.
* tests/output6.test: Likewise.
* tests/parallel-tests-fork-bomb.test: Likewise.
* tests/remake-deleted-m4-file.test: Likewise.
* tests/remake-gnulib-add-acsubst.test: Likewise.
* tests/remake-gnulib-add-header.test: Likewise.
* tests/remake-gnulib-remove-header.test: Likewise.
* tests/remake-moved-m4-file.test: Likewise.
* tests/remake-renamed-m4-file.test: Likewise.
* tests/remake-renamed-m4-macro-and-file.test: Likewise.
* tests/remake-renamed-m4-macro.test: Likewise.
* tests/remake-subdir-from-subdir.test: Likewise.
* tests/remake-subdir.test: Likewise.
* tests/remake10a.test: Likewise.
* tests/remake10b.test: Likewise.
* tests/remake10c.test: Likewise.
* tests/remake12.test: Likewise.
* tests/remake5.test: Likewise.
* tests/remake8a.test: Likewise.
* tests/remake8b.test: Likewise.
* tests/remake9a.test: Likewise.
* tests/remake9b.test: Likewise.
* tests/remake9c.test: Likewise.
* tests/remake9d.test: Likewise.
* tests/subpkg-yacc.test: Likewise.
* tests/version7.test: Likewise.
---
 ChangeLog                                   |   45 ++++++++++++++++
 Makefile.am                                 |   16 ++++++
 Makefile.in                                 |   14 +++++
 tests/aclocal4.test                         |    1 -
 tests/check4.test                           |   18 +++----
 tests/defs                                  |   58 +-------------------
 tests/distcheck-missing-m4.test             |    2 -
 tests/distcheck-outdated-m4.test            |    3 -
 tests/lex5.test                             |    1 -
 tests/maken4.test                           |   16 ------
 tests/output6.test                          |    1 -
 tests/parallel-tests-fork-bomb.test         |   77 +++------------------------
 tests/remake-deleted-m4-file.test           |    2 -
 tests/remake-gnulib-add-acsubst.test        |    2 -
 tests/remake-gnulib-add-header.test         |    1 -
 tests/remake-gnulib-remove-header.test      |    2 -
 tests/remake-moved-m4-file.test             |    2 -
 tests/remake-renamed-m4-file.test           |    3 -
 tests/remake-renamed-m4-macro-and-file.test |    2 -
 tests/remake-renamed-m4-macro.test          |    2 -
 tests/remake-subdir-from-subdir.test        |    1 -
 tests/remake-subdir.test                    |   10 +---
 tests/remake10a.test                        |    7 +--
 tests/remake10b.test                        |    7 +--
 tests/remake10c.test                        |    7 +--
 tests/remake12.test                         |   33 +----------
 tests/remake5.test                          |   14 ++----
 tests/remake8a.test                         |    2 -
 tests/remake8b.test                         |    2 -
 tests/remake9a.test                         |   11 +---
 tests/remake9b.test                         |   11 +---
 tests/remake9c.test                         |   11 +---
 tests/remake9d.test                         |   11 +---
 tests/subpkg-yacc.test                      |   33 ++---------
 tests/version7.test                         |    1 -
 35 files changed, 119 insertions(+), 310 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 05e96ff..6a35067 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,50 @@
 2011-12-15  Stefano Lattarini  <address@hidden>
 
+       [ng] tests: no need explicitly check whether $MAKE is GNU make
+       Automake-NG assumes the use of GNU make unconditionally, so test
+       cases should never check explicitly whether the make program
+       being used in the test suite is indeed GNU make.
+       * Makefile.am (sc_tests_no_gmake_checking): New maintainer check.
+       (syntax_check_rules): Add it.
+       * tests/defs (using_gmake): Remove this function.
+       (make_can_chain_suffix_rules): Simplify by always assuming that
+       $MAKE is GNU make.
+       * tests/aclocal4.test: Remove usages of `using_gmake', and, where
+       possible, simplify code and logic by assuming that $MAKE is always
+       GNU make.
+       * tests/check4.test: Likewise.
+       * tests/distcheck-missing-m4.test: Likewise.
+       * tests/distcheck-outdated-m4.test: Likewise.
+       * tests/lex5.test: Likewise.
+       * tests/maken4.test: Likewise.
+       * tests/output6.test: Likewise.
+       * tests/parallel-tests-fork-bomb.test: Likewise.
+       * tests/remake-deleted-m4-file.test: Likewise.
+       * tests/remake-gnulib-add-acsubst.test: Likewise.
+       * tests/remake-gnulib-add-header.test: Likewise.
+       * tests/remake-gnulib-remove-header.test: Likewise.
+       * tests/remake-moved-m4-file.test: Likewise.
+       * tests/remake-renamed-m4-file.test: Likewise.
+       * tests/remake-renamed-m4-macro-and-file.test: Likewise.
+       * tests/remake-renamed-m4-macro.test: Likewise.
+       * tests/remake-subdir-from-subdir.test: Likewise.
+       * tests/remake-subdir.test: Likewise.
+       * tests/remake10a.test: Likewise.
+       * tests/remake10b.test: Likewise.
+       * tests/remake10c.test: Likewise.
+       * tests/remake12.test: Likewise.
+       * tests/remake5.test: Likewise.
+       * tests/remake8a.test: Likewise.
+       * tests/remake8b.test: Likewise.
+       * tests/remake9a.test: Likewise.
+       * tests/remake9b.test: Likewise.
+       * tests/remake9c.test: Likewise.
+       * tests/remake9d.test: Likewise.
+       * tests/subpkg-yacc.test: Likewise.
+       * tests/version7.test: Likewise.
+
+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.
diff --git a/Makefile.am b/Makefile.am
index 2540436..6402850 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -189,6 +189,7 @@ sc_perl_local_no_parens \
 sc_perl_local \
 sc_AMDEP_TRUE_in_automake_in \
 sc_tests_no_gmake_requirement \
+sc_tests_no_gmake_checking \
 sc_tests_make_without_am_makeflags \
 sc_tests_obsolete_variables \
 sc_tests_plain_make \
@@ -445,6 +446,21 @@ sc_tests_no_gmake_requirement:
          exit 1; \
        fi
 
+## Tests should never check explicitly whether the make program being
+## used in the test suite is indeed GNU make: automake-ng assumes it
+## unconditionally.
+sc_tests_no_gmake_checking:
+       @if grep -E '\b(is|using)_gmake\b' \
+         $(srcdir)/tests/*.test \
+         $(srcdir)/tests/*.tap \
+         $(srcdir)/tests/*.sh \
+         $(srcdir)/tests/defs \
+         $(srcdir)/tests/defs-static.in \
+       ; then \
+         echo 'Tests should never explicitly check whether $$MAKE' \
+              'is GNU make.' 1>&2; \
+         exit 1; \
+       fi
 
 ## Tests should never call make directly.
 sc_tests_make_without_am_makeflags:
diff --git a/Makefile.in b/Makefile.in
index c7be1e9..b815d2a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -329,6 +329,7 @@ sc_perl_local_no_parens \
 sc_perl_local \
 sc_AMDEP_TRUE_in_automake_in \
 sc_tests_no_gmake_requirement \
+sc_tests_no_gmake_checking \
 sc_tests_make_without_am_makeflags \
 sc_tests_obsolete_variables \
 sc_tests_plain_make \
@@ -1217,6 +1218,19 @@ sc_tests_no_gmake_requirement:
          exit 1; \
        fi
 
+sc_tests_no_gmake_checking:
+       @if grep -E '\b(is|using)_gmake\b' \
+         $(srcdir)/tests/*.test \
+         $(srcdir)/tests/*.tap \
+         $(srcdir)/tests/*.sh \
+         $(srcdir)/tests/defs \
+         $(srcdir)/tests/defs-static.in \
+       ; then \
+         echo 'Tests should never explicitly check whether $$MAKE' \
+              'is GNU make.' 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/aclocal4.test b/tests/aclocal4.test
index c7e4cda..6073d8e 100755
--- a/tests/aclocal4.test
+++ b/tests/aclocal4.test
@@ -69,7 +69,6 @@ cat >m4/mymacro.m4 <<'EOF'
 AC_DEFUN([MY_MACRO], [AC_LIBOBJ([foo])])
 EOF
 
-using_gmake || $MAKE
 $MAKE check-foo
 
 :
diff --git a/tests/check4.test b/tests/check4.test
index bb9a2b6..f8f6dd6 100755
--- a/tests/check4.test
+++ b/tests/check4.test
@@ -68,16 +68,12 @@ cat stdout
 grep '^FAIL: fail\.sh *' stdout
 grep '^PASS: ok\.sh *' stdout
 
-# The rest of the test is for GNU Make.
-
-if using_gmake; then
-  # Try with a long-option that do not have a short option equivalent
-  # (here, --no-print-directory).  That should cause all options to
-  # appear verbatim in MAKEFLAGS.
-  $MAKE --no-print-directory -k check >stdout || :
-  cat stdout
-  grep '^FAIL: fail\.sh *$' stdout
-  grep '^PASS: ok\.sh *$' stdout
-fi
+# Try with a long-option that do not have a short option equivalent
+# (here, --no-print-directory).  That should cause all options to
+# appear verbatim in MAKEFLAGS.
+$MAKE --no-print-directory -k check >stdout || :
+cat stdout
+grep '^FAIL: fail\.sh *$' stdout
+grep '^PASS: ok\.sh *$' stdout
 
 :
diff --git a/tests/defs b/tests/defs
index ed43681..da80c0d 100644
--- a/tests/defs
+++ b/tests/defs
@@ -377,68 +377,16 @@ grep_configure_help ()
   $EGREP "$2" am--our-help || Exit 1
 }
 
-# using_gmake
-# -----------
-# Return success if $MAKE is GNU make, return failure otherwise.
-# Caches the result for speed reasons.
-using_gmake ()
-{
-  case $am__using_gmake in
-    yes)
-      return 0;;
-    no)
-      return 1;;
-    '')
-      # Use --version AND -v, because SGI Make doesn't fail on --version.
-      # Also grep for GNU because newer versions of FreeBSD make do
-      # not complain about `--version' (they seem to silently ignore it).
-      if $MAKE --version -v | grep GNU; then
-        am__using_gmake=yes
-        return 0
-      else
-        am__using_gmake=no
-        return 1
-      fi;;
-    *)
-      fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";;
-  esac
-}
-am__using_gmake="" # Avoid interferences from the environment.
-
 # make_can_chain_suffix_rules
 # ---------------------------
 # Return 0 if $MAKE is a make implementation that can chain suffix rules
 # automatically, return 1 otherwise.  Caches the result for speed reasons.
+# FIXME: this is useless now; GNU make can always chain suffix rules
+# automatically.
 make_can_chain_suffix_rules ()
 {
-  if test -z "$am__can_chain_suffix_rules"; then
-    if using_gmake; then
-      am__can_chain_suffix_rules=yes
-      return 0
-    else
-      mkdir am__chain.dir$$
-      cd am__chain.dir$$
-      unindent > Makefile << 'END'
-        .u.v: ; cp $< $@
-        .v.w: ; cp $< $@
-END
-      echo make can chain suffix rules > foo.u
-      if $MAKE foo.w && diff foo.u foo.w; then
-        am__can_chain_suffix_rules=yes
-      else
-        am__can_chain_suffix_rules=no
-      fi
-      cd ..
-      rm -rf am__chain.dir$$
-    fi
-  fi
-  case $am__can_chain_suffix_rules in
-    yes) return 0;;
-     no) return 1;;
-      *) fatal_ "make_can_chain_suffix_rules: internal error";;
-  esac
+  return 0
 }
-am__can_chain_suffix_rules="" # Avoid interferences from the environment.
 
 # seq_ - print a sequence of numbers
 # ----------------------------------
diff --git a/tests/distcheck-missing-m4.test b/tests/distcheck-missing-m4.test
index d4ba30d..e4696b5 100755
--- a/tests/distcheck-missing-m4.test
+++ b/tests/distcheck-missing-m4.test
@@ -86,7 +86,6 @@ $ACLOCAL -I m4 --install
 test -f m4/bar.m4 # Sanity check.
 test -f m4/baz.m4 # Likewise.
 test -f m4/zar.m4 # Likewise.
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 
 # We start to use new "third-party" macros from new .m4 files, but forget
@@ -112,7 +111,6 @@ $FGREP " (bar|baz|zar).m4" output && Exit 1
 $ACLOCAL -I m4 --install
 test -f m4/qux.m4 # Sanity check.
 test -f m4/bla.m4 # Likewise.
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 
 :
diff --git a/tests/distcheck-outdated-m4.test b/tests/distcheck-outdated-m4.test
index 5df5650..4f660e8 100755
--- a/tests/distcheck-outdated-m4.test
+++ b/tests/distcheck-outdated-m4.test
@@ -90,7 +90,6 @@ $EGREP " (foo|bar).m4" output && Exit 1
 # Now we again use `--install' explicitly, and "make distcheck"
 # should pass.
 $ACLOCAL -I m4 --install
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 
 # Similar to what have been done above, but this time we:
@@ -110,7 +109,6 @@ ACLOCAL_PATH="$cwd/pth"; export ACLOCAL_PATH
 # The explicit use of `--install' here won't help when the installed file
 # `.m4' will become out-of-date w.r.t. the one in the system acdir.
 $ACLOCAL -I m4 --install
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 
 # Only increase serial number, without changing the other contents; this
@@ -131,7 +129,6 @@ $EGREP " (foo|bar|baz).m4" output && Exit 1
 # Now we again use `--install' explicitly, and "make distcheck"
 # should pass.
 $ACLOCAL -I m4 --install
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 
 :
diff --git a/tests/lex5.test b/tests/lex5.test
index 932a374..df2eb4e 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -85,7 +85,6 @@ $AUTOMAKE -a --no-force
 test -f ./ylwrap
 
 cd sub
-using_gmake || $MAKE Makefile
 $MAKE foo/foo2.o
 test -f foo/foo2.c
 test -f foo/foo2.o
diff --git a/tests/maken4.test b/tests/maken4.test
index bdecb84..cc89cea 100755
--- a/tests/maken4.test
+++ b/tests/maken4.test
@@ -25,22 +25,6 @@
 
 . ./defs || Exit 1
 
-if using_gmake; then
-  : Good, make is GNU make.
-else
-  unindent > mk.tmp << 'END'
-    targ.tmp:
-       : > $@
-    .MAKE: targ.tmp
-END
-  if $MAKE -n -f mk.tmp targ.tmp && test -f targ.tmp; then
-    : Good, make supports the '.MAKE' special target.
-  else
-    skip_ "GNU or BSD make required"
-  fi
-  rm -f *.tmp
-fi
-
 mkdir sub sub2
 
 cat >> configure.in << 'END'
diff --git a/tests/output6.test b/tests/output6.test
index 898697d..6d75d06 100755
--- a/tests/output6.test
+++ b/tests/output6.test
@@ -66,7 +66,6 @@ c = F
 d = F
 EOF
 
-using_gmake || $MAKE -f foo
 $MAKE -f foo test2
 
 :
diff --git a/tests/parallel-tests-fork-bomb.test 
b/tests/parallel-tests-fork-bomb.test
index 5180ada..8e13394 100755
--- a/tests/parallel-tests-fork-bomb.test
+++ b/tests/parallel-tests-fork-bomb.test
@@ -31,56 +31,18 @@ TESTS =
 
 errmsg = ::OOPS:: Recursion too deep
 
-if IS_GNU_MAKE
+is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
 
- is_too_deep := $(shell test $(MAKELEVEL) -lt 10 && echo no)
-
-## Indenteation here required to avoid confusing Automake.
+## Extra indentation here required to avoid confusing Automake.
+## FIXME: now that we assume make is GNU make, this shouldn't happen!
  ifeq ($(is_too_deep),no)
+   # All is ok.
  else
- $(error $(errmsg), $(MAKELEVEL) levels)
+   $(error $(errmsg), $(MAKELEVEL) levels)
  endif
-
-else !IS_GNU_MAKE
-
-# We use mkdir to detect the level of recursion, since it is easy
-# to use and assured to be portably atomical.  Also use an higher
-# number than with GNU make above, since the level used here can
-# be incremented by tow or more per recursion.
-recursion-not-too-deep:
-       @ok=no; \
-       for i in 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 \
-                18 19 20 21 22 23 24 25 26 27 28 29; \
-       do \
-         echo " mkdir rec-$$i.d"; \
-         if mkdir rec-$$i.d; then \
-           ok=yes; break; \
-         else :; fi; \
-       done; \
-       test $$ok = yes || { echo '$(errmsg)' >&2; exit 1; }
-.PHONY: recursion-not-too-deep
-clean-local:
-       rmdir rec-[0-9].d
-
-targets = all check recheck $(TESTS) $(TEST_LOGS) $(TEST_SUITE_LOG)
-$(targets): recursion-not-too-deep
-
-# For BSD make.
-.BEGIN: recursion-not-too-deep
-
-endif !IS_GNU_MAKE
 END
 
-if using_gmake; then
-  cond=:
-else
-  cond=false
-fi
-
-cat >> configure.in << END
-AM_CONDITIONAL([IS_GNU_MAKE], [$cond])
-AC_OUTPUT
-END
+echo AC_OUTPUT >> configure.in
 
 # Another helpful idiom to avoid hanging on capable systems.  The subshell
 # is needed since `ulimit' might be a special shell builtin.
@@ -101,31 +63,8 @@ do_check ()
   $FGREP '::OOPS::' output && Exit 1 # Possible infinite recursion.
   # Check that at least we don't create a botched global log file.
   test ! -f "$log"
-  if using_gmake; then
-    grep "[Cc]ircular.*dependency" output | $FGREP "$log"
-    test $st -gt 0
-  else
-    # Look for possible error messages about circular dependencies from
-    # either make or our own recipes.  At least one such a message must
-    # be present.  OTOH, some make implementations (e.g., NetBSD's), while
-    # smartly detecting the circular dependency early and diagnosing it,
-    # still exit with a successful exit status (yikes!).  So don't check
-    # the exit status of non-GNU make, to avoid spurious failures.
-    # this case.
-    err_seen=no
-    for err_rx in \
-      'circular.* depend' \
-      'depend.* circular' \
-      'graph cycle' \
-      'infinite (loop|recursion)' \
-      'depend.* on itself' \
-    ; do
-      $EGREP -i "$err_rx" output | $FGREP "$log" || continue
-      err_seen=yes
-      break
-    done
-    test $err_seen = yes || Exit 1
-  fi
+  grep "[Cc]ircular.*dependency" output | $FGREP "$log"
+  test $st -gt 0
 }
 
 : > test-suite.test
diff --git a/tests/remake-deleted-m4-file.test 
b/tests/remake-deleted-m4-file.test
index f71d882..62dc9b9 100755
--- a/tests/remake-deleted-m4-file.test
+++ b/tests/remake-deleted-m4-file.test
@@ -59,7 +59,6 @@ sed -e "s|BAR_MACRO|$macro_value|" m4/foo.m4 > t
 mv -f t m4/foo.m4
 rm -f m4/bar.m4
 
-using_gmake || $MAKE Makefile
 $MAKE test
 
 $sleep
@@ -68,7 +67,6 @@ sed -e "s|FOO_MACRO|$macro_value|" configure.in > t
 mv -f t configure.in
 rm -f m4/foo.m4
 
-using_gmake || $MAKE Makefile
 $MAKE test
 
 :
diff --git a/tests/remake-gnulib-add-acsubst.test 
b/tests/remake-gnulib-add-acsubst.test
index 5bfa6e4..de3f4fb 100755
--- a/tests/remake-gnulib-add-acsubst.test
+++ b/tests/remake-gnulib-add-acsubst.test
@@ -97,7 +97,6 @@ cat >> Makefile.am <<'END'
 edit_h += -e 's|address@hidden@|@barvar@|g'
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 
 : AC_SUBST @zapvar@ and add it to foo.h.
@@ -125,7 +124,6 @@ cat >> m4/bar.m4 <<'END'
 AC_DEFUN([ZAP_MACRO], [zapvar=163; AC_SUBST([zapvar])])
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 
 $MAKE distcheck
diff --git a/tests/remake-gnulib-add-header.test 
b/tests/remake-gnulib-add-header.test
index 7b0110c..1669b9f 100755
--- a/tests/remake-gnulib-add-header.test
+++ b/tests/remake-gnulib-add-header.test
@@ -99,7 +99,6 @@ $MAKE distcheck
 sed -e 's/^\( *override_stdio\)=.*$/\1=:/' macros.m4 > t
 mv -f t macros.m4
 
-using_gmake || $MAKE Makefile
 $MAKE
 ls -l
 test -f stdio.h
diff --git a/tests/remake-gnulib-remove-header.test 
b/tests/remake-gnulib-remove-header.test
index 9e9b4e2..de1fc05 100755
--- a/tests/remake-gnulib-remove-header.test
+++ b/tests/remake-gnulib-remove-header.test
@@ -111,7 +111,6 @@ for vpath in : false; do
   diff $srcdir/macros.m4 t && fatal_ "failed to edit macros.m4"
   mv -f t $srcdir/macros.m4
 
-  using_gmake || $MAKE Makefile
   $MAKE
   ls -l
   test ! -f stdio.h
@@ -123,7 +122,6 @@ for vpath in : false; do
   diff $srcdir/macros.m4 t && fatal_ "failed to edit macros.m4"
   mv -f t $srcdir/macros.m4
 
-  using_gmake || $MAKE Makefile
   $MAKE
   ls -l
   test -f stdio.h
diff --git a/tests/remake-moved-m4-file.test b/tests/remake-moved-m4-file.test
index 4af4fdd..12a5196 100755
--- a/tests/remake-moved-m4-file.test
+++ b/tests/remake-moved-m4-file.test
@@ -50,7 +50,6 @@ $MAKE test
 
 # Move one file.
 mv d1/foo.m4 d2/foo.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
@@ -62,7 +61,6 @@ test ! -f $distdir/d2/macros.m4
 # Move both files at once.
 mv d1/macros.m4 d3/macros.m4
 mv d2/foo.m4 d3/foo.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
diff --git a/tests/remake-renamed-m4-file.test 
b/tests/remake-renamed-m4-file.test
index 3378fab..7c6b338 100755
--- a/tests/remake-renamed-m4-file.test
+++ b/tests/remake-renamed-m4-file.test
@@ -50,7 +50,6 @@ $MAKE test
 # Rename one file at the time.
 
 mv m4/foo.m4 m4/bar.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
@@ -58,7 +57,6 @@ test -f $distdir/m4/bar.m4
 test ! -f $distdir/m4/foo.m4
 
 mv m4/macros.m4 m4/defs.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
@@ -69,7 +67,6 @@ test ! -f $distdir/m4/macros.m4
 
 mv m4/bar.m4 m4/quux.m4
 mv m4/defs.m4 acinclude.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
diff --git a/tests/remake-renamed-m4-macro-and-file.test 
b/tests/remake-renamed-m4-macro-and-file.test
index 3c1f867..7e5f4a0 100755
--- a/tests/remake-renamed-m4-macro-and-file.test
+++ b/tests/remake-renamed-m4-macro-and-file.test
@@ -56,7 +56,6 @@ sed -e 's/FOO_MACRO/BAR_MACRO/' m4/foo.m4 > m4/bar.m4
 rm -f m4/foo.m4
 sed -e 's/FOO_MACRO/BAR_MACRO/' m4/macros.m4 > t
 mv -f t m4/macros.m4
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
@@ -74,7 +73,6 @@ sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' \
 rm -f m4/macros.m4 m4/bar.m4
 sed -e 's/BAR_MACRO/QUUX_MACRO/' -e 's/MY_MACRO/A_MACRO/' configure.in > t
 mv -f t configure.in
-using_gmake || $MAKE Makefile
 $MAKE test
 $MAKE distdir
 ls -l $distdir $distdir/*
diff --git a/tests/remake-renamed-m4-macro.test 
b/tests/remake-renamed-m4-macro.test
index 82fcf45..09568ab 100755
--- a/tests/remake-renamed-m4-macro.test
+++ b/tests/remake-renamed-m4-macro.test
@@ -56,7 +56,6 @@ for x in macros foo; do
   mv -f t m4/$x.m4
 done
 
-using_gmake || $MAKE Makefile
 $MAKE test
 
 $sleep
@@ -66,7 +65,6 @@ for f in m4/macros.m4 configure.in; do
   mv -f t $f
 done
 
-using_gmake || $MAKE Makefile
 $MAKE test
 
 :
diff --git a/tests/remake-subdir-from-subdir.test 
b/tests/remake-subdir-from-subdir.test
index 8f4a180..d23c822 100755
--- a/tests/remake-subdir-from-subdir.test
+++ b/tests/remake-subdir-from-subdir.test
@@ -49,7 +49,6 @@ cat > subsub/Makefile.am <<'END'
 all-local:
        : > ok-it-works
 END
-using_gmake || $MAKE Makefile
 $MAKE
 test -f subsub/ok-it-works
 
diff --git a/tests/remake-subdir.test b/tests/remake-subdir.test
index b4cd656..eb1e3d8 100755
--- a/tests/remake-subdir.test
+++ b/tests/remake-subdir.test
@@ -21,12 +21,6 @@
 
 . ./defs || Exit 1
 
-if using_gmake; then
-  remake=$MAKE
-else
-  remake="$MAKE Makefile"
-fi
-
 magic1='::MagicString::One::'
 magic2='__MagicString__Two__'
 
@@ -60,7 +54,7 @@ $sleep
 sed "s|magic|$magic1|" configure.in > t
 mv -f t configure.in
 cd sub
-$remake
+$MAKE
 cd ..
 debug_info
 $FGREP $magic1 configure
@@ -70,7 +64,7 @@ $FGREP $magic1 sub/Makefile
 $sleep
 cd sub
 echo MAGIC = $magic2 >> Makefile.am
-$remake
+$MAKE
 cd ..
 debug_info
 $FGREP $magic2 sub/Makefile
diff --git a/tests/remake10a.test b/tests/remake10a.test
index 0521860..70e1d5f 100755
--- a/tests/remake10a.test
+++ b/tests/remake10a.test
@@ -24,11 +24,7 @@ magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 magic3=%%MagicStringThree%%
 
-if using_gmake; then
-  remake="$MAKE nil"
-else
-  remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
 
 cat >> configure.in <<END
 m4_include([foo.m4])
@@ -97,7 +93,6 @@ for vpath in : false; do
 
   $sleep
   echo "m4_define([my_fingerprint], [DummyValue])" > $top_srcdir/foo.m4
-  using_gmake || $remake
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake10b.test b/tests/remake10b.test
index 8637c4b..ced2d12 100755
--- a/tests/remake10b.test
+++ b/tests/remake10b.test
@@ -24,11 +24,7 @@ magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 magic3=%%MagicStringThree%%
 
-if using_gmake; then
-  remake="$MAKE nil"
-else
-  remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
 
 cat >> configure.in <<'END'
 AC_OUTPUT
@@ -96,7 +92,6 @@ for vpath in : false; do
 
   $sleep
   echo "FINGERPRINT = DummyValue" > $top_srcdir/foo.am
-  using_gmake || $remake
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake10c.test b/tests/remake10c.test
index 2e062a1..58a82ce 100755
--- a/tests/remake10c.test
+++ b/tests/remake10c.test
@@ -24,11 +24,7 @@ magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 magic3=%%MagicStringThree%%
 
-if using_gmake; then
-  remake="$MAKE nil"
-else
-  remake="$MAKE Makefile"
-fi
+remake="$MAKE nil"
 
 cat >> configure.in <<END
 FINGERPRINT='my_fingerprint'
@@ -100,7 +96,6 @@ for vpath in : false; do
   $sleep
   echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $top_srcdir/m4/foo.m4
   echo "AC_DEFUN([AM_UNUSED], [NoSuchMacro])" > $top_srcdir/m4/bar.m4
-  using_gmake || $remake
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake12.test b/tests/remake12.test
index 883fe71..b477e64 100755
--- a/tests/remake12.test
+++ b/tests/remake12.test
@@ -23,21 +23,6 @@ magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 magic3=%%MagicStringThree%%
 
-# See if the user's make implementation support an include directive.
-# We need it in this test.
-echo 'all:; @echo include is supported' > incl.mk
-echo 'include incl.mk' > gnu-style.mk
-echo '.include "incl.mk"' > bsd-style.mk
-if $MAKE -f gnu-style.mk | grep 'include is supported'; then
-  echo "$me: GNU make include style supported"
-  include_zardoz='include zardoz'
-elif $MAKE -f bsd-style.mk | grep 'include is supported'; then
-  echo "$me: BSD make include style supported"
-  include_zardoz='.include "zardoz"'
-else
-  skip_ "make doesn't support any \"include\" directive"
-fi
-
 cat > configure.in <<END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
@@ -52,7 +37,7 @@ EXTRA_DIST = Makefile
 END
 
 cat > Makefile <<END
-$include_zardoz
+include zardoz
 nil:
 .PHONY: nil
 END
@@ -63,11 +48,7 @@ $AUTOMAKE
 
 ./configure
 
-if using_gmake; then
-  $MAKE nil
-else
-  $MAKE Makefile
-fi
+$MAKE nil
 grep '^#H:' zardoz.in # For debugging.
 $FGREP $magic1 zardoz
 $FGREP $magic1 zardoz.in
@@ -102,11 +83,7 @@ check-local: my-check
 END
 mv -f t zardoz.am
 cat zardoz.am # For debugging.
-if using_gmake; then
-  $MAKE nil
-else
-  $MAKE zardoz
-fi
+$MAKE nil
 $FGREP my-check zardoz # Sanity check.
 $FGREP $magic1 zardoz zardoz.in && Exit 1
 $FGREP $magic2 zardoz
@@ -123,7 +100,6 @@ sed '/^#H:/d' zardoz.am > quux.am
 echo 'FOO = dummy' >> quux.am
 echo 'BAR = $(BAZ)' > top.in
 echo "BAZ = $magic3" > bot.in
-is_gmake || $MAKE zardoz
 $MAKE test
 $FGREP my-check zardoz # Sanity check.
 $FGREP $magic3 quux.in && Exit 1
@@ -133,14 +109,11 @@ $FGREP $magic2 zardoz && Exit 1
 # After the remake above, the files `zardoz.am' and `zardoz.in'
 # should be no more needed.
 echo 'endif' > zardoz.am # Put in a syntax error.
-is_gmake || $MAKE zardoz
 $MAKE test
 rm -f zardoz.in zardoz.am # Get rid of them.
-is_gmake || $MAKE zardoz
 $MAKE test
 
 echo 'FOO = $(BAR)' >> quux.am
-is_gmake || $MAKE zardoz
 $MAKE distcheck
 
 :
diff --git a/tests/remake5.test b/tests/remake5.test
index 2c4571f..f93baf4 100755
--- a/tests/remake5.test
+++ b/tests/remake5.test
@@ -20,12 +20,6 @@
 
 . ./defs || Exit 1
 
-if using_gmake; then
-  remake="$MAKE"
-else
-  remake="$MAKE Makefile"
-fi
-
 cat >>configure.in <<'EOF'
 AM_MAINTAINER_MODE
 m4_include([foo.m4])
@@ -51,12 +45,12 @@ $MAKE
 # tools are set to false.)
 $sleep
 touch aclocal.m4 Makefile.am configure.in foo.m4
-$remake
+$MAKE
 
 # Make sure the rebuild rule for Makefile is triggered.
 $sleep
 echo '# GrEpMe' >>Makefile.in
-$remake
+$MAKE
 grep GrEpMe Makefile
 
 # Make sure the rebuild rule for config.status is triggered.
@@ -64,14 +58,14 @@ $sleep
 grep 'AUTOCONF.*=.*false' Makefile
 : > rebuild_ok
 ./configure --no-create
-$remake
+$MAKE
 grep 'AUTOCONF.*=.*false' Makefile && Exit 1
 
 # Make sure rebuild rules do work if --enable-maintainer-mode is given.
 ./configure --enable-maintainer-mode
 $sleep
 echo 'AC_SUBST([YIPPY_YIPPY_YEAH])' >foo.m4
-$remake
+$MAKE
 grep YIPPY_YIPPY_YEAH Makefile
 
 # Try the distribution, for completeness.
diff --git a/tests/remake8a.test b/tests/remake8a.test
index d1c3d76..1ab0bf3 100755
--- a/tests/remake8a.test
+++ b/tests/remake8a.test
@@ -70,7 +70,6 @@ check-local:
 CLEANFILES = bar
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 cat bar
 grep '!Baz!' bar
@@ -101,7 +100,6 @@ cat > $srcdir/quux.in <<'END'
 address@hidden@!
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 cat quux
 grep '!Zardoz!' quux
diff --git a/tests/remake8b.test b/tests/remake8b.test
index 8c11a15..65a75ad 100755
--- a/tests/remake8b.test
+++ b/tests/remake8b.test
@@ -72,7 +72,6 @@ check-local:
 CLEANFILES = bar
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 cat bar
 grep '!Baz!' bar
@@ -103,7 +102,6 @@ cat > $srcdir/quux.in <<'END'
 address@hidden@!
 END
 
-using_gmake || $MAKE Makefile
 $MAKE
 cat quux
 grep '!Zardoz!' quux
diff --git a/tests/remake9a.test b/tests/remake9a.test
index 026eac8..30b8dea 100755
--- a/tests/remake9a.test
+++ b/tests/remake9a.test
@@ -22,12 +22,6 @@
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 
-if using_gmake; then
-  remake_() { $MAKE nil; }
-else
-  remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
 cat >> configure.in <<END
 FINGERPRINT=BadBadBad
 AC_SUBST([FINGERPRINT])
@@ -78,7 +72,7 @@ for vpath in : false; do
   $sleep
   sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.in >t
   mv -f t $srcdir/configure.in
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
   test x"`./foo.sh`" = x"$magic1"
@@ -86,7 +80,7 @@ for vpath in : false; do
   $sleep
   echo 'sed "s/^\\(FINGERPRINT\\)=.*/\\1='$magic2'/"' \
     > $srcdir/tweak-configure-in
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile && Exit 1
   $FGREP $magic2 Makefile
@@ -96,7 +90,6 @@ for vpath in : false; do
   echo cat > $srcdir/tweak-configure-in # Make it a no-op again.
   sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.in >t
   mv -f t $srcdir/configure.in
-  using_gmake || remake_
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake9b.test b/tests/remake9b.test
index ab886ac..a4f8d73 100755
--- a/tests/remake9b.test
+++ b/tests/remake9b.test
@@ -19,12 +19,6 @@
 
 . ./defs || Exit 1
 
-if using_gmake; then
-  remake_() { $MAKE nil; }
-else
-  remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 
@@ -80,7 +74,7 @@ for vpath in : false; do
   $sleep
   sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = $magic1/" $srcdir/Makefile.am >t
   mv -f t $srcdir/Makefile.am
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
   test x"`./foo.sh`" = x"$magic1"
@@ -88,7 +82,7 @@ for vpath in : false; do
   $sleep
   echo 'sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = '$magic2'/"' \
     > $srcdir/tweak-makefile-am
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile && Exit 1
   $FGREP $magic2 Makefile
@@ -98,7 +92,6 @@ for vpath in : false; do
   echo cat > $srcdir/tweak-makefile-am # Make it a no-op again.
   sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = DummyValue/" $srcdir/Makefile.am >t
   mv -f t $srcdir/Makefile.am
-  using_gmake || remake_
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake9c.test b/tests/remake9c.test
index e0acd95..eb6fb83 100755
--- a/tests/remake9c.test
+++ b/tests/remake9c.test
@@ -22,12 +22,6 @@
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 
-if using_gmake; then
-  remake_() { $MAKE nil; }
-else
-  remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
 cat >> configure.in <<END
 FINGERPRINT='my_fingerprint'
 AC_SUBST([FINGERPRINT])
@@ -82,7 +76,7 @@ for vpath in : false; do
 
   $sleep
   echo "AC_DEFUN([my_fingerprint], [$magic1])" > $srcdir/acinclude.m4
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
   test x"`./foo.sh`" = x"$magic1"
@@ -90,7 +84,7 @@ for vpath in : false; do
   $sleep
   echo "echo 'AC_DEFUN([my_fingerprint], [$magic2])'" \
     > $srcdir/tweak-acinclude-m4
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile && Exit 1
   $FGREP $magic2 Makefile
@@ -99,7 +93,6 @@ for vpath in : false; do
   $sleep
   echo : > $srcdir/tweak-acinclude-m4 # Make it a no-op again.
   echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $srcdir/acinclude.m4
-  using_gmake || remake_
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/remake9d.test b/tests/remake9d.test
index ae61835..3d6a638 100755
--- a/tests/remake9d.test
+++ b/tests/remake9d.test
@@ -22,12 +22,6 @@
 magic1=::MagicStringOne::
 magic2=__MagicStringTwo__
 
-if using_gmake; then
-  remake_() { $MAKE nil; }
-else
-  remake_() { $MAKE Makefile && $MAKE foo.sh; }
-fi
-
 cat >> configure.in <<END
 FINGERPRINT='my_fingerprint'
 AC_SUBST([FINGERPRINT])
@@ -82,7 +76,7 @@ for vpath in : false; do
 
   $sleep
   echo "AC_DEFUN([my_fingerprint], [$magic1])dnl %%%" >> $srcdir/aclocal.m4
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile
   test x"`./foo.sh`" = x"$magic1"
@@ -90,7 +84,7 @@ for vpath in : false; do
   $sleep
   echo "sed 's/.*dnl *%%%.*/AC_DEFUN([my_fingerprint], [$magic2])/'" \
     > $srcdir/tweak-aclocal-m4
-  remake_
+  $MAKE nil
   $FGREP FINGERPRINT Makefile # For debugging.
   $FGREP $magic1 Makefile && Exit 1
   $FGREP $magic2 Makefile
@@ -99,7 +93,6 @@ for vpath in : false; do
   $sleep
   echo cat > $srcdir/tweak-aclocal-m4 # Make it a no-op again.
   echo 'AC_DEFUN([my_fingerprint], [DummyValue])' >> $srcdir/aclocal.m4
-  using_gmake || remake_
   $MAKE distcheck
   $FGREP $magic1 Makefile && Exit 1 # Sanity check.
   $FGREP $magic2 Makefile && Exit 1 # Likewise.
diff --git a/tests/subpkg-yacc.test b/tests/subpkg-yacc.test
index 76cbf42..b0a3ef3 100755
--- a/tests/subpkg-yacc.test
+++ b/tests/subpkg-yacc.test
@@ -33,7 +33,8 @@ bin_PROGRAMS = MU
 MU_LDADD = lib/liblib.a
 # It's ok to override distdir.
 distdir = subpack-1
-# Remove a file created by rules in subdir lib.
+# Remove a file created by rules in subdir lib.  This is required
+# in order for "make distcheck" to pass.
 CLEANFILES = lib-dist-hook-has-run
 EOF
 
@@ -116,34 +117,12 @@ $AUTOHEADER
 $AUTOMAKE -Wno-override --add-missing
 cd ..
 
-# Some checks here are slightly more tricky than we'd like, but we cannot
-# simply use "make distcheck", to avoid triggering a spurious failure due
-# to issues with FreeBSD make and VPATH builds (see automake bug#7884).
-
 ./configure
+
 $MAKE
-$MAKE dist
-test -f lib-dist-hook-has-run
-test -f subpack-1.tar.gz
-test ! -d subpack-1 # Make sure "dist" cleans up after itself.
-
-mkdir workdir
-cd workdir
-gzip -c -d ../subpack-1.tar.gz | tar xf -
-test -d subpack-1
-mkdir build
-cd build
-../subpack-1/configure
-$MAKE
-$MAKE dist
-test -f lib-dist-hook-has-run
+$MAKE distcheck
+test -f lib-dist-hook-has-run # Sanity check
 test -f subpack-1.tar.gz
-test ! -d subpack-1 # Make sure "dist" cleans up after itself.
-
-# Don't trust non-GNU makes to do distcheck with a Yacc-using
-# package (see bug referenced above).
-if using_gmake; then
-  $MAKE distcheck || Exit 1
-fi
+test ! -d subpack-1 # Make sure "distcheck" cleans up after itself.
 
 :
diff --git a/tests/version7.test b/tests/version7.test
index fe5dd02..febf05c 100755
--- a/tests/version7.test
+++ b/tests/version7.test
@@ -59,7 +59,6 @@ grep '2\.718' version.texi
 
 $sleep
 echo 'm4_define([THE_VERSION], [3.141])' > version.m4
-using_gmake || $MAKE Makefile
 $MAKE distcheck
 ./configure --version | grep '3\.141'
 grep '3\.141' version.texi
-- 
1.7.2.3




reply via email to

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