automake-patches
[Top][All Lists]
Advanced

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

[PATCH 2/6] New tests: Heirloom make and Lex/Yacc rules.


From: Stefano Lattarini
Subject: [PATCH 2/6] New tests: Heirloom make and Lex/Yacc rules.
Date: Thu, 20 May 2010 12:16:54 +0200
User-agent: KMail/1.12.1 (Linux/2.6.30-2-686; KDE/4.3.4; i686; ; )

Add a couple of tests exposing bugs in the Yacc/Lex support w.r.t.
Heirloom make.

---
* tests/lex6.test: New test (fails if $MAKE is Heirloom make).
* tests/yacc9.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
---
 ChangeLog         |    5 ++++
 tests/Makefile.am |    2 +
 tests/Makefile.in |    2 +
 tests/lex6.test   |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/yacc9.test  |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100755 tests/lex6.test
 create mode 100755 tests/yacc9.test

From 1e9f301ff810997b0ed766a490f2496a11c4da3f Mon Sep 17 00:00:00 2001
From: Stefano Lattarini <address@hidden>
Date: Sat, 24 Apr 2010 16:40:09 +0200
Subject: [PATCH 2/6] New tests: Heirloom make and Lex/Yacc rules.

* tests/lex6.test: New test (fails if $MAKE is Heirloom make).
* tests/yacc9.test: Likewise.
* tests/Makefile.am (TESTS): Updated.
---
 ChangeLog         |    5 ++++
 tests/Makefile.am |    2 +
 tests/Makefile.in |    2 +
 tests/lex6.test   |   54 +++++++++++++++++++++++++++++++++++++++++++++++++++
 tests/yacc9.test  |   56 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 5 files changed, 119 insertions(+), 0 deletions(-)
 create mode 100755 tests/lex6.test
 create mode 100755 tests/yacc9.test

diff --git a/ChangeLog b/ChangeLog
index a22c464..daaa3bc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2010-05-20  Stefano Lattarini  <address@hidden>
 
+       New tests: incompatibility of Heirloom make w.r.t. Lex/Yacc rules.
+       * tests/lex6.test: New test (fails if $MAKE is Heirloom make).
+       * tests/yacc9.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
        Extend, fix and improve tests on Lex and Yacc support.
        * tests/lexcpp.test: New test script.
        * tests/lexvpath.test: Likewise.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 24aff4d..f97752b 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -403,6 +403,7 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lex6.test \
 lexcpp.test \
 lexvpath.test \
 libexec.test \
@@ -779,6 +780,7 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yacc9.test \
 yaccpp.test \
 yaccvpath.test \
 $(parallel_tests)
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 983a116..4fbbbca 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -644,6 +644,7 @@ lex2.test \
 lex3.test \
 lex4.test \
 lex5.test \
+lex6.test \
 lexcpp.test \
 lexvpath.test \
 libexec.test \
@@ -1020,6 +1021,7 @@ yacc5.test \
 yacc6.test \
 yacc7.test \
 yacc8.test \
+yacc9.test \
 yaccpp.test \
 yaccvpath.test \
 $(parallel_tests)
diff --git a/tests/lex6.test b/tests/lex6.test
new file mode 100755
index 0000000..0c13535
--- /dev/null
+++ b/tests/lex6.test
@@ -0,0 +1,54 @@
+#! /bin/sh
+# Copyright (C) 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 that make uses our .l => .c => .o rule chain rather than a
+# built-in .l => .o rule.
+# Please keep this in sync with the sister test yacc9.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >ylwrap <<END
+#!/bin/sh
+echo 'main() { /*GrepMe*/ }' >foo.c
+END
+chmod a+x ylwrap
+
+cat >> configure.in <<END
+AC_PROG_CC
+AC_SUBST([LEX], [false]) # should never be run
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.l
+END
+
+: > foo.l
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE >out 2>&1 || { cat out; Exit 1; }
+cat out
+
+test -f foo.c
+
+$FGREP '/*GrepMe*/' foo.c
diff --git a/tests/yacc9.test b/tests/yacc9.test
new file mode 100755
index 0000000..6e0ed96
--- /dev/null
+++ b/tests/yacc9.test
@@ -0,0 +1,56 @@
+#! /bin/sh
+# Copyright (C) 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 that make uses our .y => .c => .o rule chain rather than a
+# built-in .y => .o rule.
+# Please keep this in sync with the sister test lex6.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >ylwrap <<END
+#!/bin/sh
+echo 'main() { /*GrepMe*/ }' >foo.c
+END
+chmod a+x ylwrap
+
+cat >> configure.in <<END
+AC_PROG_CC
+AC_SUBST([YACC], [false]) # should never be run
+AC_OUTPUT
+END
+
+cat > Makefile.am <<END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.y
+END
+
+: > foo.y
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE >out 2>&1 || { cat out; Exit 1; }
+cat out
+
+test -f foo.c
+
+$FGREP '/*GrepMe*/' foo.c
+
+:
-- 
1.6.5


reply via email to

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