[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-3
From: |
Stefano Lattarini |
Subject: |
[Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-363-g395e5ab |
Date: |
Tue, 12 Apr 2011 14:00:36 +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=395e5abd368bba4ecd6a1934ad5ceeebc73ba4b3
The branch, yacc-work has been updated
via 395e5abd368bba4ecd6a1934ad5ceeebc73ba4b3 (commit)
from 7ad822a39190682bc159c2f9c21c25a4273d037c (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 395e5abd368bba4ecd6a1934ad5ceeebc73ba4b3
Author: Stefano Lattarini <address@hidden>
Date: Tue Jan 4 23:54:50 2011 +0100
yacc: add some tests on bison support (still xfailing)
Related to automake bug#7648 and PR automake/491.
* tests/bison-skeleton-cxx.test: New test.
* tests/bison-skeleton.test: New test.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 8 ++
tests/Makefile.am | 4 +
tests/Makefile.in | 4 +
tests/yacc-bison-skeleton-cxx.test | 100 ++++++++++++++++++++++
tests/{yaccdry.test => yacc-bison-skeleton.test} | 50 +++++++----
5 files changed, 148 insertions(+), 18 deletions(-)
create mode 100755 tests/yacc-bison-skeleton-cxx.test
copy tests/{yaccdry.test => yacc-bison-skeleton.test} (55%)
diff --git a/ChangeLog b/ChangeLog
index d1ebf21..120e385 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,13 @@
2011-04-12 Stefano Lattarini <address@hidden>
+ yacc: add some tests on bison support (still xfailing)
+ Related to automake bug#7648 and PR automake/491.
+ * tests/bison-skeleton-cxx.test: New test.
+ * tests/bison-skeleton.test: New test.
+ * tests/Makefile.am (TESTS, XFAIL_TESTS): Updated.
+
+2011-04-12 Stefano Lattarini <address@hidden>
+
coverage: test for automake bug#8485 (known regression)
* tests/yacc-dist-nobuild-subdir.test: New test.
* tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 3191922..dddf361 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -19,6 +19,8 @@
XFAIL_TESTS = \
all.test \
auxdir2.test \
+yacc-bison-skeleton-cxx.test \
+yacc-bison-skeleton.test \
cond17.test \
gcj6.test \
pr8365-remake-timing.test \
@@ -835,6 +837,8 @@ yacc6.test \
yacc7.test \
yacc8.test \
yaccdry.test \
+yacc-bison-skeleton-cxx.test \
+yacc-bison-skeleton.test \
yacc-deleted-headers.test \
yacc-dist-nobuild.test \
yacc-dist-nobuild-subdir.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index f06f1f7..3132014 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -275,6 +275,8 @@ top_srcdir = @top_srcdir@
XFAIL_TESTS = \
all.test \
auxdir2.test \
+yacc-bison-skeleton-cxx.test \
+yacc-bison-skeleton.test \
cond17.test \
gcj6.test \
pr8365-remake-timing.test \
@@ -1105,6 +1107,8 @@ yacc6.test \
yacc7.test \
yacc8.test \
yaccdry.test \
+yacc-bison-skeleton-cxx.test \
+yacc-bison-skeleton.test \
yacc-deleted-headers.test \
yacc-dist-nobuild.test \
yacc-dist-nobuild-subdir.test \
diff --git a/tests/yacc-bison-skeleton-cxx.test
b/tests/yacc-bison-skeleton-cxx.test
new file mode 100755
index 0000000..b080441
--- /dev/null
+++ b/tests/yacc-bison-skeleton-cxx.test
@@ -0,0 +1,100 @@
+#! /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/>.
+
+# Test to make sure bison + bison's C++ skeleton + C++ works.
+# For Automake bug#7648 and PR automake/491.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.yy foo.cc
+
+# This is required even with %defines in zardoz.yy.
+AM_YFLAGS = -d
+
+BUILT_SOURCES = zardoz.hh
+EXTRA_DIST = stack.hh location.hh position.hh
+END
+
+cat > zardoz.yy << 'END'
+%skeleton "lalr1.cc"
+%defines
+
+%{
+#define YYSTYPE int
+int yylex(YYSTYPE* yylval_param);
+%}
+
+%%
+start : /* empty */
+%%
+
+int
+yylex(YYSTYPE*)
+{
+ return 0;
+}
+
+void
+yy::parser::error(const yy::parser::location_type&, const std::string& m)
+{
+ return;
+}
+END
+
+cat > foo.cc << 'END'
+#include "zardoz.hh"
+
+using namespace std;
+
+int
+main(int argc, char** argv)
+{
+ yy::parser my_parser;
+ return my_parser.parse ();
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+# Try a VPATH build first.
+mkdir build
+cd build
+../configure YACC='bison -y'
+$MAKE
+cd ..
+
+# Now try an in-tree build.
+./configure YACC='bison -y'
+$MAKE
+
+# Check that distribution is self-contained, and do not require
+# bison to be built.
+env YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE -e distcheck
+
+:
diff --git a/tests/yaccdry.test b/tests/yacc-bison-skeleton.test
similarity index 55%
copy from tests/yaccdry.test
copy to tests/yacc-bison-skeleton.test
index 3ad4f75..cc89a3d 100755
--- a/tests/yaccdry.test
+++ b/tests/yacc-bison-skeleton.test
@@ -1,5 +1,5 @@
#! /bin/sh
-# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
+# 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
@@ -14,9 +14,10 @@
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Removal recovery rules for headers should not remove files with `make -n'.
+# Test to make sure bison + bison's skeleton works.
+# For Automake bug#7648 and PR automake/491.
-required=yacc
+required=bison
. ./defs || Exit 1
set -e
@@ -28,33 +29,46 @@ AC_OUTPUT
END
cat > Makefile.am << 'END'
-AM_YFLAGS = -d
-bin_PROGRAMS = foo
-foo_SOURCES = foo.c parse.y
+bin_PROGRAMS = zardoz
+zardoz_SOURCES = zardoz.y foo.c
+AM_YFLAGS = -d --skeleton glr.c
END
-cat > foo.c << 'END'
-int main () { return 0; }
-END
-
-cat > parse.y << 'END'
+# Parser.
+cat > zardoz.y << 'END'
%{
int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (const char *s) { return; }
%}
%%
foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
END
+cat > foo.c << 'END'
+#include "zardoz.h"
+int main (void)
+{
+ return yyparse ();
+}
+END
+
$ACLOCAL
-$AUTOMAKE --add-missing
$AUTOCONF
-./configure
+$AUTOMAKE -a
+
+# Try a VPATH build first.
+mkdir build
+cd build
+../configure YACC='bison -y'
+$MAKE
+cd ..
+
+# Now try an in-tree build.
+./configure YACC='bison -y'
$MAKE
-rm -f parse.h
-$MAKE -n parse.h
-test -f parse.c
-test ! -f parse.h
+# Check that distribution is self-contained, and do not require
+# bison to be built.
+env YACC=false DISTCHECK_CONFIGURE_FLAGS='YACC=false' $MAKE -e distcheck
:
hooks/post-receive
--
GNU Automake
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-363-g395e5ab,
Stefano Lattarini <=