[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 01/14] New requirement "cc" for tests using a C compiler.
From: |
Stefano Lattarini |
Subject: |
[PATCH 01/14] New requirement "cc" for tests using a C compiler. |
Date: |
Fri, 2 Jul 2010 13:36:19 +0200 |
User-agent: |
KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; ) |
New requirement "cc" for tests using a C compiler.
* tests/defs.in: Recognize a new requirement "cc", asking for
a generic C compiler. For the moment, just skip the test if
$CC is "no", and look for gcc (exporting CC=gcc) if $CC is not
set.
* tests/autohdr5.test: New test, sister of autohdr4.test, but
does not require gcc.
* tests/yacc9.test: New test, sister of yacc6.test, but does
not require gcc.
* tests/Makefile.am (TESTS): Updated.
* tests/cond36.test: Remove useless requirement of `gcc', just
require `cc' instead.
* tests/libobj14.test: Likewise.
... (many other tests modified) ...
* tests/yaccvpath.test: Likewise.
Ideas from Ralf Wildenhues and Stefano Lattarini. Final patch
by Stefano Lattarini.
-*-*-
NOTE: some tests has been subject to some more changes, e.g.
not exporting CC=gcc explicitly to configure, using the idiom:
. ./defs || Exit 1
intead of the bare:
. ./defs
or adding "FIXME" comments about suspicious constructs (which are
however orthogonal to the change done by the patch, so not addressable
by this patch). I didn't feel it was necessary to add these nitpicks
to the ChangeLog entry and/or thre git commit message; if you
disagree, feel free to amend them.
Regards,
Stefano
From 61ab32ee15e988e498cb76961b070a2083022bcc Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Fri, 2 Jul 2010 12:41:29 +0200
Subject: [PATCH 01/14] New requirement "cc" for tests using a C compiler.
* tests/defs.in: Recognize a new requirement "cc", asking for
a generic C compiler. For the moment, just skip the test if
$CC is "no", and look for gcc (exporting CC=gcc) if $CC is not
set.
* tests/autohdr5.test: New test, sister of autohdr4.test, but
does not require gcc.
* tests/yacc9.test: New test, sister of yacc6.test, but does
not require gcc.
* tests/Makefile.am (TESTS): Updated.
* tests/cond36.test: Remove useless requirement of `gcc', just
require `cc' instead.
* tests/libobj14.test: Likewise.
* tests/ansi10.test: Updated.
* tests/ansi5.test: Likewise.
* tests/ansi6.test: Likewise.
* tests/ansi7.test: Likewise.
* tests/ansi9.test: Likewise.
* tests/autohdr4.test: Likewise.
* tests/cond16.test: Likewise.
* tests/cond18.test: Likewise.
* tests/cond19.test: Likewise.
* tests/cond35.test: Likewise.
* tests/cond4.test: Likewise.
* tests/depcomp2.test: Likewise.
* tests/depcomp3.test: Likewise.
* tests/depcomp4.test: Likewise.
* tests/depend2.test: Likewise.
* tests/gnits2.test: Likewise.
* tests/gnits3.test: Likewise.
* tests/lex3.test: Likewise.
* tests/lex5.test: Likewise.
* tests/libtool3.test: Likewise.
* tests/libtool7.test: Likewise.
* tests/ltcond.test: Likewise.
* tests/ltcond2.test: Likewise.
* tests/ltconv.test: Likewise.
* tests/ltlibsrc.test: Likewise.
* tests/mmodely.test: Likewise.
* tests/multlib.test: Likewise.
* tests/nobase-libtool.test: Likewise.
* tests/nobase.test: Likewise.
* tests/pr204.test: Likewise.
* tests/pr220.test: Likewise.
* tests/pr224.test: Likewise.
* tests/pr300-lib.test: Likewise.
* tests/pr300-prog.test: Likewise.
* tests/pr307.test: Likewise.
* tests/pr401.test: Likewise.
* tests/pr401c.test: Likewise.
* tests/pr87.test: Likewise.
* tests/primary3.test: Likewise.
* tests/specflg7.test: Likewise.
* tests/specflg8.test: Likewise.
* tests/subdir5.test: Likewise.
* tests/subdir8.test: Likewise.
* tests/subobj10.test: Likewise.
* tests/subobj3.test: Likewise.
* tests/subobj6.test: Likewise.
* tests/subpkg.test: Likewise.
* tests/substre2.test: Likewise.
* tests/substref.test: Likewise.
* tests/suffix8.test: Likewise.
* tests/target-cflags.test: Likewise.
* tests/targetclash.test: Likewise.
* tests/transform.test: Likewise.
* tests/yacc4.test: Likewise.
* tests/yacc6.test: Likewise.
* tests/yacc8.test: Likewise.
* tests/yaccvpath.test: Likewise.
Ideas from Ralf Wildenhues and Stefano Lattarini. Final patch
by Stefano Lattarini.
---
ChangeLog | 75 +++++++++++++++++++++++++++++++
tests/Makefile.am | 2 +
tests/Makefile.in | 2 +
tests/ansi10.test | 4 +-
tests/ansi5.test | 6 +-
tests/ansi6.test | 4 +-
tests/ansi7.test | 4 +-
tests/ansi9.test | 4 +-
tests/autohdr4.test | 5 +-
tests/autohdr5.test | 70 +++++++++++++++++++++++++++++
tests/cond16.test | 7 ++-
tests/cond18.test | 4 +-
tests/cond19.test | 4 +-
tests/cond35.test | 6 +-
tests/cond36.test | 6 +-
tests/cond4.test | 2 +-
tests/defs.in | 14 ++++++
tests/depcomp2.test | 4 +-
tests/depcomp3.test | 4 +-
tests/depcomp4.test | 4 +-
tests/depend2.test | 2 +-
tests/gnits2.test | 5 +-
tests/gnits3.test | 4 +-
tests/lex3.test | 2 +-
tests/lex5.test | 2 +-
tests/libobj14.test | 7 +--
tests/libtool3.test | 2 +-
tests/libtool7.test | 2 +-
tests/ltcond.test | 2 +-
tests/ltcond2.test | 2 +-
tests/ltconv.test | 2 +-
tests/ltlibsrc.test | 2 +-
tests/mmodely.test | 7 ++-
tests/multlib.test | 12 +++--
tests/nobase.test | 6 +-
tests/pr204.test | 4 +-
tests/pr220.test | 5 +-
tests/pr224.test | 6 +-
tests/pr300-lib.test | 4 +-
tests/pr300-prog.test | 4 +-
tests/pr401.test | 4 +-
tests/pr401c.test | 4 +-
tests/pr87.test | 4 +-
tests/primary3.test | 4 +-
tests/specflg7.test | 4 +-
tests/specflg8.test | 4 +-
tests/subdir5.test | 6 +-
tests/subdir8.test | 4 +-
tests/subobj10.test | 2 +-
tests/subobj3.test | 8 +--
tests/subobj6.test | 5 +-
tests/subpkg.test | 5 +-
tests/substre2.test | 2 +-
tests/substref.test | 2 +-
tests/suffix8.test | 2 +-
tests/target-cflags.test | 2 +-
tests/targetclash.test | 4 +-
tests/transform.test | 6 +-
tests/yacc4.test | 4 +-
tests/yacc6.test | 3 +-
tests/yacc8.test | 5 +-
tests/yacc9.test | 109 ++++++++++++++++++++++++++++++++++++++++++++++
tests/yaccvpath.test | 4 +-
63 files changed, 395 insertions(+), 115 deletions(-)
create mode 100755 tests/autohdr5.test
create mode 100755 tests/yacc9.test
diff --git a/ChangeLog b/ChangeLog
index 4366381..7a118b5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,78 @@
+2010-07-02 Stefano Lattarini <address@hidden>
+ Ralf Wildenhues <address@hidden>
+
+ New requirement "cc" for tests using a C compiler.
+ * tests/defs.in: Recognize a new requirement "cc", asking for
+ a generic C compiler. For the moment, just skip the test if
+ $CC is "no", and look for gcc (exporting CC=gcc) if $CC is not
+ set.
+ * tests/autohdr5.test: New test, sister of autohdr4.test, but
+ does not require gcc.
+ * tests/yacc9.test: New test, sister of yacc6.test, but does
+ not require gcc.
+ * tests/Makefile.am (TESTS): Updated.
+ * tests/cond36.test: Remove useless requirement of `gcc', just
+ require `cc' instead.
+ * tests/libobj14.test: Likewise.
+ * tests/ansi10.test: Updated.
+ * tests/ansi5.test: Likewise.
+ * tests/ansi6.test: Likewise.
+ * tests/ansi7.test: Likewise.
+ * tests/ansi9.test: Likewise.
+ * tests/autohdr4.test: Likewise.
+ * tests/cond16.test: Likewise.
+ * tests/cond18.test: Likewise.
+ * tests/cond19.test: Likewise.
+ * tests/cond35.test: Likewise.
+ * tests/cond4.test: Likewise.
+ * tests/depcomp2.test: Likewise.
+ * tests/depcomp3.test: Likewise.
+ * tests/depcomp4.test: Likewise.
+ * tests/depend2.test: Likewise.
+ * tests/gnits2.test: Likewise.
+ * tests/gnits3.test: Likewise.
+ * tests/instspc.test: Likewise.
+ * tests/lex3.test: Likewise.
+ * tests/lex5.test: Likewise.
+ * tests/libtool3.test: Likewise.
+ * tests/libtool7.test: Likewise.
+ * tests/ltcond.test: Likewise.
+ * tests/ltcond2.test: Likewise.
+ * tests/ltconv.test: Likewise.
+ * tests/ltlibsrc.test: Likewise.
+ * tests/mmodely.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/nobase.test: Likewise.
+ * tests/pr204.test: Likewise.
+ * tests/pr220.test: Likewise.
+ * tests/pr224.test: Likewise.
+ * tests/pr300-lib.test: Likewise.
+ * tests/pr300-prog.test: Likewise.
+ * tests/pr401.test: Likewise.
+ * tests/pr401c.test: Likewise.
+ * tests/pr87.test: Likewise.
+ * tests/primary3.test: Likewise.
+ * tests/specflg7.test: Likewise.
+ * tests/specflg8.test: Likewise.
+ * tests/subdir5.test: Likewise.
+ * tests/subdir8.test: Likewise.
+ * tests/subobj10.test: Likewise.
+ * tests/subobj3.test: Likewise.
+ * tests/subobj6.test: Likewise.
+ * tests/subpkg.test: Likewise.
+ * tests/substre2.test: Likewise.
+ * tests/substref.test: Likewise.
+ * tests/suffix8.test: Likewise.
+ * tests/target-cflags.test: Likewise.
+ * tests/targetclash.test: Likewise.
+ * tests/transform.test: Likewise.
+ * tests/yacc4.test: Likewise.
+ * tests/yacc6.test: Likewise.
+ * tests/yacc8.test: Likewise.
+ * tests/yaccvpath.test: Likewise.
+ Ideas from Ralf Wildenhues and Stefano Lattarini. Final patch
+ by Stefano Lattarini.
+
2010-06-26 Ralf Wildenhues <address@hidden>
Update program --help output to match current GCS.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index af20d3e..a2f56af 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -115,6 +115,7 @@ autohdr.test \
autohdr2.test \
autohdr3.test \
autohdr4.test \
+autohdr5.test \
automake.test \
auxdir.test \
auxdir2.test \
@@ -802,6 +803,7 @@ yacc5.test \
yacc6.test \
yacc7.test \
yacc8.test \
+yacc9.test \
yaccpp.test \
yaccvpath.test \
yflags.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 592faa0..fc65280 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -326,6 +326,7 @@ autohdr.test \
autohdr2.test \
autohdr3.test \
autohdr4.test \
+autohdr5.test \
automake.test \
auxdir.test \
auxdir2.test \
@@ -1013,6 +1014,7 @@ yacc5.test \
yacc6.test \
yacc7.test \
yacc8.test \
+yacc9.test \
yaccpp.test \
yaccvpath.test \
yflags.test \
diff --git a/tests/ansi10.test b/tests/ansi10.test
index 88b8618..d06ae9b 100755
--- a/tests/ansi10.test
+++ b/tests/ansi10.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Make sure ansi2knr works with $(LIBOBJS).
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/ansi5.test b/tests/ansi5.test
index 2652cb7..bbc9109 100755
--- a/tests/ansi5.test
+++ b/tests/ansi5.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Test for ansi2knr in another directory.
-required=gcc
+required=cc
. ./defs || Exit 1
cat > configure.in << 'END'
@@ -71,7 +71,7 @@ $AUTOMAKE -a
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-CC=gcc ./configure
+./configure
# This is ugly! If we set U at make time then the "wrong" file gets
# included.
diff --git a/tests/ansi6.test b/tests/ansi6.test
index 10196ea..e07d3ae 100755
--- a/tests/ansi6.test
+++ b/tests/ansi6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2006, 2008, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Check ansi2knr on a source file in subdirectory.
# From Kevin Ryde.
-required=gcc
+required=cc
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/ansi7.test b/tests/ansi7.test
index e97f517..a98605b 100755
--- a/tests/ansi7.test
+++ b/tests/ansi7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2008, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
# ansi6.test is the same test without subdir-objects.
# From Kevin Ryde.
-required=gcc
+required=cc
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/ansi9.test b/tests/ansi9.test
index 4eb1820..51c210c 100755
--- a/tests/ansi9.test
+++ b/tests/ansi9.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
# can still be deansified.
# Report from Paul D. Smith.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/autohdr4.test b/tests/autohdr4.test
index 187429f..6129470 100755
--- a/tests/autohdr4.test
+++ b/tests/autohdr4.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -15,7 +15,8 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check rebuild rules for AC_CONFIG_HEADERS.
-# (This should also work without GNU Make.)
+# This should also work without GNU Make, but requires the GNU C compiler.
+# Please keep this in sync with sister test 'autohdr4.test'.
required=gcc
. ./defs
diff --git a/tests/autohdr5.test b/tests/autohdr5.test
new file mode 100755
index 0000000..63dec6e
--- /dev/null
+++ b/tests/autohdr5.test
@@ -0,0 +1,70 @@
+#!/bin/sh
+# Copyright (C) 2003, 2005, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Check rebuild rules for AC_CONFIG_HEADERS.
+# This should also work without GNU Make, ans with generic C compiler.
+# Please keep this in sync with sister test 'autohdr4.test'.
+
+required=cc
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+AC_PROG_CC
+AC_SUBST([BOT], [bot])
+AC_CONFIG_HEADERS([defs.h config.h:sub1/config.top:sub2/config.${BOT}],,
+ [BOT=$BOT])
+AC_CONFIG_FILES([sub3/Makefile])
+AC_OUTPUT
+EOF
+
+mkdir sub1 sub2 sub3
+
+: > sub1/config.top
+echo '#define NAME "grepme1"' >sub2/config.bot
+echo SUBDIRS = sub3 >Makefile.am
+echo noinst_PROGRAMS = run >sub3/Makefile.am
+
+cat >sub3/run.c <<'EOF'
+#include <defs.h>
+#include <config.h>
+#include <stdio.h>
+
+int
+main ()
+{
+ puts (NAME); /* from config.h */
+ puts (PACKAGE); /* from defs.h */
+}
+EOF
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOHEADER
+$AUTOMAKE
+
+./configure --enable-dependency-tracking
+$MAKE
+sub3/run | grep grepme1
+
+$sleep
+echo '#define NAME "grepme2"' > sub2/config.bot
+$MAKE
+sub3/run | grep grepme2
+
+$MAKE distcheck
diff --git a/tests/cond16.test b/tests/cond16.test
index 467b718..950ab10 100755
--- a/tests/cond16.test
+++ b/tests/cond16.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -14,10 +14,11 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Test for bug in conditionals in SOURCES with variable substitution
references.
+# Test for bug in conditionals in SOURCES with variable substitution
+# references.
# Report from Richard Boulton
-required=gcc
+required=cc
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/cond18.test b/tests/cond18.test
index 3119658..312b896 100755
--- a/tests/cond18.test
+++ b/tests/cond18.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required='GNUmake gcc'
+required='GNUmake cc'
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/cond19.test b/tests/cond19.test
index 14dfb51..d820202 100755
--- a/tests/cond19.test
+++ b/tests/cond19.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Regression test for substitution references to conditional variables.
# Report from Richard Boulton
-required='GNUmake gcc'
+required='GNUmake cc'
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/cond35.test b/tests/cond35.test
index 6b3a4d4..e87a341 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,8 +17,8 @@
# Check rules output for parser defined conditionally.
# Report from Roman Fietze.
-required='flex bison gcc'
-. ./defs
+required='flex bison cc'
+. ./defs || Exit 1
set -e
diff --git a/tests/cond36.test b/tests/cond36.test
index 58eb529..f925587 100755
--- a/tests/cond36.test
+++ b/tests/cond36.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,8 +16,8 @@
# Check rules output for parser defined conditionally.
-required='flex bison gcc'
-. ./defs
+required='flex bison'
+. ./defs || Exit 1
set -e
diff --git a/tests/cond4.test b/tests/cond4.test
index 6efc9ce..1d2910c 100755
--- a/tests/cond4.test
+++ b/tests/cond4.test
@@ -16,7 +16,7 @@
# Another sources-in-conditional test. Report from Tim Goodwin.
-required='GNUmake gcc'
+required='GNUmake cc'
. ./defs || Exit 1
set -e
diff --git a/tests/defs.in b/tests/defs.in
index 9bb6333..1d6af76 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -120,6 +120,20 @@ do
echo "$me: running $MAKE --version -v | grep GNU"
( $MAKE --version -v | grep GNU ) || exit 77
;;
+ cc)
+ if test x"$CC" = x"no"; then
+ # The user told explicitly it don't want a C compiler to be used.
+ echo "$me: \$CC is \"no\", skipping test"
+ exit 77
+ elif test -z "$CC"; then
+ # The user specified no explicit compiler in its environment, so
+ # we try to force the use of gcc as C compiler.
+ CC=gcc
+ export CC
+ echo "$me: running $CC --version"
+ ( $CC --version ) || exit 77
+ fi
+ ;;
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/depcomp2.test b/tests/depcomp2.test
index 2b4353c..2dca558 100755
--- a/tests/depcomp2.test
+++ b/tests/depcomp2.test
@@ -17,7 +17,7 @@
# Test to make sure that depcomp is not used when it's not installed
# From Pavel Roskin.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
@@ -49,5 +49,5 @@ export CFLAGS
$ACLOCAL
$AUTOMAKE --add-missing
$AUTOCONF
-./configure CC='gcc' 2>error.log
+./configure 2>error.log
test -z "`cat error.log`"
diff --git a/tests/depcomp3.test b/tests/depcomp3.test
index 2a5db60..95e519c 100755
--- a/tests/depcomp3.test
+++ b/tests/depcomp3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Make sure dashmstdout generates dependencies.
-required='gcc'
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/depcomp4.test b/tests/depcomp4.test
index 7d22894..f935664 100755
--- a/tests/depcomp4.test
+++ b/tests/depcomp4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Test for PR 385: makedepend doesn't work with Libtool.
-required='libtoolize gcc makedepend'
+required='libtoolize cc makedepend'
. ./defs || Exit 1
set -e
diff --git a/tests/depend2.test b/tests/depend2.test
index 57d87d7..114664d 100755
--- a/tests/depend2.test
+++ b/tests/depend2.test
@@ -19,7 +19,7 @@
# --disable-dependency-tracking.
# Report from Robert Boehne
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/gnits2.test b/tests/gnits2.test
index 4c5d54f..6ec11c6 100755
--- a/tests/gnits2.test
+++ b/tests/gnits2.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +17,7 @@
# Test to ensure std-options checking is correct.
-required=gcc
+required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/gnits3.test b/tests/gnits3.test
index 7a08fb8..df09a15 100755
--- a/tests/gnits3.test
+++ b/tests/gnits3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Check that AM_INSTALLCHECK_STD_OPTIONS_EXEMPT works.
-required=gcc
+required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/lex3.test b/tests/lex3.test
index 178a54f..6e5241b 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -18,7 +18,7 @@
# Test associated with PR 19.
# From Matthew D. Langston.
-required='gcc gzip flex GNUmake'
+required='cc gzip flex GNUmake'
. ./defs || Exit 1
# Ignore user CFLAGS.
diff --git a/tests/lex5.test b/tests/lex5.test
index 88924b2..fb14b04 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -16,7 +16,7 @@
# Test for subdir lexers.
-required='gcc GNUmake flex'
+required='cc GNUmake flex'
. ./defs || Exit 1
set -e
diff --git a/tests/libobj14.test b/tests/libobj14.test
index ed20703..e017234 100755
--- a/tests/libobj14.test
+++ b/tests/libobj14.test
@@ -1,5 +1,5 @@
#!/bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -19,8 +19,7 @@
# that uses it.
# Report from Bill Davidson
-required=gcc
-. ./defs
+. ./defs || Exit 1
set -e
@@ -31,7 +30,7 @@ AM_CONDITIONAL([CASE], :)
AC_OUTPUT
EOF
-: >bar.c
+: > bar.c # yes, this is required!
cat >>Makefile.am <<'EOF'
COMMON_LIBS = @LIBOBJS@
diff --git a/tests/libtool3.test b/tests/libtool3.test
index 3427f28..869c177 100755
--- a/tests/libtool3.test
+++ b/tests/libtool3.test
@@ -17,7 +17,7 @@
# Try to build and package a program linked to a Libtool library.
# Also make sure we do not bloat the Makefile with unneeded rules.
-required='libtoolize gcc'
+required='libtoolize cc'
. ./defs || Exit 1
set -e
diff --git a/tests/libtool7.test b/tests/libtool7.test
index a2f912f..9df4294 100755
--- a/tests/libtool7.test
+++ b/tests/libtool7.test
@@ -17,7 +17,7 @@
# Make sure we allow Libtool's -dlopen/-dlpreopen
# Also check basic support for AM_LIBTOOLFLAGS/LIBTOOLFLAGS
-required='libtoolize gcc'
+required='libtoolize cc'
. ./defs || Exit 1
set -e
diff --git a/tests/ltcond.test b/tests/ltcond.test
index 0350a3d..7f34599 100755
--- a/tests/ltcond.test
+++ b/tests/ltcond.test
@@ -17,7 +17,7 @@
# Test for conditional libtool libraries.
# This combines two examples from the manual.
-required='libtoolize gcc'
+required='libtoolize cc'
. ./defs || Exit 1
set -e
diff --git a/tests/ltcond2.test b/tests/ltcond2.test
index 1687513..37d8be6 100755
--- a/tests/ltcond2.test
+++ b/tests/ltcond2.test
@@ -16,7 +16,7 @@
# Test for bug in conditionals.
-required='libtoolize gcc'
+required='libtoolize cc'
. ./defs || Exit 1
set -e
diff --git a/tests/ltconv.test b/tests/ltconv.test
index 0ec2132..00ca0fc 100755
--- a/tests/ltconv.test
+++ b/tests/ltconv.test
@@ -17,7 +17,7 @@
# Test for libtool convenience libraries.
# This example is taken from the manual.
-required='libtoolize gcc'
+required='libtoolize cc'
. ./defs || Exit 1
set -e
diff --git a/tests/ltlibsrc.test b/tests/ltlibsrc.test
index 2c9911d..421b6f6 100755
--- a/tests/ltlibsrc.test
+++ b/tests/ltlibsrc.test
@@ -16,7 +16,7 @@
# Test to make sure a sensible default source for libraries is used.
-required='libtool gcc'
+required='libtool cc'
. ./defs || Exit 1
set -e
diff --git a/tests/mmodely.test b/tests/mmodely.test
index 0f9bb3b..fda650d 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2004, 2006, 2007, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 2007, 2009, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +19,7 @@
# sources in maintainer mode.
# From Derek R. Price.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
@@ -82,7 +83,7 @@ cat >mylex.sh <<'END'
echo "$@" >lex.yy.c
END
chmod +x myyacc.sh mylex.sh
-PATH="`pwd`:$PATH"
+PATH="`pwd`:$PATH" #FIXME: non-portable
# make maintainer-clean; ./configure; make should always work,
# per GNU Standard.
diff --git a/tests/multlib.test b/tests/multlib.test
index 5ff19d7..bc32220 100755
--- a/tests/multlib.test
+++ b/tests/multlib.test
@@ -17,11 +17,13 @@
# Check multilib support.
# Based on a test case from Ralf Corsepius.
-required='gcc GNUmake'
+required='cc GNUmake'
. ./defs || Exit 1
set -e
+test -n "$CC" || Exit 99 # sanity check
+
cat >configure.in <<'END'
AC_INIT([multlib], [1.0])
AC_CONFIG_SRCDIR(libfoo/foo.c)
@@ -33,19 +35,19 @@ AC_CONFIG_SUBDIRS(libbar)
AC_OUTPUT
END
-cat >mycc <<'END'
+cat >mycc <<END
#! /bin/sh
-case ${1+"$@"} in
+case \${1+"\$@"} in
*-print-multi-lib*)
echo ".;"
echo "debug;@g"
exit 0 ;;
esac
-gcc ${1+"$@"}
+$CC \${1+"\$@"}
END
chmod +x mycc
-PATH=`pwd`:$PATH
+PATH=`pwd`:$PATH #FIXME: not-portable
cat >Makefile.am <<'EOF'
SUBDIRS = @subdirs@
diff --git a/tests/nobase.test b/tests/nobase.test
index 8b0dc6e..37db49f 100755
--- a/tests/nobase.test
+++ b/tests/nobase.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2005, 2006, 2007, 2008, 2009, 2010
+# Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Make sure nobase_* works.
-required='gcc'
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr204.test b/tests/pr204.test
index 2944449..96e07cb 100755
--- a/tests/pr204.test
+++ b/tests/pr204.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# For PR 204.
# Sources derived from nodist_ sources should not be distributed.
-required='bison gcc'
+required='bison cc'
. ./defs || Exit 1
set -e
diff --git a/tests/pr220.test b/tests/pr220.test
index 25e1f0e..7ca668d 100755
--- a/tests/pr220.test
+++ b/tests/pr220.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +17,7 @@
# Test for PR automake/220.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr224.test b/tests/pr224.test
index fdcb997..e388eff 100755
--- a/tests/pr224.test
+++ b/tests/pr224.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Test for $(top_srcdir) with dependencies.
-required=gcc
+required=cc
. ./defs || Exit 1
mkdir foo
@@ -51,7 +51,7 @@ $AUTOCONF
$AUTOMAKE -a
cd build
-CC='gcc' ../configure
+../configure
$MAKE
test -d foo/.deps
diff --git a/tests/pr300-lib.test b/tests/pr300-lib.test
index 3d2fde5..073d14d 100755
--- a/tests/pr300-lib.test
+++ b/tests/pr300-lib.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Make sure that installing subdirectory libraries works.
# PR/300
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr300-prog.test b/tests/pr300-prog.test
index 0b226c6..cdd7727 100755
--- a/tests/pr300-prog.test
+++ b/tests/pr300-prog.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Make sure that installing subdirectory programs works.
# PR/300
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr401.test b/tests/pr401.test
index 7a092bf..adc115e 100755
--- a/tests/pr401.test
+++ b/tests/pr401.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Check support for AC_CONFIG_LIBOBJ_DIR vs LIBOBJS.
# (pr401b.test and pr401c.test do the same for LTLIBOBJS and ALLOCA)
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr401c.test b/tests/pr401c.test
index fc2f5de..e45baf0 100755
--- a/tests/pr401c.test
+++ b/tests/pr401c.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2005, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Check support for AC_CONFIG_LIBOBJ_DIR vs ALLOCA.
# (pr401.test and pr401b.test do the same for LIBOBJS and LTLIBOBJS)
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/pr87.test b/tests/pr87.test
index 369849b..634ca20 100755
--- a/tests/pr87.test
+++ b/tests/pr87.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Test for PR automake/87.
-required=gcc
+required=cc
. ./defs || Exit 1
subdirs="foo bar"
diff --git a/tests/primary3.test b/tests/primary3.test
index 578d053..5509ed9 100755
--- a/tests/primary3.test
+++ b/tests/primary3.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2004 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Make sure we can build programs ending in `.la'
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/specflg7.test b/tests/specflg7.test
index 067a36d..b1593b0 100755
--- a/tests/specflg7.test
+++ b/tests/specflg7.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# The true/false example from the manual, plus a check for _SHORTNAME.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/specflg8.test b/tests/specflg8.test
index 1abcaa2..411a096 100755
--- a/tests/specflg8.test
+++ b/tests/specflg8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@
# with one extra indirection in the sources (PR/315), and
# use of _CPPFLAGS (PR/337).
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/subdir5.test b/tests/subdir5.test
index 2f0113b..2e4da59 100755
--- a/tests/subdir5.test
+++ b/tests/subdir5.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2009 Free Software Foundation,
-# Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2009, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -22,7 +22,7 @@
# This test assumes that the `make' utility is able to start
# over and reload Makefiles which have been remade (a non-POSIX feature).
-required='GNUmake gcc'
+required='GNUmake cc'
. ./defs || Exit 1
set -e
diff --git a/tests/subdir8.test b/tests/subdir8.test
index bc3043e..f6bed0d 100755
--- a/tests/subdir8.test
+++ b/tests/subdir8.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2009, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
# This test assumes that the `make' utility is able to start
# over and reload Makefiles which have been remade (a non-POSIX feature).
-required='GNUmake gcc'
+required='GNUmake cc'
. ./defs || Exit 1
set -e
diff --git a/tests/subobj10.test b/tests/subobj10.test
index a589e45..e902897 100755
--- a/tests/subobj10.test
+++ b/tests/subobj10.test
@@ -16,7 +16,7 @@
# PR 492: Test asm subdir-objects.
-required=gcc # avoid compiler errors.
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/subobj3.test b/tests/subobj3.test
index a4ba765..a21c6a0 100755
--- a/tests/subobj3.test
+++ b/tests/subobj3.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 Free
+# Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Test of subdir objects with C++.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
@@ -55,8 +55,6 @@ END
CFLAGS=
export CFLAGS
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
diff --git a/tests/subobj6.test b/tests/subobj6.test
index 42b6e14..4d03650 100755
--- a/tests/subobj6.test
+++ b/tests/subobj6.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +18,7 @@
# Test of subdir make distclean rules.
# From Robert Collins
-required=gcc
+required=cc
. ./defs || Exit 1
cat >> configure.in << 'END'
diff --git a/tests/subpkg.test b/tests/subpkg.test
index 3662937..5571bce 100755
--- a/tests/subpkg.test
+++ b/tests/subpkg.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +17,7 @@
# Check subpackage handling.
-required='gcc bison'
+required='cc bison'
. ./defs || Exit 1
set -e
diff --git a/tests/substre2.test b/tests/substre2.test
index ffe9e8b..3479841 100755
--- a/tests/substre2.test
+++ b/tests/substre2.test
@@ -17,7 +17,7 @@
# Test for bug in variable substitution references, where
# undefined variables break later substitutions.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/substref.test b/tests/substref.test
index 3d4da05..adc3c5c 100755
--- a/tests/substref.test
+++ b/tests/substref.test
@@ -18,7 +18,7 @@
# pattern is null.
# Report from Richard Boulton
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/suffix8.test b/tests/suffix8.test
index 70ff3a5..21b1932 100755
--- a/tests/suffix8.test
+++ b/tests/suffix8.test
@@ -17,7 +17,7 @@
# Test to make sure Automake supports multiple derivations for the same suffix.
# PR/37
-required='gcc libtoolize'
+required='cc libtoolize'
. ./defs || Exit 1
set -e
diff --git a/tests/target-cflags.test b/tests/target-cflags.test
index b324568..16679ca 100755
--- a/tests/target-cflags.test
+++ b/tests/target-cflags.test
@@ -18,7 +18,7 @@
# Test to make sure target specific CFLAGS work
# Assar Westerlund <address@hidden>
-required=gcc
+required=cc
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/targetclash.test b/tests/targetclash.test
index 0433b41..de3324c 100755
--- a/tests/targetclash.test
+++ b/tests/targetclash.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Check that target clashes are diagnosed.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/transform.test b/tests/transform.test
index 02fdd61..d9aa072 100755
--- a/tests/transform.test
+++ b/tests/transform.test
@@ -1,6 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2007, 2008 Free Software Foundation,
-# Inc.
+# Copyright (C) 2002, 2003, 2004, 2007, 2008, 2010 Free Software
+# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -17,7 +17,7 @@
# Make sure that --program-transform works.
-required=gcc
+required=cc
. ./defs || Exit 1
set -e
diff --git a/tests/yacc4.test b/tests/yacc4.test
index 0435ec0..40361c3 100755
--- a/tests/yacc4.test
+++ b/tests/yacc4.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +16,7 @@
# Some simple tests of ylwrap functionality.
-required='bison gcc'
+required='bison cc'
. ./defs || Exit 1
cat > configure.in << 'END'
diff --git a/tests/yacc6.test b/tests/yacc6.test
index f10effd..d092750 100755
--- a/tests/yacc6.test
+++ b/tests/yacc6.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
@@ -19,6 +19,7 @@
# Report from Tim Van Holder.
# Also make sure depcomp does not needlessly update headers.
# Report from Paolo Bonzini.
+# Keep this in sync with sister test 'yacc9.test'.
required='gcc bison GNUmake'
. ./defs || Exit 1
diff --git a/tests/yacc8.test b/tests/yacc8.test
index 979415c..9a8205f 100755
--- a/tests/yacc8.test
+++ b/tests/yacc8.test
@@ -1,5 +1,6 @@
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2006, 2010 Free Software Foundation,
+# Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -16,7 +17,7 @@
# Test for subdir parsers.
-required="gcc bison"
+required="cc bison"
. ./defs || Exit 1
diff --git a/tests/yacc9.test b/tests/yacc9.test
new file mode 100755
index 0000000..741379b
--- /dev/null
+++ b/tests/yacc9.test
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010 Free Software
+# Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure ylwrap put in right location.
+# Report from Tim Van Holder.
+# Also make sure depcomp does not needlessly update headers.
+# Report from Paolo Bonzini.
+# Keep this in sync with sister test 'yacc6.test'.
+
+required='cc bison GNUmake'
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([yacc6], [1.0])
+AC_CONFIG_AUX_DIR([aux1])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+
+test-time-unchanged:
+ test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = z
+test-time-changed:
+ test `ls -1t sub/main.$(OBJEXT) z | sed 1q` = sub/main.$(OBJEXT)
+END
+
+mkdir aux1 sub
+
+cat > sub/Makefile.am << 'END'
+bin_PROGRAMS = foo bar
+AM_YFLAGS = -d
+foo_SOURCES = foo.y main.c
+foo_CPPFLAGS = -DFOO
+bar_SOURCES = bar.y main.c
+BUILT_SOURCES = foo.h bar.h
+END
+
+cat > sub/foo.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token TOKEN
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cp sub/foo.y sub/bar.y
+
+cat >sub/main.c <<'EOF'
+#ifdef FOO
+# include "foo.h"
+#else
+# include "bar.h"
+#endif
+
+int
+main()
+{
+ return 0;
+}
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+test -f aux1/ylwrap
+test ! -f ylwrap
+test ! -f sub/ylwrap
+$FGREP '(top_srcdir)/aux1/ylwrap' sub/Makefile.in
+./configure --enable-dependency-tracking
+$MAKE
+grep '#.*line.*foo.y' sub/foo.c
+grep '#.*line.*bar.y' sub/bar.c
+
+$sleep
+: > z
+$sleep
+touch sub/bar.y
+$MAKE
+$MAKE test-time-unchanged
+$sleep
+sed s/TOKEN/TEKON/g sub/bar.y >sub/bar.yt
+mv -f sub/bar.yt sub/bar.y
+$MAKE
+$MAKE test-time-changed
diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test
index 6db5fd7..f1596cf 100755
--- a/tests/yaccvpath.test
+++ b/tests/yaccvpath.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -20,7 +20,7 @@
# `make' and `make distdir' and check whether the version of `parse.c'
# to be distributed is up to date.
-required='gcc bison'
+required='cc bison'
. ./defs || Exit 1
cat > configure.in << 'END'
--
1.6.5
- [PATCH 0/14] Fix/improve requirements declaration for test scripts., Stefano Lattarini, 2010/07/02
- [PATCH 01/14] New requirement "cc" for tests using a C compiler.,
Stefano Lattarini <=
- [PATCH 02/14] Drop useless "cc" requirement from a test script., Stefano Lattarini, 2010/07/02
- [PATCH 03/14] Do not SKIP a test on a command failing with `77' exit status., Stefano Lattarini, 2010/07/02
- [PATCH 04/14] Make sure all tests needing C compiler require it explicitly., Stefano Lattarini, 2010/07/02
- [PATCH 05/14] New requirement "c++" for tests using a C++ compiler., Stefano Lattarini, 2010/07/02
- [PATCH 06/14] Fix `silent*.test' for C++ compilers with "weird" names., Stefano Lattarini, 2010/07/02
- [PATCH 07/14] Make sure silent*.test work with non-GNU C compilers., Stefano Lattarini, 2010/07/02
- [PATCH 08/14] Fixes/renamings for "synced tests" among `silent*.test'., Stefano Lattarini, 2010/07/02
- [PATCH 09/14] Refactor code requiring compilers in testsuite., Stefano Lattarini, 2010/07/02
- [PATCH 10/14] Tests: new requirements "fortran" and "fortran77", Stefano Lattarini, 2010/07/02
- [PATCH 11/14] Fix code for requiring gfortran in tests., Stefano Lattarini, 2010/07/02