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-3


From: Stefano Lattarini
Subject: [Automake-commit] [SCM] GNU Automake branch, yacc-work, updated. v1.11-369-g87918bb
Date: Fri, 15 Apr 2011 12:24:04 +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=87918bb4fd5b4a9d93e710454525300f372c9057

The branch, yacc-work has been updated
       via  87918bb4fd5b4a9d93e710454525300f372c9057 (commit)
       via  21e109d87e24c23dc88f39294a8fb0f83151f192 (commit)
       via  f02ce8d9f9c1c287915a8acef067cc2e30875b05 (commit)
       via  7c0d9cbbffbbe11bf1d863b7fe2c63cd6e86b584 (commit)
      from  69513875e7847a5b6b89ffb58721daee9a49f06b (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 87918bb4fd5b4a9d93e710454525300f372c9057
Merge: 21e109d 7c0d9cb
Author: Stefano Lattarini <address@hidden>
Date:   Fri Apr 15 14:19:44 2011 +0200

    Merge branch 'yl-test-yacc6-split' into yacc-work

commit 21e109d87e24c23dc88f39294a8fb0f83151f192
Merge: 6951387 f02ce8d
Author: Stefano Lattarini <address@hidden>
Date:   Fri Apr 15 13:46:13 2011 +0200

    Merge branch 'yl-tests-trim-requirements' into yacc-work

commit f02ce8d9f9c1c287915a8acef067cc2e30875b05
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 11 15:15:55 2011 +0200

    tests: do not uselessly require GNU make or gcc in a few tests
    
    * tests/lex3.test: Remove gcc from requirements, as any working C
    compiler should be ok.  Consequently, do not clobber user CFLAGS.
    Also, remove GNUmake from requirements; it was added (see commit
    `Release-1-8-103-g0d2f592') because this test fails with FreeBSD
    make due to VPATH issues -- but so do many other yacc-related and
    lex-related tests currently, and requiring GNU make in all of
    them would unacceptably reduce coverage.
    * tests/lexvpath.test: Remove gcc from requirements, as any
    working C compiler should be ok.
    * tests/yacc4.test: Likewise.
    * tests/yacc8.test: Likewise.
    * tests/lex5.test: Likewise.  Also, do not require anymore GNU
    make; to compensate, explicitly call "$MAKE Makefile" to update
    the out-of-date Makefile if $MAKE is not GNU make.

commit 7c0d9cbbffbbe11bf1d863b7fe2c63cd6e86b584
Author: Stefano Lattarini <address@hidden>
Date:   Mon Apr 11 16:35:59 2011 +0200

    tests: split yacc6.test, for better separation and coverage
    
    * tests/yacc6.test: Test removed, its content extended and split
    into ...
    * tests/yacc-auxdir.test, tests/yacc-depend.test,
    tests/yacc-line.test: ... these new tests.
    * tests/yacc-depend2.test: New test, exposes the failure that
    FreeBSD used to encounter in yacc6.test.
    * tests/Makefile.am (TESTS): Update.

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

Summary of changes:
 ChangeLog                                          |   29 +++++
 tests/Makefile.am                                  |    5 +-
 tests/Makefile.in                                  |    5 +-
 tests/lex3.test                                    |    6 +-
 tests/lex5.test                                    |    3 +-
 tests/lexvpath.test                                |    2 +-
 tests/{yacc6.test => yacc-auxdir.test}             |   74 ++-----------
 tests/{yacc-dist-nobuild.test => yacc-depend.test} |   74 ++++++-------
 tests/yacc-depend2.test                            |   89 ++++++++++++++++
 tests/yacc-line.test                               |  111 ++++++++++++++++++++
 tests/yacc4.test                                   |    6 +-
 tests/yacc8.test                                   |    2 +-
 12 files changed, 292 insertions(+), 114 deletions(-)
 rename tests/{yacc6.test => yacc-auxdir.test} (51%)
 copy tests/{yacc-dist-nobuild.test => yacc-depend.test} (50%)
 create mode 100755 tests/yacc-depend2.test
 create mode 100755 tests/yacc-line.test

diff --git a/ChangeLog b/ChangeLog
index 6e522d8..eb0b4c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,32 @@
+2011-04-11  Stefano Lattarini  <address@hidden>
+
+       tests: split yacc6.test, for better separation and coverage
+       * tests/yacc6.test: Test removed, its content extended and split
+       into ...
+       * tests/yacc-auxdir.test, tests/yacc-depend.test,
+       tests/yacc-line.test: ... these new tests.
+       * tests/yacc-depend2.test: New test, exposes the failure that
+       FreeBSD used to encounter in yacc6.test.
+       * tests/Makefile.am (TESTS): Update.
+
+2011-04-11  Stefano Lattarini  <address@hidden>
+
+       tests: do not uselessly require GNU make or gcc in a few tests
+       * tests/lex3.test: Remove gcc from requirements, as any working C
+       compiler should be ok.  Consequently, do not clobber user CFLAGS.
+       Also, remove GNUmake from requirements; it was added (see commit
+       `Release-1-8-103-g0d2f592') because this test fails with FreeBSD
+       make due to VPATH issues -- but so do many other yacc-related and
+       lex-related tests currently, and requiring GNU make in all of
+       them would unacceptably reduce coverage.
+       * tests/lexvpath.test: Remove gcc from requirements, as any
+       working C compiler should be ok.
+       * tests/yacc4.test: Likewise.
+       * tests/yacc8.test: Likewise.
+       * tests/lex5.test: Likewise.  Also, do not require anymore GNU
+       make; to compensate, explicitly call "$MAKE Makefile" to update
+       the out-of-date Makefile if $MAKE is not GNU make.
+
 2011-04-12  Stefano Lattarini  <address@hidden>
 
        tests: fix spurious failure in test 'yacc-d-cxx.test'
diff --git a/tests/Makefile.am b/tests/Makefile.am
index dddf361..2c99c97 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -833,12 +833,15 @@ yacc.test \
 yacc2.test \
 yacc4.test \
 yacc5.test \
-yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-auxdir.test \
 yacc-bison-skeleton-cxx.test \
 yacc-bison-skeleton.test \
+yacc-line.test \
+yacc-depend.test \
+yacc-depend2.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 3132014..0a6e30f 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1103,12 +1103,15 @@ yacc.test \
 yacc2.test \
 yacc4.test \
 yacc5.test \
-yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccdry.test \
+yacc-auxdir.test \
 yacc-bison-skeleton-cxx.test \
 yacc-bison-skeleton.test \
+yacc-line.test \
+yacc-depend.test \
+yacc-depend2.test \
 yacc-deleted-headers.test \
 yacc-dist-nobuild.test \
 yacc-dist-nobuild-subdir.test \
diff --git a/tests/lex3.test b/tests/lex3.test
index 536239b..7509d52 100755
--- a/tests/lex3.test
+++ b/tests/lex3.test
@@ -19,15 +19,11 @@
 # Test associated with PR 19.
 # From Matthew D. Langston.
 
-required='gcc lex GNUmake'
+required=lex
 . ./defs || Exit 1
 
 set -e
 
-# Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
-
 distdir=$me-1.0
 
 cat >> configure.in << 'END'
diff --git a/tests/lex5.test b/tests/lex5.test
index f3ddccc..12d9f00 100755
--- a/tests/lex5.test
+++ b/tests/lex5.test
@@ -17,7 +17,7 @@
 
 # Test for subdir lexers.
 
-required='gcc GNUmake lex'
+required=lex
 . ./defs || Exit 1
 
 set -e
@@ -87,6 +87,7 @@ $AUTOMAKE -a --no-force
 test -f ./ylwrap
 
 cd sub
+using_gnumake || $MAKE Makefile
 $MAKE foo/foo2.o
 test -f foo/foo2.c
 test -f foo/foo2.o
diff --git a/tests/lexvpath.test b/tests/lexvpath.test
index 54a517a..12f9ca6 100755
--- a/tests/lexvpath.test
+++ b/tests/lexvpath.test
@@ -22,7 +22,7 @@
 
 # Please keep this in sync with sister test `yaccvapth.test'.
 
-required='gcc lex'
+required=lex
 . ./defs || Exit 1
 
 set -e
diff --git a/tests/yacc6.test b/tests/yacc-auxdir.test
similarity index 51%
rename from tests/yacc6.test
rename to tests/yacc-auxdir.test
index bbb587e..973a338 100755
--- a/tests/yacc6.test
+++ b/tests/yacc-auxdir.test
@@ -15,96 +15,46 @@
 # 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.
+# Test to make sure ylwrap is put in right location.
 # Report from Tim Van Holder.
-# Also make sure depcomp does not needlessly update headers.
-# Report from Paolo Bonzini.
 
-required='gcc yacc GNUmake'
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT([yacc6], [1.0])
-# `aux' is not an acceptable file/directory name on Windows systems
+mkdir aux1 sub
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+# 'aux' is not an acceptable file/directory name on Windows systems
 AC_CONFIG_AUX_DIR([aux1])
 AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile sub/Makefile])
 AC_PROG_CC
-AM_PROG_CC_C_O
 AC_PROG_YACC
-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)
+bin_PROGRAMS = foo
+AM_YFLAGS = -d
+foo_SOURCES = foo.y
 END
 
-mkdir aux1 sub
-
 cat > sub/Makefile.am << 'END'
-bin_PROGRAMS = foo bar
+bin_PROGRAMS = 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
+grep -i 'ylwrap' Makefile.in sub/Makefile.in # For debugging.
+$FGREP '$(top_srcdir)/aux1/ylwrap' Makefile.in
 $FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in
-./configure
-$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/yacc-dist-nobuild.test b/tests/yacc-depend.test
similarity index 50%
copy from tests/yacc-dist-nobuild.test
copy to tests/yacc-depend.test
index 9061f57..2f708ec 100755
--- a/tests/yacc-dist-nobuild.test
+++ b/tests/yacc-depend.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2011 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 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
@@ -14,16 +15,14 @@
 # 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 distributed Yacc-generated parsers are not uselessly
-# remade from an unpacked distributed tarball.
+# Make sure depcomp does not needlessly update headers for yacc rules.
+# Report from Paolo Bonzini.
 
 required=yacc
 . ./defs || Exit 1
 
 set -e
 
-distdir=$me-1.0
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_YACC
@@ -31,59 +30,56 @@ AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-bin_PROGRAMS = foobar zardoz
-foobar_SOURCES = parse.y main.c
-zardoz_SOURCES = $(foobar_SOURCES)
-zardoz_YFLAGS = -d
+bin_PROGRAMS = foo
+AM_YFLAGS = -d
+foo_SOURCES = foo.y main.c
+BUILT_SOURCES = foo.h
 END
 
-cat > parse.y << 'END'
+cat > foo.y << 'END'
 %{
 int yylex () { return 0; }
-void yyerror (char *s) {}
+void yyerror (char *s) { return; }
 %}
+%token TOKEN
 %%
 foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
 END
 
+
 cat > main.c << 'END'
-int main () { return 0; }
+#include "foo.h"
+int main(void)
+{
+  return yyparse ();
+}
 END
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
+# Try to enable dependency tracking if possible, even if that means
+# using slow dependency extractors.
+./configure --enable-dependency-tracking
 $MAKE
+ls -l # For debugging.
 
-$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 sure foo.h is not updated if not really needed.
+$sleep
+: > my-timestamp
+$sleep
+touch foo.y
 $MAKE
+stat my-timestamp foo.* || : # For debugging.
+is_newest my-timestamp foo.h
 
-# 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
+# Make sure foo.h is updated if needed.
+$sleep
+sed 's/TOKEN/TEKON/g' foo.y > t
+mv -f t foo.y
+$MAKE
+stat my-timestamp foo.* || : # For debugging.
+is_newest foo.h my-timestamp
 
 :
diff --git a/tests/yacc-depend2.test b/tests/yacc-depend2.test
new file mode 100755
index 0000000..51c1fe1
--- /dev/null
+++ b/tests/yacc-depend2.test
@@ -0,0 +1,89 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 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/>.
+
+# Make sure depcomp does not needlessly update headers and objects
+# for yacc rules.  This test still fails with FreeBSD make (but passes
+# with NetBSD make).
+
+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 = foo
+AM_YFLAGS = -d
+foo_SOURCES = foo.y main.c
+BUILT_SOURCES = foo.h
+.PHONY: debug-info test-time-unchanged test-time-changed
+debug-info:
+       ls -l
+       stat *.[ch] *.$(OBJEXT) my-timestamp || :
+test-time-unchanged: debug-info
+       test `ls -1t main.$(OBJEXT) my-timestamp | sed 1q` = my-timestamp
+test-time-changed: debug-info
+       test `ls -1t main.$(OBJEXT) my-timestamp | sed 1q` = main.$(OBJEXT)
+END
+
+cat > foo.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+%}
+%token TOKEN
+%%
+foobar : 'f' 'o' 'o' 'b' 'a' 'r' {};
+END
+
+
+cat > main.c << 'END'
+#include "foo.h"
+int main(void)
+{
+  return yyparse ();
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+# Try to enable dependency tracking if possible, even if that means
+# using slow dependency extractors.
+./configure --enable-dependency-tracking
+$MAKE
+ls -l # For debugging.
+
+$sleep
+: > my-timestamp
+$sleep
+touch foo.y
+$MAKE
+$MAKE test-time-unchanged
+$sleep
+sed 's/TOKEN/TEKON/g' foo.y > t
+mv -f t foo.y
+$MAKE
+$MAKE test-time-changed
+
+:
diff --git a/tests/yacc-line.test b/tests/yacc-line.test
new file mode 100755
index 0000000..ae6dbcf
--- /dev/null
+++ b/tests/yacc-line.test
@@ -0,0 +1,111 @@
+#! /bin/sh
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 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 that automake yacc support ensures that yacc-generated C
+# files use correct "#line" directives.  Try also with the
+# `subdir-object' option enabled.
+
+required=yacc
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+mkdir dir sub sub/dir
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+bin_PROGRAMS = foo bar
+AM_YFLAGS = -d
+bar_YFLAGS =
+foo_SOURCES = zardoz.y
+bar_SOURCES = dir/quux.y
+## Avoid spurious failures with Solaris make.
address@hidden@: zardoz.c
address@hidden@: bar-quux.c
+END
+
+cat > sub/Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_PROGRAMS = foo bar
+foo_YFLAGS = -d
+foo_SOURCES = zardoz.y
+bar_SOURCES = dir/quux.y
+## Avoid spurious failures with Solaris make.
address@hidden@: foo-zardoz.c
+dir/address@hidden@: dir/quux.c
+END
+
+cat > zardoz.y << 'END'
+%{
+int yylex () { return 0; }
+void yyerror (char *s) { return; }
+%}
+%%
+x : 'x' {};
+%%
+int main(void)
+{
+  return yyparse ();
+}
+END
+
+cp zardoz.y dir/quux.y
+cp zardoz.y sub/zardoz.y
+cp zardoz.y sub/dir/quux.y
+
+c_outputs='zardoz.c bar-quux.c sub/foo-zardoz.c sub/dir/quux.c'
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+for vpath in : false; do
+
+  if $vpath; then
+    srcdir=..
+    mkdir build
+    cd build
+  else
+    srcdir=.
+  fi
+
+  $srcdir/configure
+  $MAKE
+
+  # For debugging,
+  ls -l . sub sub/dir
+  $FGREP '.y' $c_outputs
+
+  $EGREP '#.*line.*(build|\.\.).*\.y' $c_outputs && Exit 1
+  # Don't be excessively strict in grepping, to avoid spurious failures.
+  grep '#.*line.*zardoz\.y' zardoz.c
+  grep '#.*line.*quux\.y' bar-quux.c
+  grep '#.*line.*zardoz\.y' sub/foo-zardoz.c
+  grep '#.*line.*quux\.y' sub/dir/quux.c
+  cd $srcdir
+
+done
+
+:
diff --git a/tests/yacc4.test b/tests/yacc4.test
index 1d508ed..87a5157 100755
--- a/tests/yacc4.test
+++ b/tests/yacc4.test
@@ -16,7 +16,7 @@
 
 # Some simple tests of ylwrap functionality.
 
-required='yacc gcc'
+required=yacc
 . ./defs || Exit 1
 
 set -e
@@ -36,7 +36,7 @@ END
 # First parser.
 cat > parse.y << 'END'
 %{
-int yylex () {return 0;}
+int yylex () { return 0; }
 void yyerror (char *s) {}
 %}
 %%
@@ -46,7 +46,7 @@ END
 # Second parser.
 cat > bar.y << 'END'
 %{
-int yylex () {return 0;}
+int yylex () { return 0; }
 void yyerror (char *s) {}
 %}
 %%
diff --git a/tests/yacc8.test b/tests/yacc8.test
index ca1ac68..158e64f 100755
--- a/tests/yacc8.test
+++ b/tests/yacc8.test
@@ -17,7 +17,7 @@
 
 # Test for subdir parsers.
 
-required="gcc yacc"
+required=yacc
 
 . ./defs || Exit 1
 


hooks/post-receive
-- 
GNU Automake



reply via email to

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