]> git.saurik.com Git - bison.git/commitdiff
Merge remote-tracking branch 'origin/maint'
authorAkim Demaille <akim@lrde.epita.fr>
Thu, 19 Jul 2012 15:32:01 +0000 (17:32 +0200)
committerAkim Demaille <akim@lrde.epita.fr>
Thu, 19 Jul 2012 15:39:13 +0000 (17:39 +0200)
* origin/maint:
  maint: update gnu-web-doc-update.
  maint: post-release administrivia
  version 2.6
  maint: prepare for release 2.6
  maint: post-release administrivia
  version 2.5.91
  maint: prepare NEWS.
  maint: fix spaces.
  tests: adjust to case where the C compiler is actually a C++ compiler
  tests: fix dependencies
  doc: fix Texinfo command
  maint: Valgrind on OS X.
  tests: be sure that backups are safe.
  maint: dead comment.
  tests: refactor for legibility.
  tests: refactor the bison invocations.
  maint: fix syntax-check ignore patterns.
  gnulib: update
  gnulib: update.
  gnulib: update

Conflicts:
build-aux/Makefile.am
cfg.mk
tests/Makefile.am

13 files changed:
1  2 
Makefile.am
NEWS
README-hacking
bootstrap
build-aux/local.mk
cfg.mk
configure.ac
doc/bison.texi
m4/.gitignore
tests/atlocal.in
tests/headers.at
tests/local.at
tests/local.mk

diff --cc Makefile.am
Simple merge
diff --cc NEWS
index 0552ba212a001a5e30d8b8a479b674c0074010e5,be9ed7ca11cfdff9832721e78c232caaa7a82308..8db03d609b02b7fb9d610c871be11ed4aa1419f4
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
@@@ -2,129 -2,10 +2,129 @@@ GNU Bison NEW
  
  * Noteworthy changes in release ?.? (????-??-??) [?]
  
 +** Warnings
 +
 +*** Warning categories are now displayed in warnings
 +
 +  For instance:
 +
 +  foo.y:4.6: warning: type clash on default action: <foo> != <bar> [-Wother]
 +
 +*** Useless semantic types
 +
 +  Bison now warns about useless (uninhabited) semantic types.  Since
 +  semantic types are not declared to Bison (they are defined in the opaque
 +  %union structure), it is %printer/%destructor directives about useless
 +  types that trigger the warning:
 +
 +    %token <type1> term
 +    %type  <type2> nterm
 +    %printer    {} <type1> <type3>
 +    %destructor {} <type2> <type4>
 +    %%
 +    nterm: term { $$ = $1; };
 +
 +    3.28-34: warning: type <type3> is used, but is not associated to any symbol
 +    4.28-34: warning: type <type4> is used, but is not associated to any symbol
 +
 +*** Undeclared symbols
 +
 +  Bison used to raise an error for %printer and %destructor directives for
 +  undefined symbols.
 +
 +    %printer    {} symbol1
 +    %destructor {} symbol2
 +    %%
 +    exp: "a";
 +
 +  This is now only a warning.
 +
 +*** Useless destructors or printers
 +
 +  Bison now warns about useless destructors or printers.  In the following
 +  example, the printer for <type1>, and the destructor for <type2> are
 +  useless: all symbols of <type1> (token1) already have a printer, and all
 +  symbols of type <type2> (token2) already have a destructor.
 +
 +    %token <type1> token1
 +           <type2> token2
 +           <type3> token3
 +           <type4> token4
 +    %printer    {} token1 <type1> <type3>
 +    %destructor {} token2 <type2> <type4>
 +
 +** Additional yylex/yyparse arguments
 +
 +  The new directive %param declares additional arguments to both yylex and
 +  yyparse.  The %lex-param, %parse-param, and %param directives support one
 +  or more arguments.  Instead of
 +
 +    %lex-param   {arg1_type *arg1}
 +    %lex-param   {arg2_type *arg2}
 +    %parse-param {arg1_type *arg1}
 +    %parse-param {arg2_type *arg2}
 +
 +  one may now declare
 +
 +    %param {arg1_type *arg1} {arg2_type *arg2}
 +
 +** Java skeleton improvements
 +
 +  The constants for token names were moved to the Lexer interface.
 +  Also, it is possible to add code to the parser's constructors using
 +  "%code init" and "%define init_throws".
 +
 +** C++ skeleton improvements
 +
 +  The C++ parser features a syntax_error exception, which can be
 +  thrown from the scanner or from user rules to raise syntax errors.
 +  This facilitates reporting errors caught in sub-functions (e.g.,
 +  rejecting too large integral literals from a conversion function
 +  used by the scanner, or rejecting invalid combinations from a
 +  factory invoked by the user actions).
 +
 +** Variable api.tokens.prefix
 +
 +  The variable api.tokens.prefix changes the way tokens are identified in
 +  the generated files.  This is especially useful to avoid collisions
 +  with identifiers in the target language.  For instance
 +
 +    %token FILE for ERROR
 +    %define api.tokens.prefix "TOK_"
 +    %%
 +    start: FILE for ERROR;
 +
 +  will generate the definition of the symbols TOK_FILE, TOK_for, and
 +  TOK_ERROR in the generated sources.  In particular, the scanner must
 +  use these prefixed token names, although the grammar itself still
 +  uses the short names (as in the sample rule given above).
 +
 +** Variable api.namespace
 +
 +  The "namespace" variable is renamed "api.namespace".  Backward
 +  compatibility is ensured, but upgrading is recommended.
 +
 +** Variable parse.error
 +
 +  The variable error controls the verbosity of error messages.  The
 +  use of the %error-verbose directive is deprecated in favor of
 +  %define parse.error "verbose".
 +
 +** Semantic predicates
 +
 +  The new, experimental, semantic-predicate feature allows actions of
 +  the form %?{ BOOLEAN-EXPRESSION }, which cause syntax errors (as for
 +  YYERROR) if the expression evaluates to 0, and are evaluated immediately
 +  in GLR parsers, rather than being deferred.  The result is that they
 +  allow the programmer to prune possible parses based on the values of
 +  run-time expressions.
 +
 +* Noteworthy changes in release ?.? (????-??-??) [?]
 +
  
- * Noteworthy changes in release 2.5.90 (2012-07-05) [beta]
+ * Noteworthy changes in release 2.6 (2012-07-19) [stable]
  
 -** Future Changes
 +** Future changes:
  
    The next major release of Bison will drop support for the following
    deprecated features.  Please report disagreements to bug-bison@gnu.org.
diff --cc README-hacking
Simple merge
diff --cc bootstrap
index e9849102d8777bcbb19f2d37d386ce0ba45f7466,e00c8bbba0aea75d1e629930231a65be3da31c87..e3e270b007f658edd2ca3ec6aa590ecf14f29c27
+++ b/bootstrap
@@@ -1,6 -1,6 +1,6 @@@
  #! /bin/sh
  # Print a version string.
- scriptversion=2012-07-03.20; # UTC
 -scriptversion=2012-07-10.09; # UTC
++scriptversion=2012-07-19.14; # UTC
  
  # Bootstrap this package from checked-out sources.
  
@@@ -186,6 -214,6 +214,8 @@@ use_git=tru
  # otherwise find the first of the NAMES that can be run (i.e.,
  # supports --version).  If found, set ENVVAR to the program name,
  # die otherwise.
++#
++# FIXME: code duplication, see also gnu-web-doc-update.
  find_tool ()
  {
    find_tool_envvar=$1
index 29c907a437fd5c45147c132ede1dd58c6c8c205b,0000000000000000000000000000000000000000..7daf6cf7764ef46c7cf0556148885188f5746b53
mode 100644,000000..100644
--- /dev/null
@@@ -1,5 -1,0 +1,23 @@@
++## Makefile for Bison testsuite.
++
++# Copyright (C) 2000-2012 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 3 of the License, 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/>.
++
 +EXTRA_DIST +=                                   \
 +  build-aux/cross-options.pl                    \
++  build-aux/darwin11.4.0.valgrind               \
 +  build-aux/move-if-change                      \
 +  build-aux/prev-version.txt                    \
 +  build-aux/update-b4-copyright
diff --cc cfg.mk
index 9e9f8065724ceb334bdaf3de5995da5a3ef7781d,2f1a9e94248f26b46d74bb9f30f7de38a6b9f3f0..f1caf313e85f360c41d0ccfdfe874746dcc7a31c
--- 1/cfg.mk
--- 2/cfg.mk
+++ b/cfg.mk
@@@ -62,9 -69,10 +63,10 @@@ $(call exclude,                                                             
    prohibit_always-defined_macros+=?|^lib/timevar.c$$                  \
    prohibit_always-defined_macros+=?|^src/(parse-gram.c|system.h)$$    \
    prohibit_always-defined_macros+=?|^tests/regression.at$$            \
 -  prohibit_empty_lines_at_EOF=^src/parse-gram.[ch]$$                  \
+   prohibit_defined_have_decl_tests=?|^lib/timevar.c$$                 \
 +  prohibit_empty_lines_at_EOF=^src/parse-gram.h$$                     \
 +  prohibit_strcmp=^doc/bison\.texi$$                                  \
    require_config_h_first=^(lib/yyerror|data/(glr|yacc))\.c$$          \
    space_tab=^tests/(input|c\+\+)\.at$$                                        \
 -  trailing_blank=^src/parse-gram.[ch]$$                                       \
    unmarked_diagnostics=^(djgpp/|doc/bison.texi$$)                     \
  )
diff --cc configure.ac
index 0facd4ab25d54eaef4f56228697b906a9848ed5b,2773167a78f2cc92b79fcaa05bb5252d9a85fef2..cf42d2c67a297de499bcb2b93060ff9b06298cd4
@@@ -167,9 -160,19 +167,19 @@@ AC_CONFIG_FILES([etc/bench.pl], [chmod 
  
  # Initialize the test suite.
  AC_CONFIG_TESTDIR(tests)
 -AC_CONFIG_FILES([tests/Makefile tests/atlocal])
 +AC_CONFIG_FILES([tests/atlocal])
  AC_CONFIG_FILES([tests/bison], [chmod +x tests/bison])
  AC_CHECK_PROGS([VALGRIND], [valgrind])
+ case $VALGRIND:$host_os in
+   '':*) ;;
+   *:darwin*)
+     # See README-hacking.
+     # VALGRIND+=' --suppressions=$(abs_top_srcdir)/build-aux/darwin11.4.0.valgrind'
+     VALGRIND=;;
+   *:*)
+     AC_SUBST([VALGRIND_PREBISON], [$VALGRIND -q]);;
+ esac
  AM_MISSING_PROG([AUTOM4TE], [autom4te])
  # Needed by tests/atlocal.in.
  AC_SUBST([GCC])
diff --cc doc/bison.texi
Simple merge
diff --cc m4/.gitignore
Simple merge
Simple merge
Simple merge
diff --cc tests/local.at
index 5d318ba79d4b22c1ff6112e0c73b5c75f9e881d3,2dbbfc712fdce9cae6008df1e9c668b0c0cdfc24..c79fc08e2c4fba35d00c3c6452cfbe14b22b718f
@@@ -434,77 -444,88 +447,88 @@@ AT_BISON_CHECK_NO_XML($@)]
  m4_define([AT_BISON_WERROR_MSG],
            [[bison: warnings being treated as errors]])
  
- # AT_BISON_CHECK_NO_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
- # --------------------------------------------------------
- # Same as AT_BISON_CHECK except don't perform XML/XSLT checks.  This is useful
- # when a tortured grammar's XML is known to be too large for xsltproc to
- # handle.
- m4_define([AT_BISON_CHECK_NO_XML],
- [AT_CHECK(m4_if(m4_quote($2), [0], [], m4_quote($2), [], [],
-                 [AT_QUELL_VALGRIND ])[[bison ]]$@)
- m4_if(m4_bregexp([$4], [: warning: ]), [-1], [],
-       m4_quote(m4_if(m4_quote($2), [], [0], [$2])), [0], [[
-         # Defining POSIXLY_CORRECT causes bison to complain if options
+ # AT_BISON_CHECK_(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+ # --------------------------------------------------
+ # Low-level macro to run bison once.
+ m4_define([AT_BISON_CHECK_],
+ [AT_CHECK(AT_QUELL_VALGRIND[[ bison ]]$@)])
+ # AT_BISON_CHECK_WARNINGS(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+ # ----------------------------------------------------------
+ # Check that warnings (if some are expected) are correctly
+ # turned into errors with -Werror, etc.
+ m4_define([AT_BISON_CHECK_WARNINGS],
+ [m4_if(m4_bregexp([$4], [: warning: ]), [-1], [],
+       [m4_null_if([$2], [AT_BISON_CHECK_WARNINGS_($@)])])])
+ m4_define([AT_BISON_CHECK_WARNINGS_],
+ [[# Defining POSIXLY_CORRECT causes bison to complain if options
 -# are added after the grammar file name, so skip these checks
 -# in that case.
 -if test -z "${POSIXLY_CORRECT+set}"; then
 -  ]AT_SAVE_SPECIAL_FILES[
 +        # are added after the grammar file name, so skip these checks
 +        # in that case.
 +        if test -z "${POSIXLY_CORRECT+set}"; then
 +          ]AT_SAVE_SPECIAL_FILES[
  
 -  # To avoid expanding it repeatedly, store specified stdout.
 -  ]AT_DATA([expout], [$3])[
 +          # To avoid expanding it repeatedly, store specified stdout.
 +          ]AT_DATA([expout], [$3])[
  
 -  # Run with -Werror.
 +          # Run with -Werror.
-           ]AT_CHECK(AT_QUELL_VALGRIND[[ bison ]$1[ -Werror]],
-                     [[1]], [expout], [stderr])[
+   ]AT_BISON_CHECK_([$1[ -Werror]], [[1]], [expout], [stderr])[
  
 -  # Build expected stderr up to and including the "warnings being
 -  # treated as errors" message.
 -  ]AT_DATA([[at-bison-check-warnings]], [$4])[
 -  at_bison_check_first=`sed -n \
 -    '/: warning: /{=;q;}' at-bison-check-warnings`
 -  : ${at_bison_check_first:=1}
 -  at_bison_check_first_tmp=`sed -n \
 -    '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
 -  : ${at_bison_check_first_tmp:=1}
 -  if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
 -    at_bison_check_first=$at_bison_check_first_tmp
 -  fi
 -  if test $at_bison_check_first -gt 1; then
 -    sed -n "1,`expr $at_bison_check_first - 1`"p \
 -      at-bison-check-warnings > experr
 -  fi
 -  echo ']AT_BISON_WERROR_MSG[' >> experr
 -
 -  # Finish building expected stderr and check.  Unlike warnings,
 -  # complaints cause bison to exit early.  Thus, with -Werror, bison
 -  # does not necessarily report all warnings that it does without
 -  # -Werror, but it at least reports one.
 -  at_bison_check_last=`sed -n '$=' stderr`
 -  : ${at_bison_check_last:=1}
 -  at_bison_check_last=`expr $at_bison_check_last - 1`
 -  sed -n "$at_bison_check_first,$at_bison_check_last"p \
 -    at-bison-check-warnings >> experr
 -  ]AT_CHECK([[sed 's,.*/\(]AT_BISON_WERROR_MSG[\)$,\1,' \
 -              stderr 1>&2]], [[0]], [[]], [experr])[
 -
 -  # Now check --warnings=error.
 -  cp stderr experr
 +          # Build expected stderr up to and including the "warnings being
 +          # treated as errors" message.
 +          ]AT_DATA([[at-bison-check-warnings]], [$4])[
 +          at_bison_check_first=`sed -n \
 +            '/: warning: /{=;q;}' at-bison-check-warnings`
 +          : ${at_bison_check_first:=1}
 +          at_bison_check_first_tmp=`sed -n \
 +            '/conflicts: [0-9].*reduce$/{=;q;}' at-bison-check-warnings`
 +          : ${at_bison_check_first_tmp:=1}
 +          if test $at_bison_check_first_tmp -lt $at_bison_check_first; then
 +            at_bison_check_first=$at_bison_check_first_tmp
 +          fi
 +          if test $at_bison_check_first -gt 1; then
 +            sed -n "1,`expr $at_bison_check_first - 1`"p \
 +              at-bison-check-warnings > experr
 +          fi
 +          echo ']AT_BISON_WERROR_MSG[' >> experr
 +
 +          # Finish building expected stderr and check.  Unlike warnings,
 +          # complaints cause bison to exit early.  Thus, with -Werror, bison
 +          # does not necessarily report all warnings that it does without
 +          # -Werror, but it at least reports one.
 +          at_bison_check_last=`sed -n '$=' stderr`
 +          : ${at_bison_check_last:=1}
 +          at_bison_check_last=`expr $at_bison_check_last - 1`
 +          sed -n "$at_bison_check_first,$at_bison_check_last"p \
 +            at-bison-check-warnings >> experr
 +          ]AT_CHECK([[sed 's,.*/\(]AT_BISON_WERROR_MSG[\)$,\1,' \
 +                      stderr 1>&2]], [[0]], [[]], [experr])[
 +
 +          # Now check --warnings=error.
 +          cp stderr experr
-           ]AT_CHECK(AT_QUELL_VALGRIND[[ bison ]$1[ --warnings=error]],
-                     [[1]], [expout], [experr])[
+   ]AT_BISON_CHECK_([$1[ --warnings=error]], [[1]], [expout], [experr])[
  
 -  # Now check -Wnone and --warnings=none by making sure that
 -  # -Werror doesn't change the exit status when -Wnone or
 -  # --warnings=none is specified.
 +          # Now check -Wnone and --warnings=none by making sure that
 +          # -Werror doesn't change the exit status when -Wnone or
 +          # --warnings=none is specified.
-           ]AT_CHECK(AT_QUELL_VALGRIND[[ bison ]$1[ -Wnone -Werror]],
-                     [[0]], [expout])[
-           ]AT_CHECK(AT_QUELL_VALGRIND[[ bison ]$1[ --warnings=none \
-                     -Werror]], [[0]], [expout])[
+   ]AT_BISON_CHECK_([$1[ -Wnone -Werror]], [[0]], [expout])[
+   ]AT_BISON_CHECK_([$1[ --warnings=none -Werror]], [[0]], [expout])[
  
 -  ]AT_RESTORE_SPECIAL_FILES[
 +          ]AT_RESTORE_SPECIAL_FILES[
-         fi
-       ]])
+ fi]dnl
  ])
  
+ # AT_BISON_CHECK_NO_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
+ # --------------------------------------------------------
+ # Same as AT_BISON_CHECK except don't perform XML/XSLT checks.  This is useful
+ # when a tortured grammar's XML is known to be too large for xsltproc to
+ # handle.
+ m4_define([AT_BISON_CHECK_NO_XML],
+ [AT_CHECK(m4_null_if([$2], [], [AT_QUELL_VALGRIND ])[[bison ]]$@)
+ AT_BISON_CHECK_WARNINGS($@)])
  # AT_BISON_CHECK_XML(BISON_ARGS, [OTHER_AT_CHECK_ARGS])
  # -----------------------------------------------------
  # Run AT_BISON_CHECK's XML/XSLT checks if $BISON_TEST_XML=1 and $XSLTPROC is
@@@ -521,11 -542,11 +545,11 @@@ m4_define([AT_BISON_CHECK_XML]
                              [--xml=[^][ ]*], [])])dnl
    # Don't combine these Bison invocations since we want to be sure that
    # --report=all isn't required to get the full XML file.
-   AT_CHECK([[bison --report=all --report-file=xml-tests/test.output \
+   AT_BISON_CHECK_([[--report=all --report-file=xml-tests/test.output \
 -                  --graph=xml-tests/test.dot ]]AT_BISON_ARGS,
 -                  [[0]], [ignore], [ignore])
 +             --graph=xml-tests/test.dot ]]AT_BISON_ARGS,
 +           [[0]], [ignore], [ignore])
-   AT_CHECK([[bison --xml=xml-tests/test.xml ]]AT_BISON_ARGS,
+   AT_BISON_CHECK_([[--xml=xml-tests/test.xml ]]AT_BISON_ARGS,
 -                 [[0]], [ignore], [ignore])
 +           [[0]], [ignore], [ignore])
    m4_popdef([AT_BISON_ARGS])dnl
    [cp xml-tests/test.output expout]
    AT_CHECK([[$XSLTPROC \
diff --cc tests/local.mk
index 4f2ee52d350de2c2b3c8dd350505460c2836660a,0000000000000000000000000000000000000000..dc5b6c482ffeac99b029f8580086694c6e3a71d2
mode 100644,000000..100644
--- /dev/null
@@@ -1,125 -1,0 +1,125 @@@
-           PREBISON='$(VALGRIND) -q' PREPARSER='$(VALGRIND) -q'        \
 +## Makefile for Bison testsuite.
 +
 +# Copyright (C) 2000-2012 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 3 of the License, 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/>.
 +
 +EXTRA_DIST += $(TESTSUITE_AT) tests/testsuite
 +
 +DISTCLEANFILES       += tests/atconfig $(check_SCRIPTS)
 +MAINTAINERCLEANFILES += $(TESTSUITE)
 +
 +## ------------ ##
 +## package.m4.  ##
 +## ------------ ##
 +
 +$(top_srcdir)/tests/package.m4: $(top_srcdir)/configure
 +      $(AM_V_GEN)rm -f $@ $@.tmp
 +      $(AM_V_at){ \
 +        echo '# Signature of the current package.'; \
 +        echo 'm4_define([AT_PACKAGE_NAME],      [$(PACKAGE_NAME)])'; \
 +        echo 'm4_define([AT_PACKAGE_TARNAME],   [$(PACKAGE_TARNAME)])'; \
 +        echo 'm4_define([AT_PACKAGE_VERSION],   [$(PACKAGE_VERSION)])'; \
 +        echo 'm4_define([AT_PACKAGE_STRING],    [$(PACKAGE_STRING)])'; \
 +        echo 'm4_define([AT_PACKAGE_BUGREPORT], [$(PACKAGE_BUGREPORT)])'; \
 +      } >$@.tmp
 +      $(AM_V_at)mv $@.tmp $@
 +
 +## ------------------------- ##
 +## Generate the test suite.  ##
 +## ------------------------- ##
 +
 +TESTSUITE_AT =                                  \
 +  tests/testsuite.at                            \
 +                                                \
 +  tests/actions.at                              \
 +  tests/c++.at                                  \
 +  tests/calc.at                                 \
 +  tests/conflicts.at                            \
 +  tests/cxx-type.at                             \
 +  tests/existing.at                             \
 +  tests/glr-regression.at                       \
 +  tests/headers.at                              \
 +  tests/input.at                                \
 +  tests/java.at                                 \
 +  tests/local.at                                \
 +  tests/named-refs.at                           \
 +  tests/output.at                               \
 +  tests/package.m4                              \
 +  tests/push.at                                 \
 +  tests/reduce.at                               \
 +  tests/regression.at                           \
 +  tests/sets.at                                 \
 +  tests/skeletons.at                            \
 +  tests/synclines.at                            \
 +  tests/torture.at
 +
 +TESTSUITE = $(top_srcdir)/tests/testsuite
 +
 +AUTOTEST = $(AUTOM4TE) --language=autotest
 +AUTOTESTFLAGS = -I $(top_srcdir)/tests
 +$(TESTSUITE): $(TESTSUITE_AT)
 +      $(AM_V_GEN) \
 +        $(AUTOTEST) $(AUTOTESTFLAGS) $(srcdir)/tests/testsuite.at -o $@.tmp
 +      $(AM_V_at)mv $@.tmp $@
 +
 +
 +## -------------------- ##
 +## Run the test suite.  ##
 +## -------------------- ##
 +
 +# Move into tests/ so that testsuite.dir etc. be created there.
 +RUN_TESTSUITE = $(TESTSUITE) -C tests $(TESTSUITEFLAGS)
 +check_SCRIPTS = $(BISON) tests/atconfig tests/atlocal
 +RUN_TESTSUITE_deps = $(TESTSUITE) $(check_SCRIPTS)
 +
 +clean-local: clean-local-tests
 +clean-local-tests:
 +      test ! -f $(TESTSUITE) || $(TESTSUITE) -C tests --clean
 +
 +check-local: $(RUN_TESTSUITE_deps)
 +      $(RUN_TESTSUITE)
 +
 +# Run the test suite on the *installed* tree.
 +installcheck-local: $(RUN_TESTSUITE_deps)
 +      $(RUN_TESTSUITE) AUTOTEST_PATH='$(bindir)'
 +
 +# Be real mean with it.
 +.PHONY: maintainer-check-g++
 +maintainer-check-g++: $(RUN_TESTSUITE_deps)
 +      $(RUN_TESTSUITE) --compile-c-with-cxx
 +
 +.PHONY: maintainer-check-posix
 +maintainer-check-posix: $(RUN_TESTSUITE_deps)
 +      $(RUN_TESTSUITE) POSIXLY_CORRECT=1 _POSIX2_VERSION=200112
 +
 +.PHONY: maintainer-check-valgrind
 +maintainer-check-valgrind: $(RUN_TESTSUITE_deps)
 +      test -z '$(VALGRIND)' ||                                        \
 +        $(RUN_TESTSUITE)                                              \
++          PREBISON='$(VALGRIND_PREBISON)' PREPARSER='$(VALGRIND) -q'  \
 +          VALGRIND_OPTS='--leak-check=full --show-reachable=yes'
 +
 +.PHONY: maintainer-check
 +maintainer-check: maintainer-check-posix maintainer-check-valgrind maintainer-check-g++
 +
 +.PHONY: maintainer-push-check
 +maintainer-push-check:
 +      $(MAKE) $(AM_MAKEFLAGS) maintainer-check                        \
 +        TESTSUITEFLAGS='BISON_USE_PUSH_FOR_PULL=1 $(TESTSUITEFLAGS)'
 +
 +.PHONY: maintainer-xml-check
 +maintainer-xml-check:
 +      $(MAKE) $(AM_MAKEFLAGS) maintainer-check                \
 +        TESTSUITEFLAGS='BISON_TEST_XML=1 $(TESTSUITEFLAGS)'