automake-patches
[Top][All Lists]
Advanced

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

FYI: required=GNUmake -vs- $needs_gnu_make


From: Alexandre Duret-Lutz
Subject: FYI: required=GNUmake -vs- $needs_gnu_make
Date: 18 Jun 2002 21:02:55 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.7

I'm checking in this on HEAD.  This will please Akim :)

The reason why `$needs_gnu_make' was prefered over
`required=make' is that the `required' support would not honnor
$MAKE.  It's no longer the case now.

2002-06-18  Alexandre Duret-Lutz  <address@hidden>

        * 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'.

Index: tests/cond18.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond18.test,v
retrieving revision 1.3
diff -u -r1.3 cond18.test
--- tests/cond18.test   26 Dec 2001 08:22:05 -0000      1.3
+++ tests/cond18.test   18 Jun 2002 19:03:23 -0000
@@ -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'
@@ -43,8 +44,6 @@
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
-
-$needs_gnu_make
 
 set -e
 
Index: tests/cond19.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond19.test,v
retrieving revision 1.3
diff -u -r1.3 cond19.test
--- tests/cond19.test   26 Dec 2001 08:22:05 -0000      1.3
+++ tests/cond19.test   18 Jun 2002 19:03:23 -0000
@@ -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'
@@ -45,8 +46,6 @@
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
-
-$needs_gnu_make
 
 set -e
 
Index: tests/cond4.test
===================================================================
RCS file: /cvs/automake/automake/tests/cond4.test,v
retrieving revision 1.7
diff -u -r1.7 cond4.test
--- tests/cond4.test    26 Dec 2001 08:22:05 -0000      1.7
+++ tests/cond4.test    18 Jun 2002 19:03:25 -0000
@@ -2,6 +2,7 @@
 
 # Another sources-in-conditional test.  Report from Tim Goodwin.
 
+required=GNUmake
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
@@ -42,8 +43,6 @@
 # Ignore user CFLAGS.
 CFLAGS=
 export CFLAGS
-
-$needs_gnu_make
 
 CC='gcc' CONDITION1=true CONDITION2=true ./configure || exit 1
 msgtt=`$MAKE --no-print-directory echo-objects`
Index: tests/defs
===================================================================
RCS file: /cvs/automake/automake/tests/defs,v
retrieving revision 1.51
diff -u -r1.51 defs
--- tests/defs  13 Jun 2002 19:45:21 -0000      1.51
+++ tests/defs  18 Jun 2002 19:03:25 -0000
@@ -16,12 +16,28 @@
    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_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
@@ -74,17 +84,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"
 
Index: tests/dollar.test
===================================================================
RCS file: /cvs/automake/automake/tests/dollar.test,v
retrieving revision 1.3
diff -u -r1.3 dollar.test
--- tests/dollar.test   10 Jun 2002 19:15:00 -0000      1.3
+++ tests/dollar.test   18 Jun 2002 19:03:25 -0000
@@ -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
 
Index: tests/exsource.test
===================================================================
RCS file: /cvs/automake/automake/tests/exsource.test,v
retrieving revision 1.14
diff -u -r1.14 exsource.test
--- tests/exsource.test 17 Jul 2001 05:53:49 -0000      1.14
+++ tests/exsource.test 18 Jun 2002 19:03:25 -0000
@@ -3,9 +3,8 @@
 # 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
Index: tests/extra6.test
===================================================================
RCS file: /cvs/automake/automake/tests/extra6.test,v
retrieving revision 1.3
diff -u -r1.3 extra6.test
--- tests/extra6.test   26 Mar 2002 14:34:00 -0000      1.3
+++ tests/extra6.test   18 Jun 2002 19:03:25 -0000
@@ -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
 
Index: tests/lex3.test
===================================================================
RCS file: /cvs/automake/automake/tests/lex3.test,v
retrieving revision 1.7
diff -u -r1.7 lex3.test
--- tests/lex3.test     30 May 2002 06:05:04 -0000      1.7
+++ tests/lex3.test     18 Jun 2002 19:03:25 -0000
@@ -3,10 +3,8 @@
 # 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
Index: tests/make.test
===================================================================
RCS file: /cvs/automake/automake/tests/make.test,v
retrieving revision 1.7
diff -u -r1.7 make.test
--- tests/make.test     30 May 2002 06:05:04 -0000      1.7
+++ tests/make.test     18 Jun 2002 19:03:25 -0000
@@ -3,6 +3,7 @@
 # Test to make sure `make' check works.
 # From Ralf Corsepius.
 
+required=GNUmake
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
@@ -13,8 +14,6 @@
 END
 
 : > Makefile.am
-
-$needs_gnu_make
 
 set -e
 
Index: tests/pr87.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr87.test,v
retrieving revision 1.11
diff -u -r1.11 pr87.test
--- tests/pr87.test     26 Mar 2002 10:36:57 -0000      1.11
+++ tests/pr87.test     18 Jun 2002 19:03:25 -0000
@@ -2,9 +2,9 @@
 
 # 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"
 
Index: tests/pr9.test
===================================================================
RCS file: /cvs/automake/automake/tests/pr9.test,v
retrieving revision 1.8
diff -u -r1.8 pr9.test
--- tests/pr9.test      30 May 2002 06:05:05 -0000      1.8
+++ tests/pr9.test      18 Jun 2002 19:03:25 -0000
@@ -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'
@@ -14,12 +16,6 @@
 : > Makefile.am
 
 mkdir support
-
-# Likewise for gzip.
-(gzip --version) > /dev/null 2>&1 || exit 77
-
-# `distcheck' requires GNU make.
-$needs_gnu_make
 
 $ACLOCAL || exit 1
 
Index: tests/subdir5.test
===================================================================
RCS file: /cvs/automake/automake/tests/subdir5.test,v
retrieving revision 1.3
diff -u -r1.3 subdir5.test
--- tests/subdir5.test  26 Mar 2002 14:34:00 -0000      1.3
+++ tests/subdir5.test  18 Jun 2002 19:03:25 -0000
@@ -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)
Index: tests/target-cflags.test
===================================================================
RCS file: /cvs/automake/automake/tests/target-cflags.test,v
retrieving revision 1.7
diff -u -r1.7 target-cflags.test
--- tests/target-cflags.test    26 Dec 2001 08:22:06 -0000      1.7
+++ tests/target-cflags.test    18 Jun 2002 19:03:25 -0000
@@ -3,6 +3,7 @@
 # Test to make sure target specific CFLAGS work
 # Assar Westerlund <address@hidden>
 
+required=GNUmake
 . $srcdir/defs || exit 1
 
 cat > configure.in << 'END'
@@ -39,8 +40,6 @@
 
 # Likewise for gcc.
 (gcc -v) > /dev/null 2>&1 || exit 77
-
-$needs_gnu_make
 
 set -e
 
Index: tests/yacc7.test
===================================================================
RCS file: /cvs/automake/automake/tests/yacc7.test,v
retrieving revision 1.8
diff -u -r1.8 yacc7.test
--- tests/yacc7.test    10 Jun 2002 09:49:24 -0000      1.8
+++ tests/yacc7.test    18 Jun 2002 19:03:25 -0000
@@ -6,9 +6,8 @@
 # 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
Index: tests/yaccvpath.test
===================================================================
RCS file: /cvs/automake/automake/tests/yaccvpath.test,v
retrieving revision 1.8
diff -u -r1.8 yaccvpath.test
--- tests/yaccvpath.test        26 Mar 2002 10:36:57 -0000      1.8
+++ tests/yaccvpath.test        18 Jun 2002 19:03:25 -0000
@@ -6,9 +6,9 @@
 # `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

-- 
Alexandre Duret-Lutz




reply via email to

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