automake-patches
[Top][All Lists]
Advanced

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

[PATCH] yacc: extend and improve tests


From: Stefano Lattarini
Subject: [PATCH] yacc: extend and improve tests
Date: Sat, 8 Jan 2011 14:33:34 +0100
User-agent: KMail/1.13.3 (Linux/2.6.30-2-686; KDE/4.4.4; i686; ; )

Hello automakers.

Here are some testsuite enhancements that might help the on-going
work on Yacc support.  OK for a proper temporary branch off of
'yacc-clean' (after having merged into it the older temporary
branch 'tests-lexyacc-extend' a.k.a. commit v1.11-249-gd4dcf50),
to be merged in master afterwards?

I will push in 72 hours if there are no objections.

Regards,
  Stefano
From bd11d8edcc14c05e232e5f3918ebbbda7e565e28 Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Wed, 5 Jan 2011 16:07:56 +0100
Subject: [PATCH] yacc: extend and improve tests

* tests/yacc-basic.test: Also check that the intermediate C file
is mentioned in the generated Makefile.in, and that it is created
by the first make invocation.
* tests/yacc.test: Test removed, it has become obsolete now.
* tests/yacc3.test: Test removed, superseded by ...
* tests/yacc-d-basic.test: ... this new test.
* tests/yacc2.test: Add reference to that new test in the heading
comments.
* tests/yacc-d-vpath.test: New test.
* tests/yaccvpath.test: Updated heading comments.  Do not require
gcc anymore, as any working C compiler should be enough.  Remove
redundant comments.
* tests/yacc-nodist.test: New test.
* tests/yacc-dist-nobuild.test: New test.
* tests/Makefile.am (TESTS): Update.
---
 ChangeLog                    |   19 +++++
 tests/Makefile.am            |    6 +-
 tests/Makefile.in            |    6 +-
 tests/yacc-basic.test        |   12 +++-
 tests/yacc-d-basic.test      |  157 ++++++++++++++++++++++++++++++++++++++++++
 tests/yacc-d-vpath.test      |  112 ++++++++++++++++++++++++++++++
 tests/yacc-dist-nobuild.test |   95 +++++++++++++++++++++++++
 tests/yacc-nodist.test       |  103 +++++++++++++++++++++++++++
 tests/yacc.test              |   40 -----------
 tests/yacc2.test             |    1 +
 tests/yacc3.test             |   52 --------------
 tests/yaccvpath.test         |   13 +---
 12 files changed, 510 insertions(+), 106 deletions(-)
 create mode 100755 tests/yacc-d-basic.test
 create mode 100755 tests/yacc-d-vpath.test
 create mode 100755 tests/yacc-dist-nobuild.test
 create mode 100755 tests/yacc-nodist.test
 delete mode 100755 tests/yacc.test
 delete mode 100755 tests/yacc3.test

diff --git a/ChangeLog b/ChangeLog
index 13fdc61..08a2e4c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,22 @@
+2011-01-08   Stefano Lattarini  <address@hidden>
+
+       yacc: extend and improve tests
+       * tests/yacc-basic.test: Also check that the intermediate C file
+       is mentioned in the generated Makefile.in, and that it is created
+       by the first make invocation.
+       * tests/yacc.test: Test removed, it has become obsolete now.
+       * tests/yacc3.test: Test removed, superseded by ...
+       * tests/yacc-d-basic.test: ... this new test.
+       * tests/yacc2.test: Add reference to that new test in the heading
+       comments.
+       * tests/yacc-d-vpath.test: New test.
+       * tests/yaccvpath.test: Updated heading comments.  Do not require
+       gcc anymore, as any working C compiler should be enough.  Remove
+       redundant comments.
+       * tests/yacc-nodist.test: New test.
+       * tests/yacc-dist-nobuild.test: New test.
+       * tests/Makefile.am (TESTS): Update.
+
 2010-12-13  Stefano Lattarini  <address@hidden>
 
        Extend, fix and improve tests on Lex and Yacc support.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 00829ef..78a55f0 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -796,18 +796,20 @@ whoami.test \
 xsource.test \
 xz.test \
 yacc-basic.test \
+yacc-d-basic.test \
 yacc-clean.test \
-yacc.test \
 yacc2.test \
-yacc3.test \
 yacc4.test \
 yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-dist-nobuild.test \
+yacc-nodist.test \
 yaccpp.test \
 yaccvpath.test \
+yacc-d-vpath.test \
 yflags.test \
 yflags2.test \
 $(parallel_tests)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3813e8f..b5e0057 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1063,18 +1063,20 @@ whoami.test \
 xsource.test \
 xz.test \
 yacc-basic.test \
+yacc-d-basic.test \
 yacc-clean.test \
-yacc.test \
 yacc2.test \
-yacc3.test \
 yacc4.test \
 yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-dist-nobuild.test \
+yacc-nodist.test \
 yaccpp.test \
 yaccvpath.test \
+yacc-d-vpath.test \
 yflags.test \
 yflags2.test \
 $(parallel_tests)
diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test
index af0c488..3bd3991 100755
--- a/tests/yacc-basic.test
+++ b/tests/yacc-basic.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
@@ -32,6 +32,10 @@ END
 cat > Makefile.am << 'END'
 bin_PROGRAMS = foo
 foo_SOURCES = parse.y foo.c
+
+.PHONY: echo-distcom
+echo-distcom:
+       @echo ' ' $(DIST_COMMON) ' '
 END
 
 cat > parse.y << 'END'
@@ -55,12 +59,18 @@ $AUTOMAKE -a
 
 ./configure
 $MAKE
+# The `parse.c' must be created and not removed (i.e., not treated
+# like an "intermediate file" in GNU make sense).
+test -f parse.c
 
 echo a | ./foo
 echo b | ./foo && Exit 1
 
 # The generated file `parse.c' must be shipped.
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]parse.c '
 $MAKE distdir
+ls -l $distdir
 test -f $distdir/parse.c
 
 # Sanity check on distribution.
diff --git a/tests/yacc-d-basic.test b/tests/yacc-d-basic.test
new file mode 100755
index 0000000..f63b8b5
--- /dev/null
+++ b/tests/yacc-d-basic.test
@@ -0,0 +1,157 @@
+#! /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 on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS
+# and maude_YFLAGS.
+
+. ./defs || Exit 1
+
+set -e
+
+tab='  '
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([foo/Makefile bar/Makefile baz/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+SUBDIRS = foo bar baz
+END
+
+mkdir foo bar baz
+
+cat > foo/Makefile.am <<'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = parse.y main.c
+.PHONY: echo-distcom
+echo-distcom:
+       @echo ' ' $(DIST_COMMON) ' '
+END
+cp foo/Makefile.am bar/Makefile.am
+cp foo/Makefile.am baz/Makefile.am
+
+cat > foo/parse.y << 'END'
+%{
+#include "parse.h"
+int yylex () { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+x : 'x' {};
+%%
+END
+cp foo/parse.y bar/parse.y
+
+cat > foo/main.c << 'END'
+#include "parse.h"
+int main ()
+{
+  return yyparse ();
+}
+END
+cp foo/main.c bar/main.c
+
+# Even the generated header file is renamed when target-specific YFLAGS
+# are used.  This might not be the best semantic, but it has been in place
+# for quite a long time, so just go along with it for now.
+sed 's/"parse\.h"/"zardoz-parse.h"/' foo/parse.y > baz/parse.y
+sed 's/"parse\.h"/"zardoz-parse.h"/' foo/main.c > baz/main.c
+
+$ACLOCAL
+$AUTOCONF
+
+$AUTOMAKE -a
+$FGREP parse.h foo/Makefile.in bar/Makefile.in baz/Makefile.in && Exit 1
+
+cat >> foo/Makefile.am <<END
+BUILT_SOURCES = parse.h
+YFLAGS=\
+-d
+END
+$AUTOMAKE -Wno-gnu foo/Makefile
+
+sed 's/EOL$//' >> bar/Makefile.am <<END
+AM_YFLAGS${tab}=  -d EOL
+BUILT_SOURCES = parse.h
+END
+$AUTOMAKE bar/Makefile
+
+cat >> baz/Makefile.am <<END
+BUILT_SOURCES = zardoz-parse.h
+zardoz_YFLAGS =-d${tab}
+END
+$AUTOMAKE baz/Makefile
+
+./configure
+
+$MAKE
+
+test -f foo/parse.c
+test -f foo/parse.h
+test -f bar/parse.c
+test -f bar/parse.h
+test -f baz/zardoz-parse.c
+test -f baz/zardoz-parse.h
+
+# The generated C and header files must be shipped.
+for dir in foo bar; do
+  cd $dir
+  $MAKE echo-distcom
+  $MAKE -s echo-distcom | grep '[ /]parse.c '
+  $MAKE -s echo-distcom | grep '[ /]parse.h '
+  cd ..
+done
+cd baz
+$MAKE echo-distcom
+$MAKE -s echo-distcom | grep '[ /]zardoz-parse.c '
+$MAKE -s echo-distcom | grep '[ /]zardoz-parse.h '
+cd ..
+
+$MAKE distdir
+ls -l $distdir
+test -f $distdir/foo/parse.c
+test -f $distdir/foo/parse.h
+test -f $distdir/bar/parse.c
+test -f $distdir/bar/parse.h
+test -f $distdir/baz/zardoz-parse.c
+test -f $distdir/baz/zardoz-parse.h
+
+# Sanity check on distribution.
+$MAKE distcheck
+
+# While we are at it, make sure that `parse.c' and `parse.h' are erased
+# by maintainer-clean, and not by distclean.
+$MAKE distclean
+test -f foo/parse.c
+test -f foo/parse.h
+test -f bar/parse.c
+test -f bar/parse.h
+test -f baz/zardoz-parse.c
+test -f baz/zardoz-parse.h
+./configure # We must re-create `Makefile'.
+$MAKE maintainer-clean
+test ! -f foo/parse.c
+test ! -f foo/parse.h
+test ! -f bar/parse.c
+test ! -f bar/parse.h
+test ! -f baz/zardoz-parse.c
+test ! -f baz/zardoz-parse.h
+
+:
diff --git a/tests/yacc-d-vpath.test b/tests/yacc-d-vpath.test
new file mode 100755
index 0000000..d51fb19
--- /dev/null
+++ b/tests/yacc-d-vpath.test
@@ -0,0 +1,112 @@
+#! /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/>.
+
+# This test checks that dependent files are updated before including
+# in the distribution. `parse.c' depends on `parse.y'. The later is
+# updated so that `parse.c' should be rebuild. Then we are running
+# `make' and `make distdir' and check whether the version of `parse.c'
+# to be distributed is up to date.
+
+# Please keep this in sync with sister test `yaccvapth.test'.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = parse.y foo.c
+AM_YFLAGS = -d
+END
+
+# Original parser, with `foobar'
+cat > parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token FOOBAR
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cat > foo.c << 'END'
+#include "parse.h"
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+$YACC -d parse.y
+mv y.tab.c parse.c
+mv y.tab.h parse.h
+# Sanity checks.
+grep foobar parse.c
+grep FOOBAR parse.h
+
+mkdir sub
+cd sub
+../configure
+
+$sleep
+
+# New parser, with `fubar'
+cat > ../parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token FUBAR
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+$MAKE
+$MAKE distdir
+$FGREP fubar $distdir/parse.c
+$FGREP FUBAR $distdir/parse.h
+
+# Now check to make sure that `make dist' will rebuild the parser.
+
+$sleep
+
+# New parser, with `maude'
+cat > ../parse.y << 'END'
+%{
+int yylex () {return 0;}
+void yyerror (char *s) {}
+%}
+%token MAUDE
+%%
+maude : 'm' 'a' 'u' 'd' 'e' {};
+END
+
+$MAKE distdir
+$FGREP maude $distdir/parse.c
+$FGREP MAUDE $distdir/parse.h
+
+:
diff --git a/tests/yacc-dist-nobuild.test b/tests/yacc-dist-nobuild.test
new file mode 100755
index 0000000..7813f75
--- /dev/null
+++ b/tests/yacc-dist-nobuild.test
@@ -0,0 +1,95 @@
+#! /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/>.
+
+# This test checks that dependent files are updated before including
+# in the distribution. `parse.c' depends on `parse.y'. The later is
+# updated so that `parse.c' should be rebuild. Then we are running
+# `make' and `make distdir' and check whether the version of `parse.c'
+# to be distributed is up to date.
+
+# Check that distributed Yacc-generated parsers are not uselessly
+# remade from an unpacked distributed tarball.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foobar zardoz
+foobar_SOURCES = parse.y main.c
+zardoz_SOURCES = $(foobar_SOURCES)
+zardoz_YFLAGS = -d
+END
+
+cat > parse.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) {}
+%}
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+cat > main.c << 'END'
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+
+$MAKE distdir
+chmod -R a-w $distdir
+
+mkdir bin
+cat > bin/yacc <<'END'
+#!/bin/sh
+echo "$0 invoked, shouldn't happen!" >&2
+exit 1
+END
+cp bin/yacc bin/bison
+chmod a+x bin/yacc bin/bison
+PATH=`pwd`/bin$PATH_SEPARATOR$PATH
+
+YACC=yacc BISON=bison
+export YACC BISON
+
+mkdir build
+cd build
+../$distdir/configure
+$MAKE
+
+# Sanity check.
+chmod u+w ../$distdir
+rm -f ../$distdir/parse.c
+chmod a-w ../$distdir
+$MAKE >out 2>&1 && { cat out;  Exit 1; }
+cat out
+$FGREP parse.c out
+
+:
diff --git a/tests/yacc-nodist.test b/tests/yacc-nodist.test
new file mode 100755
index 0000000..6634882
--- /dev/null
+++ b/tests/yacc-nodist.test
@@ -0,0 +1,103 @@
+#! /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/>.
+
+# Checks for .c and .h files derived from non-distributed .y sources.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_CONFIG_FILES([sub1/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+mv -f configure.in configure.stub
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub1 sub2
+.PHONY: test
+test-build: all
+       ls -l . sub1 sub2
+       test -f sub1/parse.y
+       test -f sub1/parse.c
+       test -f sub2/parse.y
+       test -f sub2/parse.c
+       test -f sub2/parse.h
+test-dist: distdir
+       ls -l $(distdir) $(distdir)/sub1 $(distdir)/sub2
+       test ! -r $(distdir)/sub1/parse.y
+       test ! -r $(distdir)/sub1/parse.c
+       test ! -r $(distdir)/sub1/parse.h
+       test ! -r $(distdir)/sub2/parse.y
+       test ! -r $(distdir)/sub2/parse.c
+       test ! -r $(distdir)/sub2/parse.h
+check-local: test-build test-dist
+END
+
+mkdir sub1 sub2
+
+cat > sub1/Makefile.am << 'END'
+parse.y:
+       rm -f $@ address@hidden
+       { : \
+         && echo "%{" \
+         && echo "int yylex () { return 0; }" \
+         && echo "void yyerror (char *s) {}" \
+         && echo "%}" \
+         && echo "%%" \
+         && echo "maude : 'm' 'a' 'u' 'd' 'e' {}"; \
+       } > address@hidden
+       chmod a-w address@hidden
+       mv -f address@hidden $@
+bin_PROGRAMS = prog
+prog_SOURCES = main.c
+nodist_prog_SOURCES = parse.y
+CLEANFILES = $(nodist_prog_SOURCES)
+END
+
+cat sub1/Makefile.am - > sub2/Makefile.am << 'END'
+AM_YFLAGS = -d
+BUILT_SOURCES = parse.h
+END
+
+cat > sub1/main.c << 'END'
+int main ()
+{
+  return yyparse ();
+}
+END
+cat - sub1/main.c > sub2/main.c << 'END'
+#include "parse.h"
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+$MAKE test-build
+$MAKE test-dist
+
+# But the distribution must work correctly, assuming the user has
+# the proper tools to process yacc files.
+$MAKE distcheck
+
+:
diff --git a/tests/yacc.test b/tests/yacc.test
deleted file mode 100755
index 13b7fe3..0000000
--- a/tests/yacc.test
+++ /dev/null
@@ -1,40 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1996, 2001, 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
-# 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 intermediate .c file is built from yacc source.
-# Bug from Thomas Morgan.
-
-. ./defs || Exit 1
-
-set -e
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-END
-
-cat > Makefile.am <<'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-$FGREP 'zardoz.c' Makefile.in
-
-:
diff --git a/tests/yacc2.test b/tests/yacc2.test
index f598595..4f98941 100755
--- a/tests/yacc2.test
+++ b/tests/yacc2.test
@@ -17,6 +17,7 @@
 
 # Test to make sure intermediate .h file is not generated nor removed
 # if (AM_)?YFLAGS do not contain -d.  Requested by Jim Meyering.
+# See also the related semantic test `yacc-d-basic.test'.
 
 . ./defs || Exit 1
 
diff --git a/tests/yacc3.test b/tests/yacc3.test
deleted file mode 100755
index 46f8d3e..0000000
--- a/tests/yacc3.test
+++ /dev/null
@@ -1,52 +0,0 @@
-#! /bin/sh
-# Copyright (C) 1999, 2001, 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
-# 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/>.
-
-# Ensure that generated .h file is distributed iff we have -d in
-# (AM_)?YFLAGS.
-
-. ./defs || Exit 1
-
-set -e
-
-cat >> configure.in << 'END'
-AC_PROG_CC
-AC_PROG_YACC
-END
-
-cat > Makefile.am <<'END'
-AUTOMAKE_OPTIONS = no-dependencies
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.y
-END
-
-$ACLOCAL
-$AUTOMAKE -a
-
-# It should not be disted here
-$FGREP 'zardoz.h' Makefile.in && Exit 1
-
-cp Makefile.am Makefile.sav
-# Test all available flags to make sure header is distributed with
-# `-d'.
-for flag in YFLAGS AM_YFLAGS zardoz_YFLAGS; do
-   cp Makefile.sav Makefile.am
-   echo "$flag = -d" >> Makefile.am
-   $AUTOMAKE -Wno-gnu
-   $FGREP 'zardoz.h' Makefile.in
-done
-
-:
diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test
index 7f44671..c4dc400 100755
--- a/tests/yaccvpath.test
+++ b/tests/yaccvpath.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 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
@@ -20,9 +21,9 @@
 # `make' and `make distdir' and check whether the version of `parse.c'
 # to be distributed is up to date.
 
-# Please keep this in sync with sister test `lexvapth.test'.
+# Please keep this in sync with sister test `yacc-d-vpath.test'.
 
-required='gcc bison'
+required=bison
 . ./defs || Exit 1
 
 set -e
@@ -65,8 +66,6 @@ mkdir sub
 cd sub
 ../configure
 
-# A delay is needed to make sure that the new parse.y is indeed newer
-# than parse.c, i.e. the they don't have the same timestamp.
 $sleep
 
 # New parser, with `fubar'
@@ -83,12 +82,8 @@ $MAKE
 $MAKE distdir
 $FGREP fubar $distdir/parse.c
 
-#
 # Now check to make sure that `make dist' will rebuild the parser.
-#
 
-# A delay is needed to make sure that the new parse.y is indeed newer
-# than parse.c, i.e. the they don't have the same timestamp.
 $sleep
 
 # New parser, with `maude'
-- 
1.7.2.3


reply via email to

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