From: Stefano Lattarini Date: Tue, 11 Jan 2011 19:03:05 +0000 (+0100) Subject: tests: do not force yacc-requiring tests to use bison X-Git-Tag: ylwrap-refactor-abandoned-branch~69 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8b419dd7b084dc4481ea7c581c7cd173cd1b7a0f;p=thirdparty%2Fautomake.git tests: do not force yacc-requiring tests to use bison * tests/defs.in: New required entry 'yacc'. Remove old required entry 'bison'. * tests/cond35.test ($required): Require yacc, not bison. * tests/cond36.test: Likewise. * tests/pr204.test: Likewise. * tests/silent-many-gcc.test: Likewise. * tests/silent-many-generic.test: Likewise. * tests/silent-yacc-gcc.test: Likewise. * tests/silent-yacc-generic.test: Likewise. * tests/subpkg.test: Likewise. * tests/suffix10.test: Likewise. * tests/yacc-basic.test: Likewise. * tests/yacc-clean.test: Likewise. * tests/yacc-d-basic.test: Likewise. * tests/yacc-d-vpath.test: Likewise. * tests/yacc-dist-nobuild.test: Likewise. * tests/yacc-nodist.test: Likewise. * tests/yacc4.test: Likewise. * tests/yacc6.test: Likewise. * tests/yacc7.test: Likewise. * tests/yacc8.test: Likewise. * tests/yaccdry.test: Likewise. * tests/yaccvpath.test: Likewise. --- diff --git a/ChangeLog b/ChangeLog index 90eb69ec2..430f6ea68 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,30 @@ +2011-01-11 Stefano Lattarini + + tests: do not force yacc-requiring tests to use bison + * tests/defs.in: New required entry 'yacc'. Remove old + required entry 'bison'. + * tests/cond35.test ($required): Require yacc, not bison. + * tests/cond36.test: Likewise. + * tests/pr204.test: Likewise. + * tests/silent-many-gcc.test: Likewise. + * tests/silent-many-generic.test: Likewise. + * tests/silent-yacc-gcc.test: Likewise. + * tests/silent-yacc-generic.test: Likewise. + * tests/subpkg.test: Likewise. + * tests/suffix10.test: Likewise. + * tests/yacc-basic.test: Likewise. + * tests/yacc-clean.test: Likewise. + * tests/yacc-d-basic.test: Likewise. + * tests/yacc-d-vpath.test: Likewise. + * tests/yacc-dist-nobuild.test: Likewise. + * tests/yacc-nodist.test: Likewise. + * tests/yacc4.test: Likewise. + * tests/yacc6.test: Likewise. + * tests/yacc7.test: Likewise. + * tests/yacc8.test: Likewise. + * tests/yaccdry.test: Likewise. + * tests/yaccvpath.test: Likewise. + 2011-01-10 Stefano Lattarini yacc: warn about conditional content in *YFLAGS variables diff --git a/tests/cond35.test b/tests/cond35.test index 0f3b8cf8c..34a7e7ff7 100755 --- a/tests/cond35.test +++ b/tests/cond35.test @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 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 @@ -17,7 +17,7 @@ # Check rules output for parser defined conditionally. # Report from Roman Fietze. -required='flex bison gcc' +required='flex yacc gcc' . ./defs || Exit 1 set -e diff --git a/tests/cond36.test b/tests/cond36.test index f6c97dbd6..d06ed87be 100755 --- a/tests/cond36.test +++ b/tests/cond36.test @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2004 Free Software Foundation, Inc. +# Copyright (C) 2004, 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 +16,7 @@ # Check rules output for parser defined conditionally. -required='flex bison gcc' +required='flex yacc gcc' . ./defs || Exit 1 set -e diff --git a/tests/defs.in b/tests/defs.in index ee19dbe9a..dfb5f2ef3 100644 --- a/tests/defs.in +++ b/tests/defs.in @@ -93,13 +93,6 @@ do # Check that each required tool is present. case $tool in :) ;; - bison) - # Since bison is required, we pick YACC for ./configure. - YACC='bison -y' - export YACC - echo "$me: running bison --version" - ( bison --version ) || exit 77 - ;; bzip2) # Do not use --version, bzip2 still tries to compress stdin. echo "$me: running bzip2 --help" @@ -216,6 +209,22 @@ do echo "$me: running texi2dvi -o /dev/null --version" ( texi2dvi -o /dev/null --version ) || exit 77 ;; + yacc) + if test x"$YACC" = x"no"; then + # The user has explicitly told he doesn't want a yacc program + # to be used. + echo "$me: \$YACC is \"no\", skipping test" >&2 + exit 77 + elif test -z "$YACC"; then + # The user hasn't explicitly specified any yacc program in the + # environment, so we try to use bison, skipping the test if it's + # not found. + YACC='bison -y' + export YACC + echo "$me: running bison --version" + bison --version || exit 77 + fi + ;; # Generic case: the tool must support --version. *) echo "$me: running $tool --version" diff --git a/tests/pr204.test b/tests/pr204.test index 22a1e54f5..c87f895a1 100755 --- a/tests/pr204.test +++ b/tests/pr204.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2004, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 @@ -17,7 +17,7 @@ # For PR 204. # Sources derived from nodist_ sources should not be distributed. -required='bison gcc' +required='yacc gcc' . ./defs || Exit 1 set -e diff --git a/tests/silent-many-gcc.test b/tests/silent-many-gcc.test index d770a467c..5e6d191ae 100755 --- a/tests/silent-many-gcc.test +++ b/tests/silent-many-gcc.test @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009, 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 @@ -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 bison' +required='gcc g++ gfortran flex yacc' . ./defs || Exit 1 set -e diff --git a/tests/silent-many-generic.test b/tests/silent-many-generic.test index 223a97c64..ed2744836 100755 --- a/tests/silent-many-generic.test +++ b/tests/silent-many-generic.test @@ -1,5 +1,5 @@ #!/bin/sh -# Copyright (C) 2009, 2010 Free Software Foundation, Inc. +# Copyright (C) 2009, 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 @@ -23,7 +23,7 @@ # and forces the use of gcc depmode. # FIXME: generic C++/Fortran compilers should suffice here -required='g++ gfortran flex bison' +required='g++ gfortran flex yacc' . ./defs || Exit 1 set -e diff --git a/tests/silent-yacc-gcc.test b/tests/silent-yacc-gcc.test index 33ae8aefc..83e6ebee2 100755 --- a/tests/silent-yacc-gcc.test +++ b/tests/silent-yacc-gcc.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 @@ -17,7 +17,7 @@ # Check silent-rules mode for Yacc, forcing gcc depmode. # Keep this in sync with sister test `silent-yacc-generic.test'. -required='gcc bison' +required='gcc yacc' . ./defs || Exit 1 set -e diff --git a/tests/silent-yacc-generic.test b/tests/silent-yacc-generic.test index b7489dac9..553e78bc5 100755 --- a/tests/silent-yacc-generic.test +++ b/tests/silent-yacc-generic.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 @@ -17,7 +17,7 @@ # Check silent-rules mode for Yacc. # Keep this in sync with sister test `silent-yacc-gcc.test'. -required='bison' +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/subpkg.test b/tests/subpkg.test index 366293726..0eea79dc3 100755 --- a/tests/subpkg.test +++ b/tests/subpkg.test @@ -1,5 +1,6 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc. +# Copyright (C) 2002, 2003, 2004, 2006, 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 @@ # Check subpackage handling. -required='gcc bison' +required='gcc yacc' . ./defs || Exit 1 set -e diff --git a/tests/suffix10.test b/tests/suffix10.test index 131359c8f..e24445561 100755 --- a/tests/suffix10.test +++ b/tests/suffix10.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 2002, 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 @@ -17,7 +17,7 @@ # Make sure that derivations work with .lo too. # (related to PR/37) -required='libtoolize bison' +required='libtoolize yacc' . ./defs || Exit 1 set -e diff --git a/tests/yacc-basic.test b/tests/yacc-basic.test index e8bf27d00..4faea9547 100755 --- a/tests/yacc-basic.test +++ b/tests/yacc-basic.test @@ -16,7 +16,7 @@ # Basic semantic checks on Yacc support. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc-clean.test b/tests/yacc-clean.test index d6a3fcaa8..c8e8863b9 100755 --- a/tests/yacc-clean.test +++ b/tests/yacc-clean.test @@ -18,7 +18,7 @@ # are cleaned by "make clean", while .c and .h files derived from # distributed .y sources are cleaned by "make maintainer-clean". -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc-d-basic.test b/tests/yacc-d-basic.test index f5f88d8af..11e5ba300 100755 --- a/tests/yacc-d-basic.test +++ b/tests/yacc-d-basic.test @@ -17,7 +17,7 @@ # Tests on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS # or maude_YFLAGS. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc-d-vpath.test b/tests/yacc-d-vpath.test index 0edaaa8a4..bb099904a 100755 --- a/tests/yacc-d-vpath.test +++ b/tests/yacc-d-vpath.test @@ -22,7 +22,7 @@ # Please keep this in sync with sister test `yaccvpath.test'. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc-dist-nobuild.test b/tests/yacc-dist-nobuild.test index a6444dea1..9061f579e 100755 --- a/tests/yacc-dist-nobuild.test +++ b/tests/yacc-dist-nobuild.test @@ -17,7 +17,7 @@ # Check that distributed Yacc-generated parsers are not uselessly # remade from an unpacked distributed tarball. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc-nodist.test b/tests/yacc-nodist.test index 2b4ce09a5..46b4167b2 100755 --- a/tests/yacc-nodist.test +++ b/tests/yacc-nodist.test @@ -16,7 +16,7 @@ # Checks for .c and .h files derived from non-distributed .y sources. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc4.test b/tests/yacc4.test index bb252908d..1d508edc0 100755 --- a/tests/yacc4.test +++ b/tests/yacc4.test @@ -1,5 +1,5 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2010 Free Software Foundation, Inc. +# Copyright (C) 2001, 2002, 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 +16,7 @@ # Some simple tests of ylwrap functionality. -required='bison gcc' +required='yacc gcc' . ./defs || Exit 1 set -e diff --git a/tests/yacc6.test b/tests/yacc6.test index b9b259bb3..bbb587e42 100755 --- a/tests/yacc6.test +++ b/tests/yacc6.test @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010 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 @@ -20,7 +20,7 @@ # Also make sure depcomp does not needlessly update headers. # Report from Paolo Bonzini. -required='gcc bison GNUmake' +required='gcc yacc GNUmake' . ./defs || Exit 1 set -e diff --git a/tests/yacc7.test b/tests/yacc7.test index 2b866bc9a..6d4815d78 100755 --- a/tests/yacc7.test +++ b/tests/yacc7.test @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation, -# Inc. +# Copyright (C) 2001, 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 @@ -21,7 +21,7 @@ # Also check that the sources of the generated parser are distributed. # PR/47. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yacc8.test b/tests/yacc8.test index 797f4e76a..a683c8d0e 100755 --- a/tests/yacc8.test +++ b/tests/yacc8.test @@ -1,6 +1,6 @@ #! /bin/sh -# Copyright (C) 2002, 2003, 2004, 2006, 2010 Free Software Foundation, -# Inc. +# Copyright (C) 2002, 2003, 2004, 2006, 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 @@ -17,7 +17,7 @@ # Test for subdir parsers. -required="gcc bison" +required="gcc yacc" . ./defs || Exit 1 diff --git a/tests/yaccdry.test b/tests/yaccdry.test index d2e763231..d30fb802e 100755 --- a/tests/yaccdry.test +++ b/tests/yaccdry.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 @@ -16,7 +16,7 @@ # Removal recovery rules for headers should not remove files with `make -n'. -required=bison +required=yacc . ./defs || Exit 1 set -e diff --git a/tests/yaccvpath.test b/tests/yaccvpath.test index c4dc400ca..52092fa2b 100755 --- a/tests/yaccvpath.test +++ b/tests/yaccvpath.test @@ -23,7 +23,7 @@ # Please keep this in sync with sister test `yacc-d-vpath.test'. -required=bison +required=yacc . ./defs || Exit 1 set -e