automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-2


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-281-g05aa739
Date: Sat, 29 Jan 2011 13:58:27 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=05aa7398db64e97090b0ba5fbccd4a31ebaf9c8c

The branch, yacc-work has been updated
       via  05aa7398db64e97090b0ba5fbccd4a31ebaf9c8c (commit)
       via  d47433523cced767f8c48fa39aa0556d552d323d (commit)
       via  478d8f99b33b22809f7e04245869a60507e8207b (commit)
       via  aa9a269b397af1c29de1f1fa40bd36b8d2759699 (commit)
      from  d86a273998952c09a569121c252512556b00d985 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 05aa7398db64e97090b0ba5fbccd4a31ebaf9c8c
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 28 16:57:05 2011 +0100

    coverage: more on 'yacc -d' and recovery from deleted headers
    
    * tests/yacc-deleted-headers.test: New test.
    * tests/Makefile.am (TESTS): Update.

commit d47433523cced767f8c48fa39aa0556d552d323d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 28 15:45:53 2011 +0100

    tests: remove redundancy from silent lex/yacc tests
    
    * tests/silent-yacc-gcc.test, tests/silent-yacc-generic.test: Merge
    these two testcases into ...
    * tests/silent-yacc.test: ... this new one, which doesn't fiddle
    which dependency tracking, as that shouldn't impact on generation
    of yacc-derived C source and header files (and, for what concerns
    compilation of C files, is already tested in other testcases).
    * tests/silent-lex-gcc.test, tests/silent-lex-generic.test: Merge
    these two testcases into ...
    * tests/silent-lex.test: ... this new test, for similar reasons.
    * tests/Makefile.am (TESTS): Update.

commit 478d8f99b33b22809f7e04245869a60507e8207b
Author: Stefano Lattarini <address@hidden>
Date:   Sat Jan 29 13:13:53 2011 +0100

    tests init: better messages for 'yacc' and 'lex' requirements
    
    * tests/defs.in: Give better diagnostic messages when a test must
    be skipped to the unavailability of yacc or lex program.  Also,
    improve syncing between code for requiring yacc and lex.

commit aa9a269b397af1c29de1f1fa40bd36b8d2759699
Author: Stefano Lattarini <address@hidden>
Date:   Fri Jan 28 23:04:14 2011 +0100

    configure: look for a lex program to be used by the testsuite
    
    This will allow the testcases requiring a 'lex' program to run also
    with vendor/legacy lex implementations, not only with 'flex'.
    
    * configure.ac: Look for a lex program, using AC_CHECK_PROGS.
    * tests/defs.in: New required entry 'lex'.
    ($LEX): Let the user override the lex program to be used by the
    testsuite.
    * tests/cond35.test ($required): Require 'lex', not 'flex'.
    * tests/cond36.test: Likewise.
    * tests/lexv3.test: Likewise.
    * tests/lexv3.test: Likewise.
    * tests/silent-lex-gcc.test: Likewise.
    * tests/silent-lex-generic.test: Likewise.
    * tests/silent-many-gcc.test: Likewise.
    * tests/silent-many-generic.test:likewise.
    * tests/lexvpath.test: Likewise, and fix typo in comments.

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                       |   47 +++++++++++
 Makefile.in                     |    1 +
 configure                       |   60 +++++++++++++--
 configure.ac                    |   17 +++--
 doc/Makefile.in                 |    1 +
 lib/Automake/Makefile.in        |    1 +
 lib/Automake/tests/Makefile.in  |    1 +
 lib/Makefile.in                 |    1 +
 lib/am/Makefile.in              |    1 +
 m4/Makefile.in                  |    1 +
 tests/Makefile.am               |    7 +-
 tests/Makefile.in               |    8 +-
 tests/cond35.test               |    2 +-
 tests/cond36.test               |    2 +-
 tests/defs.in                   |   18 +++--
 tests/lex3.test                 |    4 +-
 tests/lex5.test                 |    5 +-
 tests/lexvpath.test             |    8 +-
 tests/silent-lex-gcc.test       |  148 -----------------------------------
 tests/silent-lex-generic.test   |  148 -----------------------------------
 tests/silent-lex.test           |  135 ++++++++++++++++++++++++++++++++
 tests/silent-many-gcc.test      |    2 +-
 tests/silent-many-generic.test  |    2 +-
 tests/silent-yacc-gcc.test      |  150 -----------------------------------
 tests/silent-yacc-generic.test  |  150 -----------------------------------
 tests/silent-yacc.test          |  138 ++++++++++++++++++++++++++++++++
 tests/yacc-deleted-headers.test |  165 +++++++++++++++++++++++++++++++++++++++
 27 files changed, 589 insertions(+), 634 deletions(-)
 delete mode 100755 tests/silent-lex-gcc.test
 delete mode 100755 tests/silent-lex-generic.test
 create mode 100755 tests/silent-lex.test
 delete mode 100755 tests/silent-yacc-gcc.test
 delete mode 100755 tests/silent-yacc-generic.test
 create mode 100755 tests/silent-yacc.test
 create mode 100755 tests/yacc-deleted-headers.test

diff --git a/ChangeLog b/ChangeLog
index 4470c28..f4d7a99 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,50 @@
+2011-01-29   Stefano Lattarini  <address@hidden>
+
+       coverage: more on 'yacc -d' and recovery from deleted headers
+       * tests/yacc-deleted-headers.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-29   Stefano Lattarini  <address@hidden>
+
+       tests: remove redundancy from silent lex/yacc tests
+       * tests/silent-yacc-gcc.test, tests/silent-yacc-generic.test: Merge
+       these two testcases into ...
+       * tests/silent-yacc.test: ... this new one, which doesn't fiddle
+       which dependency tracking, as that shouldn't impact on generation
+       of yacc-derived C source and header files (and, for what concerns
+       compilation of C files, is already tested in other testcases).
+       * tests/silent-lex-gcc.test, tests/silent-lex-generic.test: Merge
+       these two testcases into ...
+       * tests/silent-lex.test: ... this new test, for similar reasons.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-01-29  Stefano Lattarini  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       tests init: better messages for 'yacc' and 'lex' requirements
+       * tests/defs.in: Give better diagnostic messages when a test must
+       be skipped to the unavailability of yacc or lex program.  Also,
+       improve syncing between code for requiring yacc and lex.
+
+2011-01-28  Stefano Lattarini  <address@hidden>
+
+       configure: look for a lex program to be used by the testsuite
+       This will allow the testcases requiring a 'lex' program to run also
+       with vendor/legacy lex implementations, not only with 'flex'.
+       * configure.ac: Look for a lex program, using AC_CHECK_PROGS.
+       * tests/defs.in: New required entry 'lex'.
+       ($LEX): Let the user override the lex program to be used by the
+       testsuite.
+       * tests/cond35.test ($required): Require 'lex', not 'flex'.
+       * tests/cond36.test: Likewise.
+       * tests/lexv3.test: Likewise.
+       * tests/lexv3.test: Likewise.
+       * tests/silent-lex-gcc.test: Likewise.
+       * tests/silent-lex-generic.test: Likewise.
+       * tests/silent-many-gcc.test: Likewise.
+       * tests/silent-many-generic.test:likewise.
+       * tests/lexvpath.test: Likewise, and fix typo in comments.
+
 2011-01-22   Stefano Lattarini  <address@hidden>
 
        configure: look for a yacc program to be used by the testsuite
diff --git a/Makefile.in b/Makefile.in
index dd2b085..23ffa29 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -166,6 +166,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/configure b/configure
index 789a8d3..ffb4514 100755
--- a/configure
+++ b/configure
@@ -575,6 +575,7 @@ GREP
 MODIFICATION_DELAY
 LN
 HELP2MAN
+LEX
 YACC
 TEX
 PERL_THREADS
@@ -2405,12 +2406,16 @@ fi
 
 
 
-# The test suite will skip some tests if no yacc program is available.
-# We don't use AC_PROG_YACC because:
-#  1. we don't want bison to be preferred to system yacc;
-#  2. we don't want $YACC to be defined to 'yacc' by default;
-#  3. we prefer not to have the YFLAGS variable to be AC_SUBST'd,
-#  4. we prefer that the YACC variable is not reported in the
+# The test suite will skip some tests if no lex or yacc program is
+# available.
+# We don't use AC_PROG_LEX nor AC_PROG_YACC here because:
+#  1. we don't want flex (resp. bison) to be preferred to system lex
+#     (resp. system yacc);
+#  2. we don't want $LEX (resp. $YACC) to be defined to ':' (resp. 'yacc')
+#     by default;
+#  3. we prefer not to have the variables YFLAGS, LEX_OUTPUT_ROOT and
+#     LEXLIB to be calculated and/or AC_SUBST'd;
+#  4. we prefer that the YACC and LEX variables are not reported in the
 #     configure help screen.
 for ac_prog in yacc byacc 'bison -y'
 do
@@ -2455,6 +2460,49 @@ fi
 done
 test -n "$YACC" || YACC="false"
 
+for ac_prog in lex flex
+do
+  # Extract the first word of "$ac_prog", so it can be a program name with 
args.
+set dummy $ac_prog; ac_word=$2
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if ${ac_cv_prog_LEX+:} false; then :
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$LEX"; then
+  ac_cv_prog_LEX="$LEX" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+    for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_LEX="$ac_prog"
+    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" 
>&5
+    break 2
+  fi
+done
+  done
+IFS=$as_save_IFS
+
+fi
+fi
+LEX=$ac_cv_prog_LEX
+if test -n "$LEX"; then
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5
+$as_echo "$LEX" >&6; }
+else
+  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+  test -n "$LEX" && break
+done
+test -n "$LEX" || LEX="false"
+
 
 # Generate man pages.
 
diff --git a/configure.ac b/configure.ac
index 343bca5..ddd0af6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -94,14 +94,19 @@ AC_SUBST([PERL_THREADS])
 # The test suite will skip some tests if tex is absent.
 AC_CHECK_PROG([TEX], [tex], [tex])
 
-# The test suite will skip some tests if no yacc program is available.
-# We don't use AC_PROG_YACC because:
-#  1. we don't want bison to be preferred to system yacc;
-#  2. we don't want $YACC to be defined to 'yacc' by default;
-#  3. we prefer not to have the YFLAGS variable to be AC_SUBST'd,
-#  4. we prefer that the YACC variable is not reported in the
+# The test suite will skip some tests if no lex or yacc program is
+# available.
+# We don't use AC_PROG_LEX nor AC_PROG_YACC here because:
+#  1. we don't want flex (resp. bison) to be preferred to system lex
+#     (resp. system yacc);
+#  2. we don't want $LEX (resp. $YACC) to be defined to ':' (resp. 'yacc')
+#     by default;
+#  3. we prefer not to have the variables YFLAGS, LEX_OUTPUT_ROOT and
+#     LEXLIB to be calculated and/or AC_SUBST'd;
+#  4. we prefer that the YACC and LEX variables are not reported in the
 #     configure help screen.
 AC_CHECK_PROGS([YACC], [yacc byacc 'bison -y'], [false])
+AC_CHECK_PROGS([LEX], [lex flex], [false])
 
 # Generate man pages.
 AM_MISSING_PROG([HELP2MAN], [help2man])
diff --git a/doc/Makefile.in b/doc/Makefile.in
index a3cfbba..8eda666 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -133,6 +133,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index dd331fe..a86e899 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -153,6 +153,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 80427fb..9b2b38c 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -198,6 +198,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 63edec9..4d5f77e 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -155,6 +155,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index e24400b..225977f 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -113,6 +113,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/m4/Makefile.in b/m4/Makefile.in
index baaf548..caf019c 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -113,6 +113,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index e639b6c..8422455 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -644,10 +644,8 @@ silentf77.test \
 silentf90.test \
 silent-many-gcc.test \
 silent-many-generic.test \
-silent-lex-gcc.test \
-silent-lex-generic.test \
-silent-yacc-gcc.test \
-silent-yacc-generic.test \
+silent-lex.test \
+silent-yacc.test \
 silent-yacc-headers.test \
 sinclude.test \
 srcsub.test \
@@ -807,6 +805,7 @@ yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-deleted-headers.test \
 yacc-dist-nobuild.test \
 yacc-nodist.test \
 yaccpp.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 25fc4a8..a1cd3e2 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -203,6 +203,7 @@ INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
 INSTALL_SCRIPT = @INSTALL_SCRIPT@
 INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
+LEX = @LEX@
 LIBOBJS = @LIBOBJS@
 LIBS = @LIBS@
 LN = @LN@
@@ -912,10 +913,8 @@ silentf77.test \
 silentf90.test \
 silent-many-gcc.test \
 silent-many-generic.test \
-silent-lex-gcc.test \
-silent-lex-generic.test \
-silent-yacc-gcc.test \
-silent-yacc-generic.test \
+silent-lex.test \
+silent-yacc.test \
 silent-yacc-headers.test \
 sinclude.test \
 srcsub.test \
@@ -1075,6 +1074,7 @@ yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-deleted-headers.test \
 yacc-dist-nobuild.test \
 yacc-nodist.test \
 yaccpp.test \
diff --git a/tests/cond35.test b/tests/cond35.test
index 34a7e7f..6e8fba4 100755
--- a/tests/cond35.test
+++ b/tests/cond35.test
@@ -17,7 +17,7 @@
 # Check rules output for parser defined conditionally.
 # Report from Roman Fietze.
 
-required='flex yacc gcc'
+required='lex yacc gcc'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/cond36.test b/tests/cond36.test
index d06ed87..6f0df84 100755
--- a/tests/cond36.test
+++ b/tests/cond36.test
@@ -16,7 +16,7 @@
 
 # Check rules output for parser defined conditionally.
 
-required='flex yacc gcc'
+required='lex yacc gcc'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/defs.in b/tests/defs.in
index cfa9fd3..449e3e3 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -63,6 +63,7 @@ export SHELL
 # User can override various tools used.
 test -z "$PERL" && PERL='@PERL@'
 test -z "$YACC" && YACC='@YACC@'
+test -z "$LEX" && LEX='@LEX@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
 test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
@@ -210,16 +211,21 @@ do
       echo "$me: running texi2dvi -o /dev/null --version"
       ( texi2dvi -o /dev/null --version ) || exit 77
       ;;
+    lex)
+      if test x"$LEX" = x"false"; then
+        echo "$me: no working \$LEX found at configure time," \
+                  "or explicitly disabled" >&2
+        exit 77
+      fi
+      export LEX
+      ;;
     yacc)
       if test x"$YACC" = x"false"; then
-        # No yacc program was found at configure time, or the user has
-        # explicitly told he doesn't want a yacc program to be used.
-        echo "$me: \$YACC is \"false\", skipping test" >&2
+        echo "$me: no working \$YACC found at configure time," \
+                  "or explicitly disabled" >&2
         exit 77
-      else
-        # Make YACC available to configure by exporting it.
-        export YACC
       fi
+      export YACC
       ;;
     # Generic case: the tool must support --version.
     *)
diff --git a/tests/lex3.test b/tests/lex3.test
index e2b01d8..536239b 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010 Free Software
+# Copyright (C) 1999, 2001, 2002, 2003, 2004, 2010, 2011 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -19,7 +19,7 @@
 # Test associated with PR 19.
 # From Matthew D. Langston.
 
-required='gcc flex GNUmake'
+required='gcc lex GNUmake'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/lex5.test b/tests/lex5.test
index 5c688d7..f3ddccc 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010, 2011 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 lexers.
 
-required='gcc GNUmake flex'
+required='gcc GNUmake lex'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
index 378795e..54a517a 100755
--- a/tests/lexvpath.test
+++ b/tests/lexvpath.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2010 Free Software Foundation, Inc.
+# Copyright (C) 2010, 2011 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 @@
 
 # Please keep this in sync with sister test `yaccvapth.test'.
 
-required='gcc flex'
+required='gcc lex'
 . ./defs || Exit 1
 
 set -e
@@ -65,14 +65,14 @@ $AUTOMAKE -a
 
 mkdir sub
 
-# We must run configure early, to find out whay $LEX_OUTPUT_ROOT is.
+# We must run configure early, to find out why $LEX_OUTPUT_ROOT is.
 cd sub
 ../configure
 . ./lexoutroot
 test -n "$LEX_OUTPUT_ROOT" # sanity check
 cd ..
 
-flex lexer.l
+$LEX lexer.l
 mv "$LEX_OUTPUT_ROOT".c lexer.c
 
 cd sub
diff --git a/tests/silent-lex-gcc.test b/tests/silent-lex-gcc.test
deleted file mode 100755
index 7550393..0000000
--- a/tests/silent-lex-gcc.test
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010, 2011 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 silent-rules mode for Lex, forcing gcc depmode.
-# Keep this in sync with sister test `silent-lex-generic.test'.
-
-required='flex gcc'
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_LEX
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.l
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_LFLAGS = -n
-foo2_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-LDADD = $(LEXLIB)
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.l
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_LFLAGS = -n
-bar2_CFLAGS = $(AM_CFLAGS)
-LDADD = $(LEXLIB)
-EOF
-
-cat > foo.l <<'EOF'
-%%
-"END"   return EOF;
-.
-%%
-EOF
-cp foo.l sub/bar.l
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in
-$FGREP 'bar2-bar.c' sub/Makefile.in
-
-# Force gcc ("fast") depmode.
-# This apparently useless "for" loop is here to simplify the syncing
-# with sister test `silent-lex-gcc.test'.
-for config_args in \
-  am_cv_CC_dependencies_compiler_type=gcc
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'LEX .*foo\.' stdout
-  grep 'LEX .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for LEX, as probably lex hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f *foo.c sub/*bar.c
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
diff --git a/tests/silent-lex-generic.test b/tests/silent-lex-generic.test
deleted file mode 100755
index 5322326..0000000
--- a/tests/silent-lex-generic.test
+++ /dev/null
@@ -1,148 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010, 2011 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 silent-rules mode for Lex.
-# Keep this in sync with sister test `silent-lex-gcc.test'.
-
-required='flex'
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_LEX
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.l
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_LFLAGS = -n
-foo2_CFLAGS = $(AM_CFLAGS)
-SUBDIRS = sub
-LDADD = $(LEXLIB)
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.l
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_LFLAGS = -n
-bar2_CFLAGS = $(AM_CFLAGS)
-LDADD = $(LEXLIB)
-EOF
-
-cat > foo.l <<'EOF'
-%%
-"END"   return EOF;
-.
-%%
-EOF
-cp foo.l sub/bar.l
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in
-$FGREP 'bar2-bar.c' sub/Makefile.in
-
-# Force dependency tracking explicitly, so that slow dependency
-# extractors are not rejected.  Try also with dependency tracking
-# explicitly disabled.
-for config_args in \
-  --enable-dependency-tracking --disable-dependency-tracking
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'LEX .*foo\.' stdout
-  grep 'LEX .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for LEX, as probably lex hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f *foo.c sub/*bar.c
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
diff --git a/tests/silent-lex.test b/tests/silent-lex.test
new file mode 100755
index 0000000..32f9698
--- /dev/null
+++ b/tests/silent-lex.test
@@ -0,0 +1,135 @@
+#!/bin/sh
+# Copyright (C) 2010, 2011 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 silent-rules mode for Lex.
+
+required='flex'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_LFLAGS = -n
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_LFLAGS = -n
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Ensure per-target rules are used, to ensure their coverage below.
+$FGREP 'foo2-foo.c' Makefile.in || Exit 99
+$FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+
+./configure --enable-silent-rules
+
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP ' (-c|-o)' stdout && Exit 1
+$EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+grep 'LEX .*foo\.' stdout
+grep 'LEX .*bar\.' stdout
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep 'CCLD .*foo1' stdout
+grep 'CCLD .*bar1' stdout
+grep 'CCLD .*foo2' stdout
+grep 'CCLD .*bar2' stdout
+
+# Cleaning and then rebuilding with the same V flag (and without
+# removing the generated sources in between) shouldn't trigger a
+# different set of rules.
+$MAKE clean
+
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP ' (-c|-o)' stdout && Exit 1
+$EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+# Don't look for LEX, as probably lex hasn't been re-run.
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep 'CCLD .*foo1' stdout
+grep 'CCLD .*bar1' stdout
+grep 'CCLD .*foo2' stdout
+grep 'CCLD .*bar2' stdout
+
+# Ensure a truly clean rebuild.
+$MAKE clean
+rm -f *foo.c sub/*bar.c
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep ' -c ' stdout
+grep ' -o ' stdout
+grep 'ylwrap ' stdout
+
+$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+# Cleaning and then rebuilding with the same V flag (and without
+# removing the generated sources in between) shouldn't trigger a
+# different set of rules.
+$MAKE clean
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+# Don't look for ylwrap, as probably lex hasn't been re-run.
+grep ' -c ' stdout
+grep ' -o ' stdout
+
+$EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+:
diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test
index 1732d9d..6515c19 100755
--- a/tests/silent-many-gcc.test
+++ b/tests/silent-many-gcc.test
@@ -21,7 +21,7 @@
 # This test requires the GNU compilers; keep it in sync with sister test
 # `silent-many-generic.test', which should work with generic compilers.
 
-required='gcc g++ gfortran flex yacc'
+required='gcc g++ gfortran lex yacc'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test
index 0502bf8..2a328ea 100755
--- a/tests/silent-many-generic.test
+++ b/tests/silent-many-generic.test
@@ -23,7 +23,7 @@
 # and forces the use of gcc depmode.
 
 # FIXME: generic C++/Fortran compilers should suffice here
-required='g++ gfortran flex yacc'
+required='g++ gfortran lex yacc'
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/silent-yacc-gcc.test b/tests/silent-yacc-gcc.test
deleted file mode 100755
index a1f2ae6..0000000
--- a/tests/silent-yacc-gcc.test
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010, 2011 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 silent-rules mode for Yacc, forcing gcc depmode.
-# Keep this in sync with sister test `silent-yacc-generic.test'.
-
-required='gcc yacc'
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.y
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_YFLAGS = -v
-foo2_CFLAGS = $(AM_CPPFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.y
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_YFLAGS = -v
-bar2_CFLAGS = $(AM_CPPFLAGS)
-EOF
-
-cat > foo.y <<'EOF'
-%{
-void yyerror (char *s) {}
-int yylex (void) {return 0;}
-int main(void) {return 0;}
-%}
-%token EOF
-%%
-fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
-EOF
-cp foo.y sub/bar.y
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in
-$FGREP 'bar2-bar.c' sub/Makefile.in
-
-# Force gcc ("fast") depmode.
-# This apparently useless "for" loop is here to simplify the syncing
-# with sister test `silent-yacc-gcc.test'.
-for config_args in \
-  am_cv_CC_dependencies_compiler_type=gcc
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'YACC .*foo\.' stdout
-  grep 'YACC .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for YACC, as probably yacc hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f *foo.[ch] sub/*bar.[ch]
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
diff --git a/tests/silent-yacc-generic.test b/tests/silent-yacc-generic.test
deleted file mode 100755
index 52a98a8..0000000
--- a/tests/silent-yacc-generic.test
+++ /dev/null
@@ -1,150 +0,0 @@
-#!/bin/sh
-# Copyright (C) 2010, 2011 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 silent-rules mode for Yacc.
-# Keep this in sync with sister test `silent-yacc-gcc.test'.
-
-required=yacc
-. ./defs || Exit 1
-
-set -e
-
-mkdir sub
-
-cat >>configure.in <<'EOF'
-AM_SILENT_RULES
-AM_PROG_CC_C_O
-AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
-AC_OUTPUT
-EOF
-
-cat > Makefile.am <<'EOF'
-# Need generic and non-generic rules.
-bin_PROGRAMS = foo1 foo2
-foo1_SOURCES = foo.y
-foo2_SOURCES = $(foo1_SOURCES)
-foo2_YFLAGS = -v
-foo2_CFLAGS = $(AM_CPPFLAGS)
-SUBDIRS = sub
-EOF
-
-cat > sub/Makefile.am <<'EOF'
-AUTOMAKE_OPTIONS = subdir-objects
-# Need generic and non-generic rules.
-bin_PROGRAMS = bar1 bar2
-bar1_SOURCES = bar.y
-bar2_SOURCES = $(bar1_SOURCES)
-bar2_YFLAGS = -v
-bar2_CFLAGS = $(AM_CPPFLAGS)
-EOF
-
-cat > foo.y <<'EOF'
-%{
-void yyerror (char *s) {}
-int yylex (void) {return 0;}
-int main(void) {return 0;}
-%}
-%token EOF
-%%
-fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
-EOF
-cp foo.y sub/bar.y
-
-$ACLOCAL
-$AUTOMAKE --add-missing
-$AUTOCONF
-
-# Ensure per-target rules are used, to ensure their coverage below.
-$FGREP 'foo2-foo.c' Makefile.in
-$FGREP 'bar2-bar.c' sub/Makefile.in
-
-# Force dependency tracking explicitly, so that slow dependency
-# extractors are not rejected.  Try also with dependency tracking
-# explicitly disabled.
-for config_args in \
-  --enable-dependency-tracking --disable-dependency-tracking
-do
-  ./configure $config_args --enable-silent-rules
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  grep 'YACC .*foo\.' stdout
-  grep 'YACC .*bar\.' stdout
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  $EGREP ' (-c|-o)' stdout && Exit 1
-  $EGREP '(mv|ylwrap) ' stdout && Exit 1
-
-  # Don't look for YACC, as probably yacc hasn't been re-run.
-  grep ' CC .*foo\.' stdout
-  grep ' CC .*bar\.' stdout
-  grep 'CCLD .*foo1' stdout
-  grep 'CCLD .*bar1' stdout
-  grep 'CCLD .*foo2' stdout
-  grep 'CCLD .*bar2' stdout
-
-  # Ensure a truly clean rebuild.
-  $MAKE clean
-  rm -f *foo.[ch] sub/*bar.[ch]
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-  grep 'ylwrap ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Cleaning and then rebuilding with the same V flag (and without
-  # removing the generated sources in between) shouldn't trigger a
-  # different set of rules.
-  $MAKE clean
-
-  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
-  cat stdout
-
-  # Don't look for ylwrap, as probably lex hasn't been re-run.
-  grep ' -c ' stdout
-  grep ' -o ' stdout
-
-  $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
-
-  # Ensure a truly clean reconfiguration/rebuild.
-  $MAKE clean
-  $MAKE maintainer-clean
-
-done
-
-:
diff --git a/tests/silent-yacc.test b/tests/silent-yacc.test
new file mode 100755
index 0000000..4a5e46a
--- /dev/null
+++ b/tests/silent-yacc.test
@@ -0,0 +1,138 @@
+#!/bin/sh
+# Copyright (C) 2010, 2011 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 silent-rules mode for Yacc.
+# Keep this in sync with sister test `silent-yacc-gcc.test'.
+
+required=yacc
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_YFLAGS = -v
+foo2_CFLAGS = $(AM_CPPFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_YFLAGS = -v
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) { return; }
+int yylex (void) { return 0; }
+int main (void) { return 0; }
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Ensure per-target rules are used, to ensure their coverage below.
+$FGREP 'foo2-foo.c' Makefile.in || Exit 99
+$FGREP 'bar2-bar.c' sub/Makefile.in || Exit 99
+
+./configure --enable-silent-rules
+
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP ' (-c|-o)' stdout && Exit 1
+$EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+grep 'YACC .*foo\.' stdout
+grep 'YACC .*bar\.' stdout
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep 'CCLD .*foo1' stdout
+grep 'CCLD .*bar1' stdout
+grep 'CCLD .*foo2' stdout
+grep 'CCLD .*bar2' stdout
+
+# Cleaning and then rebuilding with the same V flag (and without
+# removing the generated sources in between) shouldn't trigger a
+# different set of rules.
+$MAKE clean
+
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+$EGREP ' (-c|-o)' stdout && Exit 1
+$EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+# Don't look for YACC, as probably yacc hasn't been re-run.
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep 'CCLD .*foo1' stdout
+grep 'CCLD .*bar1' stdout
+grep 'CCLD .*foo2' stdout
+grep 'CCLD .*bar2' stdout
+
+# Ensure a truly clean rebuild.
+$MAKE clean
+rm -f *foo.[ch] sub/*bar.[ch]
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+grep ' -c ' stdout
+grep ' -o ' stdout
+grep 'ylwrap ' stdout
+
+$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+# Cleaning and then rebuilding with the same V flag (and without
+# removing the generated sources in between) shouldn't trigger a
+# different set of rules.
+$MAKE clean
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+
+# Don't look for ylwrap, as probably lex hasn't been re-run.
+grep ' -c ' stdout
+grep ' -o ' stdout
+
+$EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+:
diff --git a/tests/yacc-deleted-headers.test b/tests/yacc-deleted-headers.test
new file mode 100755
index 0000000..6d6a0a1
--- /dev/null
+++ b/tests/yacc-deleted-headers.test
@@ -0,0 +1,165 @@
+#! /bin/sh
+# Copyright (C) 2011 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/>.
+
+# Tests that we can recover from deleted headers generated by `yacc -d'.
+
+required=yacc
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = p1 p2 p3 p4
+# The order in which files are listed in the p*_SOURCES variables
+# below is significant, since it causes make failures whenever
+# the proper definition of BUILT_SOURCES or the declaration of
+# extra dependencies for `main3.o' are removed.
+p1_SOURCES = main1.c parse1.y
+p2_SOURCES = main2.c parse2.y
+p3_SOURCES = main3.c parse3.y parse3.h
+p4_SOURCES = parse4.y
+AM_YFLAGS = -d
+p2_YFLAGS = -d
+
+BUILT_SOURCES = parse1.h p2-parse2.h
+
+# When we know which files include a yacc-generated header, we
+# should be able to just declare dependencies directly instead
+# of relying on the BUILT_SOURCES hack, and things should still
+# work correctly.
address@hidden@: parse3.h
+
+.PHONY: clean-p3 build-p3
+build-p3: p3$(EXEEXT)
+clean-p3:
+       rm -f p3$(EXEEXT)
+END
+
+cat > parse1.y << 'END'
+%{
+#include "parse1.h"
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+%}
+%token ZARDOZ
+%%
+x : 'x' {};
+%%
+END
+
+cat > main1.c << 'END'
+#include "parse1.h"
+int main (void)
+{
+  return ZARDOZ + yyparse ();
+}
+END
+
+sed 's/"parse1\.h"/"p2-parse2.h"/' parse1.y > parse2.y
+sed 's/"parse1\.h"/"p2-parse2.h"/' main1.c > main2.c
+
+sed 's/"parse1\.h"/"parse3.h"/' parse1.y > parse3.y
+sed 's/"parse1\.h"/"parse3.h"/' main1.c > main3.c
+
+cat > parse4.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+%}
+%%
+x : 'x' {};
+%%
+int main (void)
+{
+  return 0;
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+
+headers='parse1.h p2-parse2.h parse3.h parse4.h'
+
+# Check that we remake only the necessary headers.
+
+rm -f $headers
+$MAKE parse1.h
+test -f parse1.h
+test ! -r p2-parse2.h
+test ! -r parse3.h
+test ! -r parse4.h
+
+rm -f $headers
+$MAKE p2-parse2.h
+test ! -r parse1.h
+test -f p2-parse2.h
+test ! -r parse3.h
+test ! -r parse4.h
+
+rm -f $headers
+$MAKE parse3.h
+test ! -r parse1.h
+test ! -r p2-parse2.h
+test -f parse3.h
+test ! -r parse4.h
+# Since we declared parse3.h into $(p3_SOURCES), make should be
+# able to rebuild it automatically before remaking `p3'.
+rm -f $headers
+$MAKE clean-p3
+test ! -f parse3.h # Sanity check.
+$MAKE build-p3
+test -f parse3.h
+
+$MAKE
+
+rm -f $headers
+$MAKE parse4.h
+test ! -r parse1.h
+test ! -r p2-parse2.h
+test ! -r parse3.h
+test -f parse4.h
+
+# Now remake all the headers together.
+
+rm -f $headers
+$MAKE $headers
+test -f parse1.h
+test -f p2-parse2.h
+test -f parse3.h
+test -f parse4.h
+
+# Most headers should be remade by "make all".
+
+rm -f $headers
+$MAKE all
+test -f parse1.h
+test -f p2-parse2.h
+test -f parse3.h
+# parse4.h is not declared in any *_SOURCES variable, nor #included
+# by any C source file, so it shouldn't be rebuilt by "make all".
+test ! -r parse4.h
+
+:


hooks/post-receive
-- 
GNU Automake



reply via email to

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