Merge branch 'yacc-work' into yl-work-for-master
authorStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 12 Feb 2012 14:06:17 +0000 (15:06 +0100)
committerStefano Lattarini <stefano.lattarini@gmail.com>
Sun, 12 Feb 2012 14:32:54 +0000 (15:32 +0100)
* yacc-work: (37 commits)
  fixup: list of yacc/lex tests was botched
  tests: work around bug#7884 in many yacc/lex tests
  yacc/lex tests: remove an unneeded workaround for bug#8485
  yacc/lex tests: avoid too much failures with FreeBSD make
  yacc-dist-nobuild.test: add reference to bug#7884
  yacc tests: fix bug in 'yacc-cxx.test'
  lex tests: fix spurious link errors on Solaris
  lex: "make clean" removes .c files from non-distributed .l
  lex tests: make test on Lex dependency tracking more "semantic"
  lex tests: remove erroneous check about ylwrap distribution
  yacc tests: "make clean" removes C++ files from non-distributed .y
  tests: add a workaround for automake bug#8485
  tests: add a couple of inter-tests reference
  lex tests: require just `lex' instead of `flex'
  fix typo in ChangeLog (2011-05-04)
  tests defs: use `skip_' for skipping yacc/lex related tests
  lex/yacc tests: remove redundant $distdir definition
  coverage: test lex-generated "#line" directives postprocessing
  tests: minor improvements to a couple of yacc tests
  tests: fix spurious failure in test 'yacc-d-cxx.test'
  ...

+ Extra non-trivial edits:

* tests/defs.in: Delete; the differences from maint has been
merged into 'tests/defs' and 'tests/defs-static.in'.
* tests/defs (yacc, lex): Use 'skip_all_', not 'skip_', to
skip the whole test case if yacc (resp. lex) is missing.
(bison): New, set up the environment so that 'bison -y' will
be used as the yacc program.
(useless_vpath_rebuild, yl_distcheck): Moved in from
'tests/defs.in'.
* tests/defs-static.in ($YACC, $LEX): Default to the values
determined at configure time, and allow them to be overridden
by the more namespace-safe variables '$AM_TESTSUITE_YACC' and
'$AM_TESTSUITE_LEX' respectively.
* tests/Makefile.am (do_subst): Also substitute '@YACC@' and
'@LEX@'.
* Several tests: Fix requirements declarations, by preferring
'lex' and 'yacc' over 'flex' and 'bison' whenever possible.

33 files changed:
1  2 
ChangeLog.11
NEWS
automake.in
configure.ac
doc/automake.texi
tests/Makefile.am
tests/cond35.test
tests/defs
tests/defs-static.in
tests/lex-depend-grep.test
tests/lex-subobj-nodep.test
tests/lex3.test
tests/lex5.test
tests/lexvpath.test
tests/list-of-tests.mk
tests/silent-many-gcc.test
tests/silent-many-generic.test
tests/subpkg-yacc.test
tests/subpkg.test
tests/yacc-basic.test
tests/yacc-clean.test
tests/yacc-d-basic.test
tests/yacc-d-vpath.test
tests/yacc-dist-nobuild-subdir.test
tests/yacc-dist-nobuild.test
tests/yacc-nodist.test
tests/yacc-pr204.test
tests/yacc4.test
tests/yacc8.test
tests/yaccdry.test
tests/yaccpp.test
tests/yaccvpath.test
tests/yflags-force-override.test

diff --cc ChangeLog.11
        complaints from the `sc_no_brace_variable_expansions' maintainer
        check.
  
+ 2011-10-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       * tests/yacc-dist-nobuild.test: Add reference to relevant bug#7884.
  2011-10-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
 +      tests: fix spurious error in 'test-extensions.test'
 +      * tests/test-extensions.test: Call automake with the option
 +      `--add-missing', to ensure the required script `test-driver'
 +      gets installed.  Note that the test still fails due to an
 +      internal error in automake, though.
 +
 +2011-10-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: avoid few useless uses of the `-e' make option
 +      * tests/python12.test: Using `make -e' is not required to override
 +      the DESTDIR variable, since this variable shouldn't be defined in
 +      any automake-generated Makefile.in file.
 +      * tests/man2.test: Likewise.
 +      * tests/man5.test: Likewise.
 +
 +2011-10-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
        fix: make a test script executable
        * tests/nobase-nodist.test: Make executable.
  
        * tests/parallel-tests-log-compiler-example.test: Likewise.
        * tests/Makefile.am (TESTS): Update.
  
 +2011-06-30   Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      coverage: new test on parallel-tests TESTS runtime overriding
 +      * tests/parallel-tests-cmdline-override.test: New test, check that
 +      we can use indirections when overriding TESTS and TEST_LOGS from
 +      the command line.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      gitignore: ignore `*.trs' files in lib/Automake/tests
 +      * lib/Automake/tests/.gitignore: Add `*.trs' pattern.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: list another "forgotten" test script in Makefile.am
 +      * tests/Makefile.am (TESTS): Also list test script
 +      `test-driver-trs-suffix-registered.test'; it had been introduced
 +      in commit `v1.11-910-g0c81b43', but by mistake it wasn't added
 +      to the list of tests in the Makefile back then.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: list "forgotten" test script in Makefile.am
 +      * tests/Makefile.am (TESTS): Also list the test script
 +      `parallel-tests-no-color-in-log.test'; it had been introduced in
 +      commit `v1.11-899-geaac33f', but by mistake it wasn't added to
 +      the list of tests in the Makefile back then.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: remove duplicated mention of a test in Makefile.am
 +      * tests/Makefile.am (tap_other_tests): Remove `tap-empty.test',
 +      it is already listed in `$(tap_with_common_setup_tests)'.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: one more use of TAP in our own tests
 +      * tests/tap-bad-prog.test, tests/tap-bad-prog2.test: Merged
 +      into ...
 +      * tests/tap-bad-prog.tap: ... this TAP-generating test.
 +      * tests/Makefile.am (tap_other_tests): Remove plan-bad-prog.test
 +      and plan-bad-prog2.test.
 +      (XFAIL_TESTS): Remove plan-bad-prog2.test.
 +      (plan-bad-prog2.log): Remove.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: scaffolding to allow use of TAP in our own tests
 +      Now that Automake has initial support for the TAP test protocol,
 +      we can start "eating our own dog food" and rewrite some tests to
 +      use TAP; this should allow for better granularity, especially in
 +      the control of skips and expected failures.  With this change, we
 +      set up the initial scaffolding required by the planned TAP tests,
 +      and convert few older tests to use TAP, mostly in order to verify
 +      that there are no obvious errors.  The tests in our testsuite that
 +      use the TAP protocol will be marked by the new `.tap' extension.
 +      * tests/plain-functions.sh: New file containing definition of
 +      helper shell functions used by the "protocol-less" tests of the
 +      Automake testsuite.
 +      * tests/tap-functions.sh:  New file containing definition of
 +      helper shell functions used by the TAP-producing tests of the
 +      Automake testsuite.
 +      * tests/defs: Remove definitions of some functions that are
 +      now defined in `plain-functions.sh'.  Instead, source one of
 +      `plain-functions.sh' or `tap-functions.sh', depending on whether
 +      `$use_tap' is set to "no" or "yes".
 +      (exit trap): Call `late_plan_' if `$use_tap' is true.  Also,
 +      unset shell traces before issuing the latest commands, to avoid
 +      confusing the tap driver with spurious output.
 +      * tests/defs-static.in ($use_tap): New variable, by default set
 +      to "yes" if the calling test script has a `.tap' suffix, and to
 +      "no" otherwise.  The individual scripts can override it though.
 +      In code sanity-checking the environment, verify that `$use_tap'
 +      is not exported.
 +      * tests/self-check-env-sanitize.test: Update, and small related
 +      reformatting.
 +      * tests/self-check-tap.test: New very minimal self test.
 +      * tests/acoutbs.test, tests/acoutbs2.test, tests/acoutnoq.test,
 +      tests/acoutpt.test, tests/acoutpt2.test, tests/acoutqnl.test:
 +      Removed, merged into ...
 +      * tests/ac-output-old.tap: ... this new test, that uses TAP.
 +      * tests/Makefile.am (TAP_LOG_DRIVER): Define to invoke our own
 +      `tap-driver' script.
 +      (TAP_LOG_DRIVER_FLAGS): Define to `--merge', so that the stdout
 +      and stderr of the test scripts remains synced.
 +      (TEST_EXTENSIONS): Define, to add the `.tap' suffix; also list
 +      the `.test' suffix explicitly.
 +      (EXTRA_DIST): Distribute the new files `plain-functions.sh' and
 +      `tap-functions.sh'.
 +      ($(TEST_LOGS)): Depends on them.
 +      (AM_TESTS_ENVIRONMENT): Ensure that `use_tap' is not exported in
 +      the environment of the tests.
 +      (TESTS): Update.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      * NEWS: Fix typo, and related reformatting.
 +
 +2011-08-03  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      * NEWS: add mention of new experimental TAP support
 +
 +2011-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: rename some test scripts
 +      * tests/parallel-tests-am_tests_environment.test: Renamed ...
 +      * tests/am-tests-environment.test: ... to this.
 +      * tests/check-tests_environment.test: Renamed ...
 +      * tests/tests-environment.test: ... to this.
 +      * tests/parallel-test-driver-install.test: Renamed ...
 +      * tests/parallel-tests-driver-install.test: ... to this.
 +      * tests/parallel-tests-make-n.test: Renamed ...
 +      * tests/parallel-tests-dry-run.test: ... to this.
 +      * tests/Makefile.am (TESTS): Updated.
 +
 +2011-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      coverage: parallel-tests and lazy dependencies on EXTRA_PROGRAMS
 +      * tests/parallel-tests-extra-programs.test: New test.
 +      * tests/Makefile.am (TESTS): Update.
 +      * doc/automake.texi (Parallel Test Harness): Add a comment
 +      pointing to the new test.
 +
 +2011-08-02  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      docs: improve, extend and fix documentation on TAP support
 +      * doc/automake.texi ("Using the TAP test protocol"): Divide this
 +      section into ...
 +      ("Introduction to TAP", "Use TAP with the Automake test harness",
 +      "Incompatibilities with other TAP parsers and drivers", "Links
 +      and external resources"): ... these subsections, extend them by
 +      adding more information and examples, and improve them by removing
 +      incomplete and/or temporary wordings and TODO items.
 +      ("Script-based Testsuites", "Parallel Test Harness"): Add a couple
 +      of anchors to improve the granularity of cross-references.
 +      * tests/tap-doc2.test: New test, verifying the correctness of the
 +      new examples given in the manual.
 +      * tests/Makefile.am (tap_other_tests): Add the new test.
 +
 +2011-08-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: separate the only failing check of an xfailing test
 +      * tests/plan-bad-prog.test: Move the only failing check of this
 +      test (i.e., the one about the total number of "ERROR" outcomes)
 +      into ...
 +      * tests/plan-bad-prog2.test: ... this new test.
 +      * tests/Makefile.am (XFAIL_TESTS): Remove `plan-bad-prog.test',
 +      add `plan-bad-prog2.test'.
 +      (tap_other_tests): Add `plan-bad-prog2.test'.
 +      (plan-bad-prog2.log): Depend on `plan-bad-prog.test'.
 +
 +2011-08-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: fix spurious errors in an xfailing test on TAP support
 +      * tests/plan-bad-prog.test: Fix typo in the name of the test
 +      being made unreadable.  Correct the wording of the potential
 +      skip message, and simplify the condition under which the test
 +      is to be skipped.  Escape literal dots in grep regexps.
 +
 +2011-08-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: better granularity in a couple of tests on TAP support
 +      * tests/tap-summary-aux.sh: New auxiliary script, filled with code
 +      moved out from ...
 +      * tests/tap-summary.test: ... this test, from which the checks on
 +      colored testsuite have further been moved into ...
 +      * tests/tap-summary-color.test: ... this new test, which in turn
 +      * tests/Makefile.am (tap_other_tests): Add `tap-summary-color.test'.
 +      (EXTRA_DIST): Distribute `tap-summary-aux.sh'
 +      (tap-summary.log): Depend on `tap-summary-aux.sh'.
 +      (tap-summary-color.log): Likewise.
 +
 +2011-08-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: optimize tests on TAP for speed and against duplication
 +      The creation and configuration of common files and data used by
 +      many tests on TAP is, with this change, factored out into a new
 +      dedicated auxiliary test, from which those tests will depend upon.
 +      This reduces code duplication in tests and, more importantly,
 +      offers a noticeable speedup in the involved tests (30-40%).
 +      * tests/tap-common-setup.test: New test, setting up the common
 +      files and data used by various tests on TAP support.
 +      * tests/tap-setup.sh: New file, to be sourced by tests wanting to
 +      bring in data generated by `tap-common-setup.test'.
 +      * tests/tap-autonumber.test: Update to use the pre-computed data
 +      files.
 +      * tests/tap-bailout.test: Likewise.
 +      * tests/tap-color.test: Likewise.
 +      * tests/tap-deps.test: Likewise.
 +      * tests/tap-diagnostic.test: Likewise.
 +      * tests/tap-empty-diagnostic.test: Likewise.
 +      * tests/tap-empty.test: Likewise.
 +      * tests/tap-escape-directive.test: Likewise.
 +      * tests/tap-exit.test: Likewise.
 +      * tests/tap-signal.test: Likewise.
 +      * tests/tap-fancy.test: Likewise.
 +      * tests/tap-fancy2.test: Likewise.
 +      * tests/tap-global-log.test: Likewise.
 +      * tests/tap-global-result.test: Likewise.
 +      * tests/tap-html.test: Likewise.
 +      * tests/tap-log.test: Likewise.
 +      * tests/tap-merge-stdout-stderr.test: Likewise.
 +      * tests/tap-no-merge-stdout-stderr.test: Likewise.
 +      * tests/tap-message-0.test: Likewise.
 +      * tests/tap-no-disable-hard-error.test: Likewise.
 +      * tests/tap-no-spurious-summary.test: Likewise.
 +      * tests/tap-no-spurious.test: Likewise.
 +      * tests/tap-not-ok-skip.test: Likewise.
 +      * tests/tap-numeric-description.test: Likewise.
 +      * tests/tap-out-of-order.test: Likewise.
 +      * tests/tap-passthrough.test: Likewise.
 +      * tests/tap-passthrough-exit.test: Likewise.
 +      * tests/tap-plan.test: Likewise.
 +      * tests/tap-plan-corner.test: Likewise.
 +      * tests/tap-plan-corner2.test: Likewise.
 +      * tests/tap-plan-errors.test: Likewise.
 +      * tests/tap-realtime.test: Likewise.
 +      * tests/tap-recheck-logs.test: Likewise.
 +      * tests/tap-skip-whole.test: Likewise.
 +      * tests/tap-todo-skip-together.test: Likewise.
 +      * tests/tap-todo-skip-whitespace.test: Likewise.
 +      * tests/tap-todo-skip.test: Likewise.
 +      * tests/tap-unplanned.test: Likewise.
 +      * tests/tap-with-and-without-number.test: Likewise.
 +      * tests/tap-xfail-tests.test: Likewise.
 +      * tests/tap-skip-whole-whitespace.test: Likewise, and remove
 +      redundant definitions of `$sp' and `$tab' (they are already
 +      defined in `tests/defs').
 +      * tests/tap-whitespace-normalization.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +      (EXTRA_DIST): Distribute `tap-setup.sh'.
 +      (tap_with_common_setup_tests, tap_with_common_setup_logs)): New
 +      variables, holding respectively the list of tests using the files
 +      pre-computed by `tap-common-setup.test', and the list of their
 +      corresponding log files.
 +      (tap_other_tests): New variable, holding the list of other tests
 +      on TAP support.
 +      ($(tap_with_common_setup_logs)): Depend on `tap-common-setup.log'
 +      and `tap-setup.sh'.
 +
 +2011-08-01  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      test harness: use new `.trs' files to hold test metadata
 +      With this change, the test harness will keep test metadata in
 +      dedicated `.trs' files, instead of having them embedded into the
 +      `.log' files.  This allows for easier forward-compatibility and
 +      extension of test metadata, and for more flexibility in the
 +      format of the `.log' files.  Note that this change makes the
 +      `:end-metadata:' field obsolete.
 +      * doc/automake.texi (Parallel Test Harness, Log files generation
 +      and test results recording): Document the new APIs and behaviour;
 +      some related minor rewordings and fixlets.
 +      * NEWS: Update.
 +      * automake.in (handle_tests): When bringing in the content of
 +      `check2.am', substitute %BASE% with the basename of the `.log'
 +      file being created by a rule.  Add the generated `.trs' files
 +      to the list of files to be cleaned by "make mostlyclean".
 +      * lib/am/check.am (am__test_driver_flags): Rename ...
 +      (am__common_driver_flags): ... to this, and remove the flags
 +      `--test-name' and `--log-file' from it: they are now define in
 +      the proper rules in `check2.am'.
 +      (am__TEST_BASES): New internal variable, holding the names of
 +      the tests, with any registered extension removed.
 +      (am__stealth_MAKE): New internal variable, can be used instead of
 +      $(MAKE) in recipes requiring a recursive call to make, but which
 +      are not intended to be executed by "make -n".
 +      (.log.trs): New suffix rule, to recover from deletion of `.trs'
 +      files.
 +      ($(TEST_SUITE_LOG)): Almost completely rewritten to follow the
 +      new API of "test logs in `.log' files, test metadata in `.trs'
 +      files".  It goes to some length to work correctly in face of
 +      unreadable or missing `.log' and `.trs' files, and to error out
 +      with proper error messages when this is not possible.
 +      [%?PARALLEL_TESTS%] (check-TESTS): Also remove relevant "stale"
 +      `.trs' files (in addition to `.log files) before remaking the
 +      $(TEST_SUITE_LOG).
 +      (recheck, recheck-html): Look for the `:recheck:' field in the
 +      `.trs' files, not in the `.log' files.
 +      * lib/am/check2.am (?GENERIC?%EXT%.log, ?!GENERIC?%OBJ%): Adjust
 +      the call to the test driver, in particularly passing the new
 +      option `--trs-file'.
 +      [%am__EXEEXT%] (?GENERIC?%EXT%$(EXEEXT).log): Likewise.
 +      * lib/tap-driver ($USAGE): Adjust the help screen.
 +      (Getopt::Long::GetOptions): Handle the `--trs-file' option,
 +      through the use of ...
 +      ($trs_file): ... this new global variable.
 +      (finish): Write metadata for the test run to `$trs_file' rather
 +      then to `$log_file', through the use of ...
 +      (write_test_results): ... this new function.
 +      * lib/test-driver (print_usage): Update the help screen.
 +      (Option parsing): Handle the `--trs-file' option, through the
 +      use of ...
 +      ($resfile): ... this new global variable.
 +      (Main code): Write metadata for the test run to `$trsfile' rather
 +      than to `$logfile'.
 +      Minor related adjustments to comments.
 +      * tests/.gitignore: Ignore `*.trs' files.
 +      * tests/parallel-tests-unreadable-log.test: Moved ...
 +      * tests/parallel-tests-unreadable.test: ... to this, and extended
 +      to also check the semantics for unreadable `.trs' files.
 +      * tests/test-driver-end-metadata.test: Deleted as obsolete.
 +      * tests/test-driver-metadata-no-leading-space.test: Likewise.
 +      * tests/test-driver-global-log.test: Renamed ...
 +      * tests/test-metadata-global-log.test: ... to this, and modified
 +      as to verify the new APIs and semantics.
 +      * tests/test-driver-recheck: Renamed ...
 +      * tests/test-metadata-recheck.test: ... to this, and modified
 +      likewise.
 +      * tests/parallel-tests-once.test: New test.
 +      * tests/parallel-tests-make-n.test: Likewise.
 +      * test-metadata-results.test: Likewise.
 +      * test-missing.test: Likewise.
 +      * test-missing2.test: Likewise.
 +      * test-trs-basic.test: Likewise.
 +      * test-trs-recover.test: Likewise.
 +      * test-trs-recover2.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      test harness: allow more metadata in log files
 +      This change reworks and improves the parallel test harness to use
 +      more specialized reStructuredText fields in the log files (instead
 +      of relying on specially-placed of "magic lines" and more indirect
 +      semantical formatting); the new fields are the following:
 +       - ":recheck:": tell whether the associated test will have to be
 +         re-run by "make recheck";
 +       - ":copy-in-global-log:": tell whether the content of the log
 +         file should be copied in the "global log" `test-suite.log';
 +       - ":end-metadata:", which inhibits the scanning of the rest of
 +         the log file (for what concerns test metadata).
 +      Also, the special `:test-result:' value "END" has been removed,
 +      superseded by the new `:end-metadata:' field.
 +      * doc/automake.texi (Log files generation and test results
 +      recording): Document the new API and semantics.  Remove or fix
 +      some obsolete comments.
 +      * lib/am/check.am ($(TEST_SUITE_LOG), recheck, recheck-html):
 +      Adjust comments and code.
 +      * lib/tap-driver (finish): Adjust, with the help of ...
 +      (must_recheck, copy_in_global_log): ... these new functions.
 +      * lib/test-driver (Main code): Adjust, with the help of ...
 +      ($recheck, $gcopy): ... these new variables.
 +      * tests/trivial-test-driver: Update to obey the new APIs.
 +      * tests/test-driver-recheck.test: Likewise.
 +      * tests/test-driver-global-log.test: Likewise.
 +      * tests/tap-passthrough.test: Relax the test, avoiding to check
 +      what is written in `test-suite.log'; such check has been moved ...
 +      * tests/tap-global-log.test: ... in this new test, and extended.
 +      * tests/test-driver-metadata-no-leading-space.test: New test.
 +      * tests/test-driver-end-test-results.test: Removed, it checked
 +      the old APIs; superseded by ...
 +      * tests/test-driver-end-metadata.test: ... this new test.
 +      * tests/tap-log.test: Improve syncing with ...
 +      * tests/test-log.test: ... this new test.
 +      * tests/parallel-tests.test: Remove some duplication w.r.t. this
 +      last new test.  Updated heading comments.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: fix a spurious failure with non-bash shells
 +      * tests/tap-fancy2.test: Remove an unportable use of backslashes
 +      with the `echo' builtin, which was causing some shells (among them
 +      bash and Debian /bin/ksh) to print a `\\' string, while other
 +      shells (among them zsh, dash, and Solaris /bin/sh and /bin/ksh)
 +      were unexpectedly printing a single `\' character.  Since we are
 +      at it, add a sanity check to ensure that this issue does not
 +      resurface.
 +
 +2011-07-27  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      testsuite: fix spurious failures with Solaris /bin/sh
 +      * tests/tap-more.test: Use `echo > file', not `: > file', to
 +      create empty files in the "for" loops; this is required since,
 +      as documented in the autoconf manual, Solaris 10 /bin/sh
 +      "optimizes" away the `:' command after the first iteration,
 +      even if it is redirected.
 +      * tests/test-driver-custom-multitest-recheck2.test: Likewise.
 +      * tests/tap-numeric-description.test: Partial rewrite to avoid
 +      using positional parameters from the 10th onward, which are
 +      unportable to Solaris /bin/sh (using `${10}' causes the shell
 +      to die with "bad substitution").
 +
 +2011-07-31  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      simple tests: support developer-defined fd redirections
 +      Motivated by coreutils bug#8846, and related discussions:
 +       <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=8846>
 +       <http://lists.gnu.org/archive/html/bug-autoconf/2011-06/msg00002.html>
 +      In those threads it has been shown how problematic it can be to do
 +      portable file descriptor redirections in the testsuite when using
 +      the Automake testsuite harness.  This change should remedy to that
 +      situation.
 +      * lib/am/check2.am (?GENERIC?%EXT%$(EXEEXT).log,
 +      ?GENERIC?%EXT%.log, ?!GENERIC?%OBJ%): Append redirection defined
 +      in $(AM_TESTS_FD_REDIRECT) to the command-line invocations of the
 +      test scripts.
 +      * lib/am/check.am [!%?PARALLEL_TESTS%] $(check-TESTS): Likewise.
 +      * NEWS: Update.
 +      * doc/automake.texi (Script-based Testsuites): Document the new
 +      feature.
 +      * tests/check-fd-redirect.test: New test.
 +      * tests/parallel-tests-fd-redirect.test: Likewise.
 +      * tests/parallel-tests-am_tests_environment.test: Remove checks
 +      about the use of redirections in AM_TESTS_ENVIRONMENT: they would
 +      check deprecated (if not undefined) behaviour now.  Strengthen a
 +      couple of still valid checks, to keep the test more in sync with
 +      the documentation.  Improve debugging information.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      docs: rework and extend documentation on testsuites support
 +      * doc/automake.texi (Generalities about Testing): New section.
 +      (Simple Tests using parallel-tests): Section removed, merged
 +      into ...
 +      (Simple Tests): ... this one, which on the other hand has been
 +      subdivided into ...
 +      (Script-based Testsuites, Serial Test Harness, Parallel Test
 +      Harness): ... these new subsection.
 +      (DejaGnu Tests): Minor adjustments.
 +      Other related typofixes and rewordings throughout the manual;
 +      in particular, avoid to use the term "test driver" for three
 +      different concepts (and use instead "test harness" and "test
 +      runner" where appropriate).
 +      * tests/tap-doc.test: New test.
 +      * tests/tap-no-disable-hard-error.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tap: support colorization of testsuite progress output
 +      * lib/tap-driver (%COLORS): New variable (definition extracted
 +      from `lib/am/check.am:$(am__tty_colors)', with some obvious
 +      adjustments.
 +      (report): Adjust to colorize console output when required,
 +      using ...
 +      (decorate_result): ... this new function.
 +      (colored): New function, used by the one above.
 +      * tests/tap-summary.test: Also run the checks when `color-tests'
 +      is in use.
 +      * tests/Makefile.am (XFAIL_TESTS): Remove `tap-color.test'.
 +
 +2011-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tap: some preparatory refactoring (2)
 +      This is a follow-up simplification.
 +      * lib/tap-driver (console_output): Renamed ...
 +      (report): ... to this, and extended to appropriately register
 +      the test results when needed.
 +      (testsuite_error, handle_tap_comment, handle_tap_test,
 +      handle_tap_plan): Adjusted accordingly.
 +
 +2011-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tap: some preparatory refactoring (1)
 +      This refactoring is aimed at simplifying the introduction of
 +      colored console output for the TAP driver.
 +      * lib/tap-driver (console_output): Now accept two arguments, the
 +      first one indicating which kind of thing is to be displayed (for
 +      now only a test result or a diagnostic comment), and the second
 +      one (if present) the message associated to it.
 +      (handle_tap_test, handle_tap_comment, handle_tap_plan,
 +      testsuite_error): Adapt to the new `console_output' interface.
 +
 +2011-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tap: add experimental TAP-aware driver
 +      * doc/automake.texi (Using the TAP test protocol): New section.
 +      (Overview of Custom Test Drivers Support): Minor updates.
 +      * lib/tap-driver: New script, TAP-aware test driver for Automake;
 +      implemented in perl and based on TAP::Parser.
 +      * lib/Makefile.am (dist_script_DATA): Add it.
 +      * tests/tap-autonumber.test: New test.
 +      * tests/tap-bailout.test: Likewise.
 +      * tests/tap-basic.test: Likewise.
 +      * tests/tap-deps.test: Likewise.
 +      * tests/tap-diagnostic.test: Likewise.
 +      * tests/tap-empty.test: Likewise.
 +      * tests/tap-empty-diagnostic.test: Likewise.
 +      * tests/tap-escape-directive.test: Likewise.
 +      * tests/tap-exit.test: Likewise.
 +      * tests/tap-fancy.test: Likewise.
 +      * tests/tap-fancy2.test: Likewise.
 +      * tests/tap-global-result.test: Likewise.
 +      * tests/tap-html.test: Likewise.
 +      * tests/tap-log.test: Likewise.
 +      * tests/tap-merge-stdout-stderr.test: Likewise.
 +      * tests/tap-more.test: Likewise.
 +      * tests/tap-more2.test: Likewise.
 +      * tests/tap-no-merge-stdout-stderr.test: Likewise.
 +      * tests/tap-no-spurious-summary.test: Likewise.
 +      * tests/tap-no-spurious.test: Likewise.
 +      * tests/tap-not-ok-skip.test: Likewise.
 +      * tests/tap-numeric-description.test: Likewise.
 +      * tests/tap-out-of-order.test: Likewise.
 +      * tests/tap-passthrough.test: Likewise.
 +      * tests/tap-plan.test: Likewise.
 +      * tests/tap-plan-errors.test: Likewise.
 +      * tests/tap-plan-corner.test: Likewise.
 +      * tests/tap-realtime.test: Likewise.
 +      * tests/tap-recheck-logs.test: Likewise.
 +      * tests/tap-recheck.test: Likewise.
 +      * tests/tap-skip-whole.test: Likewise.
 +      * tests/tap-summary.test: Likewise.
 +      * tests/tap-todo-skip.test: Likewise.
 +      * tests/tap-todo-skip-together.test: Likewise.
 +      * tests/tap-todo-skip-whitespace.test: Likewise.
 +      * tests/tap-skipall-whitespace.test: Likewise.
 +      * tests/tap-unplanned.test: Likewise.
 +      * tests/tap-whitespace-normalization.test: Likewise.
 +      * tests/tap-with-and-without-number.test: Likewise.
 +      * tests/tap-xfail-tests.test: Likewise.
 +      * tests/tap-bad-prog.test: New xfailing test.
 +      * tests/tap-color.test: Likewise.
 +      * tests/tap-plan-corner2.test: Likewise.
 +      * tests/tap-message-0.test: Likewise.
 +      * tests/tap-signal.test: Likewise.
 +      * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
 +
 +2011-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      test defs: new auxiliary function 'count_test_results'
 +      * tests/defs (count_test_results): New function.
 +      * tests/check11.test: Use it.
 +      * tests/test-driver-custom-multitest.test: Likewise.
 +      * tests/test-driver-custom-multitest-recheck.test: Likewise.
 +      * tests/test-driver-custom-multitest-recheck2.test: Likewise.
 +      * tests/parallel-tests-log-override-recheck.test: Likewise.
 +      * tests/parallel-tests-log-override-recheck.test: Likewise.
 +      * tests/parallel-tests-no-spurious-summary.test: Likewise, and
 +      slightly improve debugging output.
 +      * tests/parallel-tests.test: Make use of `count_test_results'.
 +      Also, make grepping of "make check" output slightly stricter
 +      * tests/parallel-tests9.test: Likewise.
 +      * tests/parallel-tests-log-override-2.test: Likewise, and throw
 +      in a small optimization.
 +
 +2011-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      parallel-tests: simplify testsuite summary
 +      Prefer a more deterministic, "tabular" format for the testsuite
 +      summary, always listing the numbers of passed, failed, xfailed,
 +      xpassed, skipped and errored tests, even when these numbers are
 +      zero.  This simplify the logic of testsuite summary creation,
 +      makes it more easily machine-parseable, and will probably allow
 +      for easier addition of new kinds of test results in the future.
 +      * lib/am/check.am (am__tty_colors_dummy): New make variable, to
 +      reduce code duplication.  Extracted from previous versions of
 +      $(am__tty_colors), and extended by defining two new variables
 +      `$mgn' and `$brg'.
 +      [%?COLOR%, %!?COLOR%] (am__tty_colors): Use that new variable.
 +      (am__text_box): Delete, is not needed anymore.
 +      ($(TEST_SUITE_LOG)): Rewrite associated rules to implement the
 +      new testsuite summary format.
 +      * NEWS: Update.
 +      * tests/check10.test: Don't run with the parallel-tests harness
 +      too, that makes no sense anymore.
 +      * tests/color.test: Update and adjust.
 +      * tests/color2.test: Likewise.
 +      * tests/parallel-tests.test: Likewise.
 +      * tests/parallel-tests3.test: Likewise.
 +      * tests/parallel-tests6.test: Likewise.
 +      * tests/parallel-tests9.test: Likewise.
 +      * tests/parallel-tests-unreadable-log.test: Likewise.
 +      * tests/parallel-tests-empty-testlogs.test: Likewise.
 +      * tests/parallel-tests-log-override-recheck.test: Likewise.
 +      * tests/parallel-tests-no-spurious-summary.test: Likewise.
 +      * tests/test-driver-custom-multitest.test: Likewise.
 +      * tests/test-driver-end-test-results.test: Likewise.
 +      * tests/parallel-tests-no-color-in-log.test: New test.
 +      * tests/testsuite-summary-color.test: Likewise.
 +      * tests/testsuite-summary-count.test: Likewise.
 +      * tests/testsuite-summary-count-many.test: Likewise.
 +      * tests/testsuite-summary-reference-log.test: Likewise.
 +      * tests/testsuite-summary-checks.sh: New auxiliary script, used
 +      by the new tests above.
 +      * tests/extract-testsuite-summary: Likewise.
 +      * tests/trivial-test-driver: Optimize for speed when there are
 +      lots of of tests.
 +      * tests/Makefile.am (EXTRA_DIST): Distribute them.
 +      (testsuite-summary-color.log, testsuite-summary-count.log): Depend
 +      on them.
 +      (testsuite-summary-count-many.log): Depend on the auxiliary scripts
 +      'trivial-test-driver' and 'extract-testsuite-summary'.
 +      (TESTS): Update.
 +
 +2011-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      parallel-tests: new recognized test result 'ERROR'
 +      * lib/am/check.am ($(TEST_SUITE_LOG)): Recognize a new test result
 +      `ERROR'.  Use it when encountering unreadable test logs (previously
 +      a simple `FAIL' was used in this situations).
 +      * lib/test-driver: Set the global test result to `ERROR' when the
 +      test exit status is 99.  When doing colorized output, color `ERROR'
 +      results in magenta.
 +      * doc/automake.texi (Log files generation and test results
 +      recording): Update by listing `ERROR' too among the list of valid
 +      `:test-results:' arguments.
 +      * NEWS: Update.
 +      * tests/trivial-test-driver: Update.
 +      * tests/parallel-tests.test: Likewise.
 +      * tests/parallel-tests-harderror.test: Likewise.
 +      * tests/parallel-tests-no-spurious-summary.test: Likewise.
 +      * tests/test-driver-global-log.test: Likewise.
 +      * tests/test-driver-recheck.test: Likewise.
 +      * tests/test-driver-custom-multitest-recheck.test: Likewise.
 +      * tests/test-driver-custom-multitest-recheck2.test: Likewise.
 +      * tests/test-driver-custom-multitest.test: Likewise.
 +      * tests/test-driver-custom-no-html.test: Likewise.
 +      * tests/test-driver-end-test-results.test: Likewise.
 +      * tests/color.test: Likewise.  Also, make stricter, and also test
 +      from VPATH.
 +      * tests/color2.test: Likewise, and improve syncing with color.test.
 +      * tests/parallel-tests-exit-statuses.test: New test.
 +      * tests/parallel-tests-console-output.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      parallel-tests: make parsing of test results safer
 +      The new code for parsing the testsuite-generated `.log' files,
 +      as introduced in commit `v1.11-872-gc96b881', considers each
 +      `:test-result:' field anywhere in a `.log' file as a declaration
 +      of a test result, and accounts for it as such in the testsuite
 +      summary.  Unfortunately this could easily cause spurious test
 +      failures being reported in the testsuite summary.  This happened
 +      in practice with the Automake's own testsuite; for example:
 +        $ make check TESTS='check12-p.test'; echo exit: $?
 +        ...
 +        PASS: check12-p.test
 +        =====================================
 +        4 of 5 tests failed
 +        See tests/test-suite.log
 +        Please report to bug-automake@gnu.org
 +        =====================================
 +        make[2]: *** [test-suite.log] Error 1
 +        make: *** [check-am] Error 2
 +        exit: 2
 +      This change introduces a new special `:test-result:' "END", that,
 +      when seen, prevents the rest of the log file from being parsed.
 +      For more information, refer to the thread:
 +      <http://lists.gnu.org/archive/html/automake-patches/2011-06/msg00199.html>
 +      * lib/am/check.am ($(TEST_SUITE_LOG)): Stop the parsing of a log
 +      file as soon as the special ":test-result:END" directive is seen.
 +      Related changes and enhancements.
 +      * lib/test-driver: Protect the rest of the log after the result
 +      lined with a ":test-result:END" directive.
 +      * doc/automake.texi (Log files generation and test results
 +      recording): Update, and related improvements.
 +      * tests/parallel-tests-no-spurious-summary.test: New test.
 +      * tests/test-driver-end-test-results.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-06-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      docs: document custom test drivers and protocols
 +      * doc/automake.texi (Simple Tests): Note that the TESTS_ENVIRONMENT
 +      use suggested here is not portable to 'parallel-tests'.
 +      (Simple Tests using parallel-tests): Document new restrictions on
 +      the uses of TESTS_ENVIRONMENT and AM_TESTS_ENVIRONMENT.
 +      (Custom Test Drivers): New section and node.
 +      (Overview of Custom Test Drivers Support): New subsection.
 +      (Declaring Custom Test Drivers in @file{Makefile.am}): Likewise.
 +      (APIs for Custom Test Drivers): Likewise.
 +      (Options): Update description of color-tests.
 +      * lib/am/check ($(TEST_SUITE_LOG)): Remove comments that have been
 +      moved into the manual.
 +      (recheck, recheck-html): Minor adjustments to better conform to the
 +      documentation (this should cause no semantic changes w.r.t. the
 +      former behaviour); minor improvements and extensions to existing
 +      comments.
 +      * tests/test-driver-create-log-dir.test: New test.
 +      * tests/test-driver-strip-vpath.test: Likewise.
 +      * tests/test-driver-global-log.test: Likewise.
 +      * tests/test-driver-recheck.test: Likewise.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: small enhancement to 'primary3.test'
 +      * tests/primary3.test: Also test that the program named `foo.la'
 +      has been effectively created.
 +
 +2011-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: a small simplification in 'pr8365-remake-timing.test'
 +      * tests/pr8365-remake-timing.test: Avoid redundant definition
 +      and use of `$save_AUTOCONF' variable.
 +
 +2011-07-24  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: remove an extra leading blank line
 +      * tests/override-conditional-1.test: Remove extra blank line
 +      placed before the shebang line.
 +
 +2011-07-18  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix typos, grammaros and other blunders in comments
 +      All affected files changed.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      test defs: new subroutine 'seq_', simulating GNU seq(1)
 +      * tests/defs (seq_): New subroutine.
 +      * tests/instmany.test: Use it.
 +      * tests/instmany-mans.test: Likewise.
 +      * tests/instmany-python.test: Likewise.
 +      * tests/self-check-seq.test: New self test.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: remove duplication about testing of config.* aux files
 +      * tests/add-missing.test: Also check that the `AC_CANONICAL_SYSTEM'
 +      autoconf macro causes the `config.sub' and `config.guess' scripts
 +      to be installed by `automake --add-missing'.  Since we are at it,
 +      fix minor buglets and cosmetic issues in the `check_' function.
 +      * tests/hosts.test: Removed, completely subsumed by the previous
 +      test now.
 +      * tests/Makefile.am (TESTS): Update.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: more uses of the 'unindent' subroutine
 +      * tests/backcompat.test: Prefer `unindent' over plain `cat' for
 +      here documents created from within a loop of if/else body.
 +      * tests/backcompat2.test: Likewise.
 +      * tests/backcompat4.test: Likewise.
 +      * tests/init.test: Likewise.
 +      * tests/instmany.test: Likewise.
 +      * tests/instmany-mans.test: Likewise.
 +      * tests/instmany-python.test: Likewise.
 +      * tests/missing5.test: Likewise.
 +      * tests/parallel-am2.test : Likewise.
 +      * tests/parallel-am3.test : Likewise.
 +      * tests/pr307.test: Likewise.
 +      * tests/depend4.test: Likewise.  Since we are at it, normalize
 +      other code formatting.
 +      * tests/instfail-java.test: Prefer `echo' over `cat' + here-doc
 +      inside a for loop.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: avoid '##'-style comments inside recipe commands
 +      * tests/autodist.test: Do not whitespace-indent `##' comments when
 +      they are embedded in a makefile rule: having them indented is not
 +      part of the Automake API, and might cause failures with e.g., Tru64
 +      make.
 +      * tests/autodist-subdir.test: Likewise.
 +      * tests/backcompat.test: Likewise.
 +      * tests/backcompat6.test: Likewise.
 +      * tests/colon7.test: Likewise.
 +      * tests/posixsubst-scripts.test: Likewise.
 +      * tests/posixsubst-sources.test: Likewise.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: tweak, improve and extend tests on lisp support
 +      * tests/lisp2.test: Prettify, and improve debugging output.  Make
 +      grepping of automake stderr stricter.
 +      * tests/lisp7.test: Ensure verbose printing of captured make
 +      output.  Add trailing `:' command.
 +      * tests/lisp8.test: Likewise.
 +      * tests/lisp3.test: Likewise.  Also, check that `.el' files and
 +      compiled `.elc' files get installed by "make install", and
 +      uninstalled by "make uninstall".
 +      * tests/lisp4.test: Ensure installed `.el' files gets removed by
 +      "make uninstall".  Related changes.  Add trailing `:' command.
 +      * tests/lisp5.test: Likewise.
 +      * tests/lisp6.test: Use proper m4 quoting in configure.in.  Fix
 +      use of blank lines, to improve clarity and symmetry.  Fix typo in
 +      comment.  Add trailing `:' command.
 +
 +2011-07-16  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: drop useless requirement in 'license.test'
 +      * tests/license.test: Drop  useless requirement "makeinfo".  Add
 +      an extra blank line, for clarity.
 +
 +2011-07-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests defs: more uses of $top_testsrcdir
 +      * tests/autodist-stamp-vti.test: Use `$top_testsrcdir' instead
 +      of `$testsrcdir/..'.
 +      * tests/repeated-options.test: Likewise.
 +      * tests/suffix5.test: Likewise.
 +      * tests/vtexi3.test: Likewise.
 +
 +2011-07-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      self tests: fix typo in comment
 +      * tests/self-check-exit.test: Fix typo in heading comments.
 +
 +2011-07-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: remove redundant settings of `errexit' shell flag
 +      * tests/amhello-binpkg.test: Do not set the `errexit' shell
 +      flag, as it is already set by `tests/defs'.
 +      * tests/amhello-cflags.test: Likewise.
 +      * tests/amhello-cross-compile.test: Likewise.
 +      * tests/ansi2knr-deprecation.test: Likewise.
 +      * tests/autodist-no-duplicate.test: Likewise.
 +      * tests/distcheck-configure-flags-am.test: Likewise.
 +      * tests/distcheck-configure-flags-subpkg.test: Likewise.
 +      * tests/distcheck-configure-flags.test: Likewise.
 +      * tests/distcheck-hook.test: Likewise.
 +      * tests/distcheck-hook2.test: Likewise.
 +      * tests/parallel-tests-am_tests_environment.test: Likewise.
 +      * tests/parallel-tests-harderror.test: Likewise.
 +      * tests/parallel-tests-log-compiler-example.test: Likewise.
 +      * tests/parallel-tests-log-override-1.test: Likewise.
 +      * tests/parallel-tests-log-override-2.test: Likewise.
 +      * tests/parallel-tests-log-override-recheck.test: Likewise.
 +      * tests/primary-prefix-couples-documented-valid.test: Likewise.
 +      * tests/primary-prefix-couples-force-valid.test: Likewise.
 +      * tests/primary-prefix-invalid-couples.test: Likewise.
 +      * tests/primary-prefix-valid-couples.test: Likewise.
 +      * tests/remake-subdir-from-subdir.test: Likewise.
 +      * tests/remake-subdir-gnu.test: Likewise.
 +      * tests/remake-subdir-long-time.test: Likewise.
 +      * tests/remake-subdir.test: Likewise.
 +      * tests/remake-subdir2.test: Likewise.
 +      * tests/silent-configsite.test: Likewise.
 +      * tests/tests-environment-backcompat.test: Likewise.
 +
 +2011-06-29   Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      docs: explain why AM_TESTS_ENVIRONMENT must be semicolon-terminated
 +      * doc/automake.texi (Simple Tests using parallel-tests): Ditto, and
 +      related adjustments.
 +      Suggestion by Ralf Wildenhues.
 +
 +2011-06-29  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      docs: fix unportable example of AM_TESTS_ENVIRONMENT usage
 +      * doc/automake.texi (Simple Tests using parallel-tests): The
 +      old example on AM_TESTS_ENVIRONMENT relied on unportable shell
 +      features, and in particular didn't work with various Korn
 +      Shells (see also commit `v1.11-925-g29ca903').  Give another
 +      example, simpler this time, but still inspired to real-world
 +      usage (the GNU coreutils testsuite).
 +
+ 2011-06-28   Stefano Lattarini  <stefano.lattarini@gmail.com>
+       yacc tests: fix bug in 'yacc-cxx.test'
+       * tests/yacc-cxx.test: Enable `errexit' shell flag (the lack of
+       which was masking the bug).
+       (bar.cxx): Rename to ...
+       (bar2.cxx): ... this, otherwise automake will (correctly) complain
+       that object `bar.o' is created by both `bar.cxx' and `bar.c++'.
+       (Makefile.am): Adjust.
+ 2011-06-28   Stefano Lattarini  <stefano.lattarini@gmail.com>
+       lex tests: fix spurious link errors on Solaris
+       On Solaris 10, linking of lex-generated programs was failing in a
+       couple of lex tests with errors like this:
+         g++ -g -O2 -o joe joe.o -ll
+         Undefined symbol     first referenced in file
+         yywrap()             joe.o
+         ld: fatal: Symbol referencing errors. No output written to joe
+         collect2: ld returned 1 exit status
+       This change fixes it, also fixing at once potential problems for
+       systems that don't have a "lex library" (this happens for example
+       when cross-compiling from GNU/Linux to MinGW).
+       * tests/lex-depend-cxx.test (joe.ll, moe.l++): Define a dummy
+       `yywrap()' function.
+       * tests/lex-clean-cxx.test (mainfoo.cc, mainbar.cpp, mainbaz.c++,
+       mainqux.cxx): Likewise.
  2011-06-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        docs: avoid a footnote, some related rewordings and improvements
  
  2011-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
 -      tests: fix spurious failure of txinfo21.test on FreeBSD
 -      * tests/txinfo21.test: Use the `is_newest' subroutine instead of
 -      the `ls -t' hack to to determine whether a file has been updated.
 -      This is required because at least FreeBSD `ls' do not sort files
 -      with the same timestamp in alphabetical order when using the `-t'
 -      option.
 +      tests: fix spurious failure of extradep.test on FreeBSD
 +      * tests/extradep.test: When using `ls -t' to determine whether a
 +      file has been updated, make sure to use as reference a file whose
 +      timestamp is expected to be *strictly* older that that of the file
 +      being checked.  This is required because at least FreeBSD `ls' do
 +      not sort files with the same timestamp in alphabetical order when
 +      using the `-t' option.
 +      * tests/extradep2.test: Likewise.
 +
 +2011-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix spurious failure of txinfo21.test on FreeBSD
 +      * tests/txinfo21.test: Use the `is_newest' subroutine instead of
 +      the `ls -t' hack to to determine whether a file has been updated.
 +      This is required because at least FreeBSD `ls' do not sort files
 +      with the same timestamp in alphabetical order when using the `-t'
 +      option.
 +
 +2011-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix syntax error in 'silentcxx-gcc.test'
 +      * tests/silentcxx-gcc.test (for config_args in ...): Remove extra
 +      trailing backslash from the list of looped-on items.
 +
 +2011-05-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      depmod tests: fix bug in depmodes list extraction
 +      * tests/depmod-tests.sh (get_depmodes): Use `echo $all_depmodes'
 +      instead of `... | tr "$nl" "$sp"' to strip extra whitespaces and
 +      newlines from `$all_depmodes'.  The latter idiom with `tr' is
 +      wrong since it gets run before `./defs' is sourced, and thus `$nl'
 +      and `$sp' are undefined.
 +      Bug revealad by FreeBSD tr(1) implementation, which doesn't accept
 +      empty strings as arguments.
 +
 +2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests defs: use `skip_' for skipping java-related tests
 +      * tests/defs.in (java, javac): Use `skip_' to signal test
 +      skipping.
 +
 +2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: add excerpts from few original bug reports, for clarity.
 +      * tests/comment6.test: Add excerpts and/or details from the
 +      original bug report that prompted this tests to be added and/or
 +      extended.
 +      * tests/dejagnu4.test: Likewise.
 +      * tests/installdir.test: Likewise.
  
+ 2011-05-13   Stefano Lattarini  <stefano.lattarini@gmail.com>
+       lex: "make clean" removes .c files from non-distributed .l
+       Previously, while automake did *not* distribute C source and header
+       files derived from non-distributed Lex sources, it still caused
+       them to be removed only by "make maintainer-clean" only, and not by
+       simply "make clean" or "make distclean".
+       This caused "make distcheck" to fail, unless the developer put
+       those generated .c files in CLEANFILES or in DISTCLEANFILES by
+       hand.
+       This change fixes this issue, by making non-distributed `.c' files
+       generated by non-distributed Lex sources cleaned by "make clean".
+       A similar problem for Yacc support had been fixed with the commit
+       v1.11-263-ged2c8bc.
+       * tests/automake.in (lang_lex_target_hook): Make C source files
+       derived from non-distributed Lex files cleaned by "make clean",
+       not only by "make maintainer-clean".
+       * tests/lex-clean.test: New test.
+       * tests/lex-clean-cxx.test: Likewise.
+       * tests/lex-nodist.test: Likewise.
+       * tests/lex-pr204.test: Likewise.
+       * tests/pr204.test: For consistency, renamed ...
+       * tests/yacc-pr204.test: ... to this, and updated to keep it
+       more in sync with 'lex-pr204.test'.
+       * tests/yacc-nodist.test: Updated to keep it more in sync with
+       'lex-nodist.test'.
+       * tests/Makefile.am (TESTS): Update.
+       * NEWS: Update.
+ 2011-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       lex tests: make test on Lex dependency tracking more "semantic"
+       * tests/lex4.test: Renamed ...
+       * tests/lex-depend-grep.test: ... to this, and extended.
+       * tests/lex-depend.test, tests/lex-depend-cxx.test: ... these
+       new tests.
+       * tests/Makefile.am (TESTS): Update.
+ 2011-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       lex tests: remove erroneous check about ylwrap distribution
+       * tests/lex5.test: Do not check that the ylwrap script is *not*
+       distributed when there is only one lexer, as ylwrap is in fact
+       expected to distributed unconditionally (at least starting from
+       commit `Release-1-9-323-gc5881cc' of 19-08-2006).  Note that this
+       bogus check wasn't triggering any failure because it was done at
+       the wrong time (i.e. from the VPATH build directory), so that it
+       could never fail anyway.
+       Instead, check that ylwrap is distributed even when there is only
+       one lexer.
+       Since we are at it, add a couple of `ls -l' calls, to get better
+       debugging info.
+ 2011-05-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       yacc tests: "make clean" removes C++ files from non-distributed .y
+       * tests/yacc-clean-cxx.test: New test, sister of `yacc-clean.test'.
+       * tests/yacc-clean.test: Update heading comment to reference the
+       new sister test.
+       * tests/Makefile.am (TESTS): Update.
+ 2011-05-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: add a workaround for automake bug#8485
+       * tests/yacc-d-cxx.test (Makefile.am): Add temporary workaround
+       for automake bug#8485.  The bug is still exposed by the testcase
+       'yacc-dist-nobuild-subdir.test'.
+ 2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests: add a couple of inter-tests reference
+       * tests/yacc-nodist.test, tests/pr204.test: These tests are
+       related, so add references to each other in heading comments.
+ 2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       lex tests: require just `lex' instead of `flex'
+       * tests/lex-subobj-nodep.test ($required): Require `lex',
+       not `flex', as this test is expected to work with any lex
+       implementation.
+       * tests/silent-lex.test: Likewise.
+ 2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests defs: use `skip_' for skipping yacc/lex related tests
+       * tests/defs.in (lex, bison): Use `skip_' to signal test skipping.
+ 2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+       tests defs: merge cleanup
+       * tests/defs.in (flex, bison): Requirements removed, we have real
+       `lex' and `yacc' requirements now.
  2011-05-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        tests defs: allow requirements for compilers (mostly dummy)
        character in double-quoted string.  Fix a bug in which the rule
        emitted an erroneously empty substring in its error message.
  
 +2011-04-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: fix typo in python5b.test
 +      * tests/python5b.test: Remove extra `:' from $PATH redefinition.
 +
  2011-04-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
-       coverage: test for automake bug#8485 (known regression)
-       * tests/yacc-dist-nobuild-subdir.test: New test.
-       * tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+       lex/yacc tests: remove redundant $distdir definition
+       * tests/lex3.test ($distdir): Remove definition, that's already
+       done in `tests/defs'.
+       * tests/lexvpath.test: Likewise.
+       * tests/yacc-basic.test: Likewise.
+       * tests/yacc-cxx.test: Likewise.
+       * tests/yacc-d-basic.test: Likewise.
+       * tests/yacc-d-cxx.test: Likewise.
+       * tests/yacc-d-vpath.test: Likewise.
+       * tests/yacc-dist-nobuild-subdir.test: Likewise.
+       * tests/yacc-dist-nobuild.test: Likewise.
+       * tests/yacc-mix-c-cxx.test: Likewise.
+       * tests/yaccvpath.test: Likewise.
  
 +2011-04-14  Stefano Lattarini  <stefano.lattarini@gmail.com>
 +
 +      tests: remove redundant settings of `errexit' shell flag
 +      * tests/autodist-acconfig.test: Do not set the `errexit'
 +      shell flag, as it is already set by `tests/defs'.
 +      * tests/autodist-acconfig-no-subdir.test: Likewise.
 +      * tests/autodist-aclocal-m4.test: Likewise.
 +      * tests/autodist-config-headers.test: Likewise.
 +      * tests/autodist-configure-no-subdir.test: Likewise.
 +      * tests/autodist-stamp-vti.test: Likewise.
 +      * tests/autodist-subdir.test: Likewise.
 +      * tests/autodist.test: Likewise.
 +      * tests/check-exported-srcdir.test: Likewise.
 +      * tests/check-tests-in-builddir.test: Likewise.
 +      * tests/check-tests_environment.test: Likewise.
 +      * tests/help-python.test: Likewise.
 +      * tests/java-check.test: Likewise.
 +      * tests/java-extra.test: Likewise.
 +      * tests/java-noinst.test: Likewise.
 +      * tests/lex-subobj-nodep.test: Likewise.
 +      * tests/ltinit.test: Likewise.
 +      * tests/m4-inclusion.test: Likewise.
 +      * tests/maintclean-vpath.test: Likewise.
 +      * tests/parallel-tests-subdir.test: Likewise.
 +      * tests/pr8365-remake-timing.test: Likewise.
 +      * tests/python-dist.test: Likewise.
 +      * tests/python-vars.test: Likewise.
 +      * tests/python-virtualenv.test: Likewise.
 +      * tests/python5b.test: Likewise.
 +      * tests/specflg-dummy.test: Likewise.
 +      * tests/yacc-dist-nobuild-subdir.test: Likewise.
 +
  2011-04-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
  
        test defs: define default $distdir (help reducing duplication)
diff --cc NEWS
--- 1/NEWS
--- 2/NEWS
+++ b/NEWS
 -New in 1.11.0a:
 +New in 1.11a:
 +
 +* Obsolete features removed:
 +
 +  - Support for automatic de-ANSI-fication has been removed.
 +
 +  - The support for the "obscure" multilib feature has been removed
 +    from Automake core (but remains available in the 'contrib/'
 +    directory of the Automake distribution).
 +
 +  - Support for ".log -> .html" conversion and the check-html and
 +    recheck-html targets has been removed from Automake core (but
 +    remains available in the 'contrib/' directory of the Automake
 +    distribution).
 +
 +  - The deprecated `lzma' compression format for distribution archives
 +    has been removed, in favor of `xz' and `lzip'.
 +
 +  - The obsolete AM_WITH_REGEX macro has been removed.
 +
 +  - The deprecated options `--output-dir', `--Werror' and `--Wno-error'
 +    have been removed.
 +
 +* New targets:
 +
 +  - New `cscope' target to build a cscope database for the source tree.
 +
 +* Changes to Automake-generated testsuite harnesses:
 +
 +  - Test scripts that exit with status 99 to signal an "hard error" (e.g.,
 +    and unexpected or internal error, or a failure to set up the test case
 +    scenario) have their outcome reported as an 'ERROR' now.  Previous
 +    versions of automake reported such an outcome as a 'FAIL' (the only
 +    difference with normal failures being that hard errors were counted
 +    as failures even when the test originating them was listed in
 +    XFAIL_TESTS).
 +
 +  - The testsuite summary displayed by the parallel-test harness has a
 +    completely new format, that always list the numbers of passed, failed,
 +    xfailed, xpassed, skipped and errored tests, even when these numbers
 +    are zero (but using smart coloring when the color-tests option is in
 +    effect).
 +
 +  - The default testsuite driver offered by the 'parallel-tests' option is
 +    now implemented (partly at least) with the help of automake-provided
 +    auxiliary scripts (e.g., `test-driver'), instead of relying entirely
 +    on code in the generated Makefile.in.
 +    This has two noteworthy implications.  The first one is that projects
 +    using the `parallel-tests' option should now either run automake with
 +    the `--add-missing' option, or manually copy the `test-driver' script
 +    into their tree.  The second, and more important, implication is that
 +    now, when the `parallel-tests' option is in use, TESTS_ENVIRONMENT can
 +    not be used anymore to define a test runner, and the command specified
 +    in LOG_COMPILER (and <ext>_LOG_COMPILER) must be a *real* executable
 +    program or script.  For example, this is still a valid usage (albeit
 +    a little contorted):
 +
 +      TESTS_ENVIRONMENT = \
 +        if test -n '$(STRICT_TESTS)'; then \
 +          maybe_errexit='-e'; \
 +        else \
 +          maybe_errexit=''; \
 +        fi;
 +      LOG_COMPILER = $(SHELL) $$maybe_errexit
 +
 +    while this is not anymore:
 +
 +      TESTS_ENVIRONMENT = \
 +        $(SHELL) `test -n '$(STRICT_TESTS_CHECKING)' && echo ' -e'`
 +
 +    neither is this:
 +
 +      TESTS_ENVIRONMENT = \
 +        run_with_perl_or_shell () \
 +        { \
 +          if grep -q '^#!.*perl' $$1; then
 +            $(PERL) $$1; \
 +          else \
 +            $(SHELL) $$1; \
 +          fi; \
 +        }
 +      LOG_COMPILER = run_with_per_or_shell
 +
 +  - The package authors can now use customary testsuite drivers within
 +    the framework provided by the 'parallel-tests' testsuite harness.
 +    Consistently with the existing syntax, this can be done by defining
 +    special makefile variables `LOG_DRIVER' and `<ext>_LOG_DRIVER'.
 +
 +  - A new developer-reserved variable `AM_TESTS_FD_REDIRECT' can be used
 +    to redirect/define file descriptors used by the test scripts.
 +
 +  - The parallel-tests harness generates now, in addition the `.log' files
 +    holding the output produced by the test scripts, a new set of `.trs'
 +    files, holding "metadata" derived by the execution of the test scripts;
 +    among such metadata are the outcomes of the test cases run by a script.
 +
 +  - Initial and still experimental support for the TAP test protocol is
 +    now provided.
 +
++* Changes to Yacc and Lex support:
 -* WARNING: Future backward-incompatibilities!
++  - C source and header files derived from non-distributed Yacc and/or
++    Lex sources are now removed by a simple "make clean" (while they were
++    previously removed only "make maintainer-clean").
 -  - The support for the "obscure" multilib feature has been deprecated,
 -    and will be moved out of the automake core in the next major Automake
 -    release (1.12).
++  - Slightly backward-incompatible change, relevant only for use of Yacc
++    with C++: the extensions of the header files produced by the Yacc
++    rules are now modelled after extension of the sources corresponding
++    sources.  For example, yacc files named "foo.y++" and "bar.yy" will
++    produce header files named respectively "foo.h++" and "bar.hh", where
++    they would have previously produced header files named simply "foo.h"
++    and "bar.h".  This change offers better compatibility with `bison -o'.
 -  - The support for ".log -> .html" conversion and the check-html and
 -    recheck-html targets will be removed in the next major Automake
 -    release (1.12).
++  - C source and header files derived from non-distributed Yacc sources
++    are now removed by "make clean", not only by "make maintainer-clean".
 -  - The `lzma' compression format for distribution archives has been
 -    deprecated in favor of `xz' and `lzip', and will be removed in the
 -    next major Automake release (1.12).
 +* Miscellaneous changes:
  
 -  - The Automake support for automatic de-ANSI-fication will be removed in
 -    the next major Automake release (1.12).
 +  - The `dist' and `dist-all' targets now can run compressors in parallel.
  
 -  - The `--acdir' option of aclocal is deprecated, and will probably be
 -    removed in the next major Automake release (1.12).
 +  - Automake can now generate silenced rules for texinfo outputs.
  
 -  - The exact order in which the directories in the aclocal macro
 -    search path are looked up is probably going to be changed in the
 -    next Automake release (1.12).
 +  - Some auxiliary files that are automatically distributed by Automake
 +    (e.g., `install-sh', or the `depcomp' script for packages compiling
 +    C sources) might now be listed in the DIST_COMMON variable in many
 +    Makefile.in files, rather than in the top-level one.
  
 -  - The obsolescent AM_WITH_REGEX  macro has been deprecated (since the
 -    GNU rx library has been decommissioned), and will be removed in the
 -    next major Automake release (1.12).
 +  - Messages of types warning or error from `automake' and `aclocal'
 +    are now prefixed with the respective type, and presence of -Werror
 +    is noted.
  
 -* Changes to aclocal:
 +  - Automake's early configure-time sanity check now tries to avoid
 +    sleeping for a second, which slowed down cached configure runs
 +    noticeably.  In that case, it will check back at the end of the
 +    configure script to ensure that at least one second has passed, to
 +    avoid time stamp issues with makefile rules rerunning autotools
 +    programs.
  
 -  - The `--acdir' option is deprecated.  Now you should use the new options
 -    `--automake-acdir' and `--system-acdir' instead.
 +  - For programs and libraries, automake now detect EXTRA_foo_DEPENDENCIES
 +    and adds them to the normal list of dependencies, but without
 +    overwriting the foo_DEPENDENCIES variable, which is normally computed
 +    by automake.
  
-   - C source and header files derived from non-distributed Yacc sources
-     are now removed by "make clean", not only by "make maintainer-clean".
 -  - The `ACLOCAL_PATH' environment variable is now interpreted as a
 -    colon-separated list of additional directories to search after the
 -    automake internal acdir (by default ${prefix}/share/aclocal-APIVERSION)
 -    and before the system acdir (by default ${prefix}/share/aclocal).
 +  - The warnings in the category `extra-portability' are now enabled by
 +    `-Wall'.  In previous versions, one has to use `-Wextra-portability'
 +    to enable them.
 +
 +Bugs fixed in 1.11a:
 +
 +  - Various minor bugfixes.
 +
 +* Bugs introduced by 1.11:
 +
 +  - The AM_COND_IF macro also works if the shell expression for the
 +    conditional is no longer valid for the condition.
 +
 +* Long-standing bugs:
 +
 +  - Automake's own build system finally have a real "installcheck" target.
 +
 +  - Files listed with the AC_REQUIRE_AUX_FILE macro in configure.ac are
 +    now automatically distributed also if the directory of the auxiliary
 +    files coincides with the top-level directory.
 +
 +  - Automake now detects the presence of the `-d' flag in the various
 +    `*YFLAGS' variables even when their definitions involve indirections
 +    through other variables, such as in:
 +      foo_opts = -d
 +      AM_YFLAGS = $(foo_opts)
 +
 +  - Automake now complains if a `*YFLAGS' variable has any conditional
 +    content, not only a conditional definition.
 +
 +  - Explicit enabling and/or disabling of Automake warning categories
 +    through the `-W...' options now always takes precedence over the
 +    implicit warning level implied by Automake strictness (foreign, gnu
 +    or gnits), regardless of the order in which such strictness and
 +    warning flags appear.  For example, a setting like:
 +      AUTOMAKE_OPTIONS = -Wall --foreign
 +    will cause the warnings in category `portability' to be enabled, even
 +    if those warnings are by default disabled in `foreign' strictness.
 +
 +\f
 +New in 1.11.2a:
 +
 +* WARNING: Future backward-incompatibilities!
 +
 +  - The obsolescent AM_WITH_REGEX  macro has been deprecated, since the
 +    GNU rx library has been decommissioned.
 +
 +  - The `lzma' compression format for distribution archives has been
 +    deprecated in favor of `xz' and `lzip'.
 +
 +  - The `--acdir' option of aclocal is deprecated, and will probably be
 +    removed in the next major Automake release (1.12). [FIXME]
 +
 +  - The exact order in which the directories in the aclocal macro
 +    search path are looked up is probably going to be changed in the
 +    next Automake release (1.12). [FIXME]
  
  * Miscellaneous changes:
  
diff --cc automake.in
Simple merge
diff --cc configure.ac
Simple merge
Simple merge
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
 +# Run the tests with the shell detected at configure time.
 +LOG_COMPILER = $(SHELL)
 +
 +TEST_EXTENSIONS = .pl .test .tap
 +TEST_LOG_COMPILER = $(LOG_COMPILER)
 +TAP_LOG_COMPILER = $(LOG_COMPILER)
 +PL_LOG_COMPILER = $(PERL)
 +AM_PL_LOG_FLAGS = -Mstrict -I $(top_builddir)/lib -I $(top_srcdir)/lib -w
 +
 +TAP_LOG_DRIVER = AM_TAP_AWK='$(AWK)' $(SHELL) $(top_srcdir)/lib/tap-driver.sh
 +
 +AM_TAP_LOG_DRIVER_FLAGS = --merge
 +
 +EXTRA_DIST = is ChangeLog-old
 +
 +TESTS = ## Will be updated later.
 +
  XFAIL_TESTS = \
  all.test \
 -auxdir2.test \
+ yacc-bison-skeleton-cxx.test \
+ yacc-bison-skeleton.test \
  cond17.test \
 -dist-auxfile.test \
 -dist-auxfile-2.test \
  gcj6.test \
 +override-conditional-2.test \
  java-nobase.test \
  objext-pr10128.test \
  pr8365-remake-timing.test \
@@@ -115,78 -131,8 +117,80 @@@ EXTRA_DIST += tap-functions.sh plain-fu
  distcheck-missing-m4.log distcheck-outdated-m4.log: distcheck-hook-m4.am
  EXTRA_DIST += distcheck-hook-m4.am
  
 -# Each test case depends on defs, aclocal, and automake.
 -check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 +# Keep in sync with AC_SUBST'd stuff in defs-static.in.
 +do_subst = sed \
 +  -e 's|@abs_srcdir[@]|$(abs_srcdir)|g' \
 +  -e 's|@abs_top_srcdir[@]|$(abs_top_srcdir)|g' \
 +  -e 's|@abs_builddir[@]|$(abs_builddir)|g' \
 +  -e 's|@abs_top_builddir[@]|$(abs_top_builddir)|g' \
 +  -e 's|@prefix[@]|$(prefix)|g' \
 +  -e 's|@amdir[@]|$(amdir)|g' \
 +  -e 's|@bindir[@]|$(bindir)|g' \
 +  -e 's|@datadir[@]|$(datadir)|g' \
 +  -e 's|@docdir[@]|$(docdir)|g' \
 +  -e 's|@automake_acdir[@]|$(automake_acdir)|g' \
 +  -e 's|@system_acdir[@]|$(system_acdir)|g' \
 +  -e 's|@scriptdir[@]|$(scriptdir)|g' \
 +  -e 's|@pkgvdatadir[@]|$(pkgvdatadir)|g' \
 +  -e 's|@host_alias[@]|$(host_alias)|g' \
 +  -e 's|@build_alias[@]|$(build_alias)|g' \
 +  -e 's|@APIVERSION[@]|$(APIVERSION)|g' \
 +  -e 's|@PATH_SEPARATOR[@]|$(PATH_SEPARATOR)|g' \
 +  -e 's|@SHELL[@]|$(SHELL)|g' \
 +  -e 's|@PERL[@]|$(PERL)|g' \
 +  -e 's|@EGREP[@]|$(EGREP)|g' \
 +  -e 's|@FGREP[@]|$(FGREP)|g' \
 +  -e 's|@CPPFLAGS[@]|$(CPPFLAGS)|g' \
 +  -e 's|@CC[@]|$(CC)|g' \
 +  -e 's|@CFLAGS[@]|$(CFLAGS)|g' \
 +  -e 's|@CXX[@]|$(CXX)|g' \
 +  -e 's|@CXXFLAGS[@]|$(CXXFLAGS)|g' \
 +  -e 's|@F77[@]|$(F77)|g' \
 +  -e 's|@FFLAGS[@]|$(FFLAGS)|g' \
 +  -e 's|@FC[@]|$(FC)|g' \
 +  -e 's|@FCFLAGS[@]|$(FCFLAGS)|g' \
 +  -e 's|@GNU_CFLAGS[@]|$(GNU_CFLAGS)|g' \
 +  -e 's|@GNU_CXXFLAGS[@]|$(GNU_CXXFLAGS)|g' \
 +  -e 's|@GNU_FFLAGS[@]|$(GNU_FFLAGS)|g' \
 +  -e 's|@GNU_FCFLAGS[@]|$(GNU_FCFLAGS)|g' \
++  -e 's|@YACC[@]|$(YACC)|g' \
++  -e 's|@LEX[@]|$(LEX)|g' \
 +  -e 's|@TEX[@]|$(TEX)|g' \
 +  -e 's|@MODIFICATION_DELAY[@]|$(MODIFICATION_DELAY)|g' \
 +  -e 's|@am_AUTOCONF[@]|$(am_AUTOCONF)|g' \
 +  -e 's|@am_AUTOM4TE[@]|$(am_AUTOM4TE)|g' \
 +  -e 's|@am_AUTORECONF[@]|$(am_AUTORECONF)|g' \
 +  -e 's|@am_AUTOHEADER[@]|$(am_AUTOHEADER)|g' \
 +  -e 's|@am_AUTOUPDATE[@]|$(am_AUTOUPDATE)|g' \
 +  -e 's|@sh_errexit_works[@]|$(sh_errexit_works)|g' \
 +  -e 's|@configure_input[@]|Generated from $@.in.  DO NOT EDIT BY HAND!|'
 +
 +defs-static: defs-static.in
 +      $(AM_V_at)rm -f $@ $@-t
 +      $(AM_V_GEN)$(do_subst) $(srcdir)/defs-static.in >$@-t
 +      $(AM_V_at) : Sanity check on the substitutions; \
 +      if LC_ALL=C grep '@[a-zA-Z0-9_][a-zA-Z0-9_]*@' $@-t; then \
 +        echo "$@ contains unexpanded substitution (see lines above)"; \
 +        exit 1; \
 +      fi
 +      $(AM_V_at)chmod a-w $@-t && mv -f $@-t $@
 +EXTRA_DIST += defs-static.in
 +CLEANFILES = defs-static
 +
 +# If two test scripts have the same basename, they will end up sharing
 +# the same log file, leading to all sort of undefined and undesired
 +# behaviours.
 +check-no-repeated-test-name:
 +      @LC_ALL=C; export LC_ALL; \
 +       lst='$(TEST_LOGS)'; for log in $$lst; do echo $$log; done \
 +         | sort | uniq -c | awk '($$1 > 1) { print }' \
 +         | sed 's/\.log$$//' | grep . >&2 \
 +         && { \
 +           echo $@: test names listed above are duplicated >&2; \
 +           exit 1; \
 +         }; :
 +check-local: check-no-repeated-test-name
 +.PHONY: check-no-repeated-test-name
  
  ## Checking the list of tests.
  test_subdirs = . pm
  # Check rules output for parser defined conditionally.
  # Report from Roman Fietze.
  
- required='cc flex yacc'
 -required='lex yacc gcc'
++required='cc lex yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<'EOF'
 -AM_CONDITIONAL([CASE_A], test -z "$case_B")
 +AM_CONDITIONAL([CASE_A], [test -z "$case_B"])
  AC_PROG_CC
  AM_PROG_LEX
  AC_PROG_YACC
diff --cc tests/defs
index 03766ea,0000000..93c72b7
mode 100644,000000..100644
--- /dev/null
@@@ -1,1122 -1,0 +1,1153 @@@
-     flex)
-       # Since flex is required, we pick LEX for ./configure.
-       LEX=flex
 +# -*- shell-script -*-
 +#
 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 +# 2005, 2006, 2007, 2008, 2009, 2010, 2011, 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 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/>.
 +
 +########################################################
 +###  IMPORTANT NOTE: keep this file 'set -e' clean.  ###
 +########################################################
 +
 +# NOTE: This file should execute correctly with any system's /bin/sh
 +# shell, and not only with configure-time detected $CONFIG_SHELL,
 +# *until differently and explicitly specified*.
 +
 +## -------------------------------------------------------- ##
 +##  Source static setup and definitions for the testsuite.  ##
 +## -------------------------------------------------------- ##
 +
 +# Ensure we are running from the right directory.
 +test -f ./defs-static || {
 +   echo "$0: ./defs-static: not found in current directory" >&2
 +   exit 99
 +}
 +
 +# Source the shell sanitization and variables' definitions.
 +. ./defs-static || exit 99
 +
 +# Enable the errexit shell flag early.
 +set -e
 +
 +# The name of the current test (without the `.test' suffix).
 +# Test scripts can override it if they need to (but this should
 +# be done carefully, and *before* including ./defs).
 +if test -z "$me"; then
 +  # Guard against failure to spawn sed (seen on MSYS), or empty $argv0.
 +  me=`echo "$argv0" | sed -e 's,.*[\\/],,;s/\.test$//;s/\.tap$//;'` \
 +    && test -n "$me" \
 +    || { echo "$argv0: failed to define \$me" >&2; exit 99; }
 +fi
 +
 +## ---------------------- ##
 +##  Early sanity checks.  ##
 +## ---------------------- ##
 +
 +# A single whitespace character.
 +sp=' '
 +# A tabulation character.
 +tab=' '
 +# A newline character.
 +nl='
 +'
 +
 +# As autoconf-generated configure scripts do, ensure that IFS
 +# is defined initially, so that saving and restoring $IFS works.
 +IFS=$sp$tab$nl
 +
 +# Ensure $testsrcdir is set correctly.
 +test -f "$testsrcdir/defs-static.in" || {
 +   echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
 +   exit 99
 +}
 +
 +# Ensure $testbuilddir is set correctly.
 +test -f "$testbuilddir/defs-static" || {
 +   echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
 +   exit 99
 +}
 +
 +
 +## ------------------------------------ ##
 +##  Ensure we run with a proper shell.  ##
 +## ------------------------------------ ##
 +
 +# Make sure we run with the shell detected at configure time (unless
 +# the user forbids it).
 +case ${AM_TESTS_REEXEC-yes} in
 +  n|no|false|0)
 +    ;;
 +  *)
 +    # Ensure we can find ourselves.
 +    if test ! -f "$0"; then
 +      echo "$me: unable to find myself: $0" >&2
 +      exit 99
 +    fi
 +    AM_TESTS_REEXEC=no; export AM_TESTS_REEXEC
 +    # Cannot simply do `opts=$-', since the content of $- is not
 +    # portable among different shells.  So try to propagate only
 +    # the portable and interesting options.
 +    case $- in
 +      *x*v*|*v*x) opts=-vx;;
 +      *v*) opts=-v;;
 +      *x*) opts=-x;;
 +      *) opts=;;
 +    esac
 +    echo $me: exec $SHELL $opts "$0" "$*"
 +    exec $SHELL $opts "$0" ${1+"$@"} || {
 +      echo "$me: failed to re-execute with $SHELL" >&2
 +      exit 99
 +    }
 +    ;;
 +esac
 +
 +# NOTE: From this point on, we can assume this file is being executed
 +# by the configure-time detected $CONFIG_SHELL.
 +
 +
 +## ----------------------- ##
 +##  Early debugging info.  ##
 +## ----------------------- ##
 +
 +echo "Running from installcheck: $am_running_installcheck"
 +echo "Using TAP: $am_using_tap"
 +echo "PATH = $PATH"
 +
 +
 +## ---------------------- ##
 +##  Environment cleanup.  ##
 +## ---------------------- ##
 +
 +# Temporarily disable this, since some shells (e.g., older version
 +# of Bash) can return a non-zero exit status upon the when a non-set
 +# variable is unset.
 +set +e
 +
 +# Unset some make-related variables that may cause $MAKE to act like
 +# a recursively invoked sub-make.  Any $MAKE invocation in a test is
 +# conceptually an independent invocation, not part of the main
 +# 'automake' build.
 +unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL
 +unset __MKLVL__ MAKE_JOBS_FIFO                     # For BSD make.
 +unset DMAKE_CHILD DMAKE_DEF_PRINTED DMAKE_MAX_JOBS # For Solaris dmake.
 +# Unset verbosity flag.
 +unset V
 +# Also unset variables that will let `make -e install' divert
 +# files into unwanted directories.
 +unset DESTDIR
 +unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
 +unset htmldir includedir infodir libdir libexecdir localedir mandir
 +unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
 +# Unset variables that might change the "make distcheck" behaviour.
 +unset DISTCHECK_CONFIGURE_FLAGS AM_DISTCHECK_CONFIGURE_FLAGS
 +# The tests call `make -e' but we do not want $srcdir from the environment
 +# to override the definition from the Makefile.
 +unset srcdir
 +# Also unset variables that control our test driver.  While not
 +# conceptually independent, they cause some changed semantics we
 +# need to control (and test for) in some of the tests to ensure
 +# backward-compatible behavior.
 +unset TESTS_ENVIRONMENT AM_TESTS_ENVIRONMENT
 +unset DISABLE_HARD_ERRORS
 +unset AM_COLOR_TESTS
 +unset TESTS
 +unset XFAIL_TESTS
 +unset TEST_LOGS
 +unset TEST_SUITE_LOG
 +unset RECHECK_LOGS
 +unset VERBOSE
 +for pfx in TEST_ TAP_ ''; do
 +  unset ${pfx}LOG_COMPILER
 +  unset ${pfx}LOG_COMPILE # Not a typo!
 +  unset ${pfx}LOG_FLAGS
 +  unset AM_${pfx}LOG_FLAGS
 +  unset ${pfx}LOG_DRIVER
 +  unset ${pfx}LOG_DRIVER_FLAGS
 +  unset AM_${pfx}LOG_DRIVER_FLAGS
 +done
 +unset pfx
 +
 +# Re-enable, it had been temporarily disabled above.
 +set -e
 +
 +## ---------------------------- ##
 +##  Auxiliary shell functions.  ##
 +## ---------------------------- ##
 +
 +# Tell whether we should keep the test directories around, even in
 +# case of success.  By default, we don't.
 +am_keeping_testdirs ()
 +{
 +  case $keep_testdirs in
 +     ""|n|no|NO) return 1;;
 +              *) return 0;;
 +  esac
 +}
 +
 +# This is used in `Exit' and in the exit trap.  See comments in the latter
 +# for more information,
 +am__test_skipped=no
 +
 +# We use a trap below for cleanup.  This requires us to go through
 +# hoops to get the right exit status transported through the signal.
 +# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
 +# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
 +# sh inside this function.
 +Exit ()
 +{
 +  set +e
 +  # See comments in the exit trap for the reason we do this.
 +  test 77 = $1 && am__test_skipped=yes
 +  (exit $1); exit $1
 +}
 +
 +if test $am_using_tap = yes; then
 +  am_funcs_file=tap-functions.sh
 +else
 +  am_funcs_file=plain-functions.sh
 +fi
 +
 +if test -f "$testsrcdir/$am_funcs_file"; then
 +  . "$testsrcdir/$am_funcs_file" || {
 +    echo "$me: error sourcing $testsrcdir/$am_funcs_file" >&2
 +    Exit 99
 +  }
 +else
 +  echo "$me: $testsrcdir/$am_funcs_file not found, check \$testsrcdir" >&2
 +  Exit 99
 +fi
 +unset am_funcs_file
 +
 +# cross_compiling
 +# ---------------
 +# Tell whether we are cross-compiling.  This is especially useful to skip
 +# tests (or portions of them) that requires a native compiler.
 +cross_compiling ()
 +{
 +  # Quoting from the autoconf manual:
 +  #   ... [$host_alias and $build both] default to the result of running
 +  #   config.guess, unless you specify either --build or --host.  In
 +  #   this case, the default becomes the system type you specified.
 +  #   If you specify both, *and they're different*, configure enters
 +  #   cross compilation mode (so it doesn't run any tests that require
 +  #   execution).
 +  test x"$host_alias" != x && test x"$build_alias" != x"$host_alias"
 +}
 +
 +# is_newest FILE FILES
 +# --------------------
 +# Return false if any file in FILES is newer than FILE.
 +# Resolve ties in favor of FILE.
 +is_newest ()
 +{
 +  is_newest_files=`find "$@" -prune -newer "$1"`
 +  test -z "$is_newest_files"
 +}
 +
 +# is_blocked_signal SIGNAL-NUMBER
 +# --------------------------------
 +# Return success if the given signal number is blocked in the shell,
 +# return a non-zero exit status and print a proper diagnostic otherwise.
 +is_blocked_signal ()
 +{
 +  # Use perl, since trying to do this portably in the shell can be
 +  # very tricky, if not downright impossible.  For reference, see:
 +  # <http://lists.gnu.org/archive/html/bug-autoconf/2011-09/msg00004.html>
 +  if $PERL -w -e '
 +    use strict;
 +    use warnings FATAL => "all";
 +    use POSIX;
 +    my %oldsigaction = ();
 +    sigaction('"$1"', 0, \%oldsigaction);
 +    exit ($oldsigaction{"HANDLER"} eq "IGNORE" ? 0 : 77);
 +  '; then
 +    return 0
 +  elif test $? -eq 77; then
 +    return 1
 +  else
 +    fatal_ "couldn't determine whether signal $1 is blocked"
 +  fi
 +}
 +
 +# AUTOMAKE_run [-e STATUS] [-d DESCRIPTION] [--] [AUTOMAKE-ARGS...]
 +# -----------------------------------------------------------------
 +# Run automake with AUTOMAKE-ARGS, and fail if it doesn't exit with
 +# STATUS.  Should be polymorphic for TAP and "plain" tests.  The
 +# DESCRIPTION, when provided, is used for console reporting, only if
 +# the TAP protocol is in use in the current test script.
 +AUTOMAKE_run ()
 +{
 +  am__desc=
 +  am__exp_rc=0
 +  while test $# -gt 0; do
 +    case $1 in
 +      -d) am__desc=$2; shift;;
 +      -e) am__exp_rc=$2; shift;;
 +      --) shift; break;;
 +       # Don't fail on unknown option: assume they (and the rest of the
 +       # command line) are to be passed verbatim to automake (so stop our
 +       # own option parsing).
 +       *) break;;
 +    esac
 +    shift
 +  done
 +  am__got_rc=0
 +  $AUTOMAKE ${1+"$@"} >stdout 2>stderr || am__got_rc=$?
 +  cat stderr >&2
 +  cat stdout
 +  if test $am_using_tap != yes; then
 +    test $am__got_rc -eq $am__exp_rc || Exit 1
 +    return
 +  fi
 +  if test -z "$am__desc"; then
 +    if test $am__got_rc -eq $am__exp_rc; then
 +      am__desc="automake exited $am__got_rc"
 +    else
 +      am__desc="automake exited $am__got_rc, expecting $am__exp_rc"
 +    fi
 +  fi
 +  command_ok_ "$am__desc" test $am__got_rc -eq $am__exp_rc
 +}
 +
 +# AUTOMAKE_fails [-d DESCRIPTION] [OPTIONS...]
 +# --------------------------------------------
 +# Run automake with OPTIONS, and fail if doesn't exit with status `1'.
 +# Should be polymorphic for TAP and "plain" tests.  The DESCRIPTION,
 +# when provided, is used for console reporting, only if the TAP
 +# protocol is in use in the current test script.
 +AUTOMAKE_fails ()
 +{
 +  AUTOMAKE_run -e 1 ${1+"$@"}
 +}
 +
 +# extract_configure_help { --OPTION | VARIABLE-NAME } [FILES]
 +# -----------------------------------------------------------
 +# Use this to extract from the output of `./configure --help' (or similar)
 +# the description or help message associated to the given --OPTION or
 +# VARIABLE-NAME.
 +extract_configure_help ()
 +{
 +  am__opt_re='' am__var_re=''
 +  case $1 in
 +    --*'=')   am__opt_re="^  $1";;
 +    --*'[=]') am__opt_re='^  '`printf '%s\n' "$1" | sed 's/...$//'`'\[=';;
 +    --*)      am__opt_re="^  $1( .*|$)";;
 +      *)      am__var_re="^  $1( .*|$)";;
 +  esac
 +  shift
 +  if test x"$am__opt_re" != x; then
 +    LC_ALL=C awk '
 +      /'"$am__opt_re"'/        { print; do_print = 1; next; }
 +      /^$/                     { do_print = 0; next }
 +      /^  --/                  { do_print = 0; next }
 +      (do_print == 1)          { print }
 +    ' ${1+"$@"}
 +  else
 +    LC_ALL=C awk '
 +      /'"$am__var_re"'/        { print; do_print = 1; next; }
 +      /^$/                     { do_print = 0; next }
 +      /^  [A-Z][A-Z0-9_]* /    { do_print = 0; next }
 +      /^  [A-Z][A-Z0-9_]*$/    { do_print = 0; next }
 +      (do_print == 1)          { print }
 +    ' ${1+"$@"}
 +  fi
 +}
 +
 +# grep_configure_help { --OPTION | VARIABLE-NAME } REGEXP
 +# -------------------------------------------------------
 +# Grep the section of `./configure --help' output associated with either
 +# --OPTION or VARIABLE-NAME for the given *extended* regular expression.
 +grep_configure_help ()
 +{
 +  ./configure --help > am--all-help \
 +    || { cat am--all-help; Exit 1; }
 +  cat am--all-help
 +  extract_configure_help "$1" am--all-help > am--our-help \
 +    || { cat am--our-help; Exit 1; }
 +  cat am--our-help
 +  $EGREP "$2" am--our-help || Exit 1
 +}
 +
 +# using_gmake
 +# -----------
 +# Return success if $MAKE is GNU make, return failure otherwise.
 +# Caches the result for speed reasons.
 +using_gmake ()
 +{
 +  case $am__using_gmake in
 +    yes)
 +      return 0;;
 +    no)
 +      return 1;;
 +    '')
 +      # Use --version AND -v, because SGI Make doesn't fail on --version.
 +      # Also grep for GNU because newer versions of FreeBSD make do
 +      # not complain about `--version' (they seem to silently ignore it).
 +      if $MAKE --version -v | grep GNU; then
 +        am__using_gmake=yes
 +        return 0
 +      else
 +        am__using_gmake=no
 +        return 1
 +      fi;;
 +    *)
 +      fatal_ "invalid value for \$am__using_gmake: '$am__using_gmake'";;
 +  esac
 +}
 +am__using_gmake="" # Avoid interferences from the environment.
 +
 +# make_can_chain_suffix_rules
 +# ---------------------------
 +# Return 0 if $MAKE is a make implementation that can chain suffix rules
 +# automatically, return 1 otherwise.  Caches the result for speed reasons.
 +make_can_chain_suffix_rules ()
 +{
 +  if test -z "$am__can_chain_suffix_rules"; then
 +    if using_gmake; then
 +      am__can_chain_suffix_rules=yes
 +      return 0
 +    else
 +      mkdir am__chain.dir$$
 +      cd am__chain.dir$$
 +      unindent > Makefile << 'END'
 +        .SUFFIXES: .u .v .w
 +        .u.v: ; cp $< $@
 +        .v.w: ; cp $< $@
 +END
 +      echo make can chain suffix rules > foo.u
 +      if $MAKE foo.w && diff foo.u foo.w; then
 +        am__can_chain_suffix_rules=yes
 +      else
 +        am__can_chain_suffix_rules=no
 +      fi
 +      cd ..
 +      rm -rf am__chain.dir$$
 +    fi
 +  fi
 +  case $am__can_chain_suffix_rules in
 +    yes) return 0;;
 +     no) return 1;;
 +      *) fatal_ "make_can_chain_suffix_rules: internal error";;
 +  esac
 +}
 +am__can_chain_suffix_rules="" # Avoid interferences from the environment.
 +
++# useless_vpath_rebuild
++# ---------------------
++# Tell whether $MAKE suffers of the bug triggering automake bug#7884.
++# For example, this happens with FreeBSD make, since in a VPATH build
++# it tends to rebuilt files for which there is an explicit or even just
++# a suffix rule, even if said files are already available in the VPATH
++# directory.
++useless_vpath_rebuild ()
++{
++  case $am__useless_vpath_rebuild in
++    yes) return 0;;
++     no) return 1;;
++     "") ;;
++      *) fatal_ "no_useless_builddir_remake: internal error";;
++  esac
++  if using_gmake; then
++    am__useless_vpath_rebuild=no
++    return 1
++  else
++    mkdir am__vpath.dir$$
++    cd am__vpath.dir$$
++    touch foo.a foo.b bar baz
++    mkdir build
++    cd build
++    unindent > Makefile << 'END'
++        .SUFFIXES: .a .b
++        VPATH = ..
++        all: foo.b baz
++        .PHONY: all
++        .a.b: ; cp $< $@
++        baz: bar ; cp ../baz bar
++END
++    if $MAKE all && test ! -f foo.b && test ! -f bar; then
++      am__useless_vpath_rebuild=no
++    else
++      am__useless_vpath_rebuild=yes
++    fi
++    cd ../..
++    rm -rf am__vpath.dir$$
++  fi
++}
++
++yl_distcheck () { useless_vpath_rebuild || $MAKE distcheck ${1+"$@"}; }
++
 +# seq_ - print a sequence of numbers
 +# ----------------------------------
 +# This function simulates GNU seq(1) portably.  Valid usages:
 +#  - seq LAST
 +#  - seq FIRST LAST
 +#  - seq FIRST INCREMENT LAST
 +seq_ ()
 +{
 +  case $# in
 +    0) fatal_ "seq_: missing argument";;
 +    1) seq_first=1  seq_incr=1  seq_last=$1;;
 +    2) seq_first=$1 seq_incr=1  seq_last=$2;;
 +    3) seq_first=$1 seq_incr=$2 seq_last=$3;;
 +    *) fatal_ "seq_: too many arguments";;
 +  esac
 +  # Try to avoid forks if possible.
 +  case "$BASH_VERSION" in
 +    ""|[12].*)
 +      : Not bash, or a too old bash version. ;;
 +    *)
 +      # Use eval to protect dumber shells from parsing errors.
 +      eval 'for ((i = seq_first; i <= seq_last; i += seq_incr)); do
 +              echo $i
 +            done'
 +      return 0;;
 +  esac
 +  # Else, use GNU seq if available.
 +  seq "$@" && return 0
 +  # Otherwise revert to a slower loop using expr(1).
 +  i=$seq_first
 +  while test $i -le $seq_last; do
 +    echo $i
 +    i=`expr $i + $seq_incr`
 +  done
 +}
 +
 +# rm_rf_ [FILES OR DIRECTORIES ...]
 +# ---------------------------------
 +# Recursively remove the given files or directory, also handling the case
 +# of non-writable subdirectories.
 +rm_rf_ ()
 +{
 +  test $# -gt 0 || return 0
 +  # Ignore failures in find, we are only interested in failures of the
 +  # final rm.
 +  find "$@" -type d ! -perm -700 -exec chmod u+rwx {} \; || :
 +  rm -rf "$@"
 +}
 +
 +# count_test_results total=N pass=N fail=N xpass=N xfail=N skip=N error=N
 +# -----------------------------------------------------------------------
 +# Check that a testsuite run driven by the parallel-tests harness has
 +# had the specified numbers of test results (specified by kind).
 +# This function assumes that the output of "make check" or "make recheck"
 +# has been saved in the `stdout' file in the current directory, and its
 +# log in the `test-suite.log' file.
 +count_test_results ()
 +{
 +  # Use a subshell so that we won't pollute the script namespace.
 +  (
 +    # TODO: Do proper checks on the arguments?
 +    total=ERR pass=ERR fail=ERR xpass=ERR xfail=ERR skip=ERR error=ERR
 +    eval "$@"
 +    # For debugging.
 +    $EGREP -i '(total|x?pass|x?fail|skip|error)' stdout || :
 +    rc=0
 +    # Avoid spurious failures with shells with "overly sensible"
 +    # `errexit' shell flag, such as e.g., Solaris /bin/sh.
 +    set +e
 +    test `grep -c '^PASS:'  stdout` -eq $pass  || rc=1
 +    test `grep -c '^XFAIL:' stdout` -eq $xfail || rc=1
 +    test `grep -c '^SKIP:'  stdout` -eq $skip  || rc=1
 +    test `grep -c '^FAIL:'  stdout` -eq $fail  || rc=1
 +    test `grep -c '^XPASS:' stdout` -eq $xpass || rc=1
 +    test `grep -c '^ERROR:' stdout` -eq $error || rc=1
 +    grep "^# TOTAL:  *$total$" stdout || rc=1
 +    grep "^# PASS:  *$pass$"   stdout || rc=1
 +    grep "^# XFAIL:  *$xfail$" stdout || rc=1
 +    grep "^# SKIP:  *$skip$"   stdout || rc=1
 +    grep "^# FAIL:  *$fail$"   stdout || rc=1
 +    grep "^# XPASS:  *$xpass$" stdout || rc=1
 +    grep "^# ERROR:  *$error$" stdout || rc=1
 +    test $rc -eq 0
 +  )
 +}
 +
 +commented_sed_unindent_prog='
 +  /^$/b                    # Nothing to do for empty lines.
 +  x                        # Get x<indent> into pattern space.
 +  /^$/{                    # No prior x<indent>, go prepare it.
 +    g                      # Copy this 1st non-blank line into pattern space.
 +    s/^\(['"$tab"' ]*\).*/x\1/   # Prepare x<indent> in pattern space.
 +  }                        # Now: x<indent> in pattern and <line> in hold.
 +  G                        # Build x<indent>\n<line> in pattern space, and
 +  h                        # duplicate it into hold space.
 +  s/\n.*$//                # Restore x<indent> in pattern space, and
 +  x                        # exchange with the above duplicate in hold space.
 +  s/^x\(.*\)\n\1//         # Remove leading <indent> from <line>.
 +  s/^x.*\n//               # Restore <line> when there is no leading <indent>.
 +'
 +
 +# unindent [input files...]
 +# -------------------------
 +# Remove the "proper" amount of leading whitespace from the given files,
 +# and output the result on stdout.  That amount is determined by looking
 +# at the leading whitespace of the first non-blank line in the input
 +# files.  If no input file is specified, standard input is implied.
 +unindent ()
 +{
 +  if test x"$sed_unindent_prog" = x; then
 +    sed_unindent_prog=`printf '%s\n' "$commented_sed_unindent_prog" | sed -e "s/  *# .*//"`
 +  fi
 +  sed "$sed_unindent_prog" ${1+"$@"}
 +}
 +sed_unindent_prog="" # Avoid interferences from the environment.
 +
 +# get_shell_script SCRIPT-NAME
 +# -----------------------------
 +# Fetch an Automake-provided shell script from the `lib/' directory into
 +# the current directory, and, if the `$am_test_prefer_config_shell'
 +# variable is set to "yes", modify its shebang line to use $SHELL instead
 +# of /bin/sh.
 +get_shell_script ()
 +{
 +  if test x"$am_test_prefer_config_shell" = x"yes"; then
 +    sed "1s|#!.*|#! $SHELL|" "$am_scriptdir/$1" > "$1"
 +    chmod a+x "$1"
 +  else
 +    cp "$am_scriptdir/$1" .
 +  fi
 +  sed 10q "$1" # For debugging.
 +}
 +
 +# require_xsi SHELL
 +# -----------------
 +# Skip the test if the given shell fails to support common XSI constructs.
 +require_xsi ()
 +{
 +  test $# -eq 1 || fatal_ "require_xsi needs exactly one argument"
 +  echo "$me: trying some XSI constructs with $1"
 +  $1 -c "$xsi_shell_code" || skip_all_ "$1 lacks XSI features"
 +}
 +# Shell code supposed to work only with XSI shells.  Keep this in sync
 +# with libtool.m4:_LT_CHECK_SHELL_FEATURES.
 +xsi_shell_code='
 +  _lt_dummy="a/b/c"
 +  test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \
 +      = c,a/b,b/c, \
 +    && eval '\''test $(( 1 + 1 )) -eq 2 \
 +    && test "${#_lt_dummy}" -eq 5'\'
 +
 +# fetch_tap_driver
 +# ----------------
 +# Fetch the Automake-provided TAP driver from the `lib/' directory into
 +# the current directory, and edit its shebang line so that it will be
 +# run with the perl interpreter determined at configure time.
 +fetch_tap_driver ()
 +{
 +  # TODO: we should devise a way to make the shell TAP driver tested also
 +  # TODO: with /bin/sh, for better coverage.
 +  case $am_tap_implementation in
 +    perl)
 +      $PERL -MTAP::Parser -e 1 \
 +        || skip_all_ "cannot import TAP::Parser perl module"
 +      sed "1s|#!.*|#! $PERL -w|" "$am_scriptdir"/tap-driver.pl >tap-driver
 +      ;;
 +    shell)
 +      sed "1s|#!.*|#! $SHELL|" "$am_scriptdir"/tap-driver.sh >tap-driver
 +      ;;
 +    *)
 +      fatal_ "invalid \$am_tap_implementation '$am_tap_implementation'" ;;
 +  esac \
 +    && chmod a+x tap-driver \
 +    || framework_failure_ "couldn't fetch $am_tap_implementation TAP driver"
 +  sed 10q tap-driver # For debugging.
 +}
 +# The shell/awk implementation of the TAP driver is still mostly dummy, so
 +# use the perl implementation by default for the moment.
 +am_tap_implementation=${am_tap_implementation-shell}
 +
 +# Usage: require_compiler_ {cc|c++|fortran|fortran77}
 +require_compiler_ ()
 +{
 +  case $# in
 +    0) fatal_ "require_compiler_: missing argument";;
 +    1) ;;
 +    *) fatal_ "require_compiler_: too many arguments";;
 +  esac
 +  case $1 in
 +    cc)
 +      am__comp_lang="C"
 +      am__comp_var=CC
 +      am__comp_flag_vars='CFLAGS CPPFLAGS'
 +      ;;
 +    c++)
 +      am__comp_lang="C++"
 +      am__comp_var=CXX
 +      am__comp_flag_vars='CXXFLAGS CPPFLAGS'
 +      ;;
 +    fortran)
 +      am__comp_lang="Fortran"
 +      am__comp_var=FC
 +      am__comp_flag_vars='FCFLAGS'
 +      ;;
 +    fortran77)
 +      am__comp_lang="Fortran 77"
 +      am__comp_var=F77
 +      am__comp_flag_vars='FFLAGS'
 +      ;;
 +  esac
 +  shift
 +  eval "am__comp_prog=\${$am__comp_var}" \
 +    || fatal_ "expanding \${$am__comp_var} in require_compiler_"
 +  case $am__comp_prog in
 +    "")
 +      fatal_ "botched configuration: \$$am__comp_var is empty";;
 +    false)
 +      skip_all_ "no $am__comp_lang compiler available";;
 +    autodetect|autodetected)
 +      # Let the ./configure commands in the test script try to determine
 +      # these automatically.
 +      unset $am__comp_var $am__comp_flag_vars;;
 +    *)
 +      # Pre-set these for the ./configure commands in the test script.
 +      export $am__comp_var $am__comp_flag_vars;;
 +  esac
 +  # Delete private variables.
 +  unset am__comp_lang am__comp_prog am__comp_var am__comp_flag_vars
 +}
 +
 +## ----------------------------------------------------------- ##
 +##  Checks for required tools, and additional setups (if any)  ##
 +##  required by them.                                          ##
 +## ----------------------------------------------------------- ##
 +
 +# So that we can force the use of correct gcc, g++ etc., consistently
 +# with cross-compilation settings.
 +if cross_compiling; then
 +  am__tool_prefix="$host_alias-"
 +else
 +  am__tool_prefix=
 +fi
 +
 +# Look for (and maybe set up) required tools and/or system features; skip
 +# the current test if they are not found.
 +for tool in : $required
 +do
 +  # Check that each required tool is present.
 +  case $tool in
 +    :) ;;
 +    cc|c++|fortran|fortran77)
 +      require_compiler_ $tool;;
 +    xsi-shell)
 +      require_xsi "$SHELL";;
 +    xsi-bin-sh)
 +      require_xsi "/bin/sh";;
 +    xsi-lib-shell)
 +      if test x"$am_test_prefer_config_shell" = x"yes"; then
 +        require_xsi "$SHELL"
 +      else
 +        require_xsi "/bin/sh"
 +      fi
 +      ;;
 +    bzip2)
 +      # Do not use --version, bzip2 still tries to compress stdin.
 +      echo "$me: running bzip2 --help"
 +      bzip2 --help \
 +        || skip_all_ "required program \`bzip2' not available"
 +      ;;
 +    cl)
 +      CC=cl
 +      # Don't export CFLAGS, as that could have been initialized to only
 +      # work with the C compiler detected at configure time.  If the user
 +      # wants CFLAGS to also influence `cl', he can still export CFLAGS
 +      # in the environment "by hand" before calling the testsuite.
 +      export CC CPPFLAGS
 +      echo "$me: running $CC -?"
 +      $CC -? || skip_all_ "Microsoft C compiler \`$CC' not available"
 +      ;;
 +    cscope)
 +      # Sun cscope is interactive without redirection.
 +      echo "$me: running cscope --version </dev/null"
 +      cscope --version </dev/null \
 +        || skip_all_ "required program \`cscope' not available"
 +      ;;
 +    cygpath)
 +      echo "$me: running cygpath --version"
 +      cygpath --version || skip_all_ "cygpath not available"
 +      ;;
 +    etags)
 +      # Exuberant Ctags will create a TAGS file even
 +      # when asked for --help or --version.  (Emacs's etags
 +      # does not have such problem.)  Use -o /dev/null
 +      # to make sure we do not pollute the tests/ directory.
 +      echo "$me: running etags --version -o /dev/null"
 +      etags --version -o /dev/null \
 +        || skip_all_ "required program \`etags' not available"
 +      ;;
 +    GNUmake)
 +      for make_ in "$MAKE" gmake gnumake :; do
 +        MAKE=$make_ am__using_gmake=''
 +        test "$MAKE" =  : && break
 +        echo "$me: determine whether $MAKE is GNU make"
 +        # Don't use "&&" here, or a bug of 'set -e' present in some
 +        # versions of the BSD shell will be triggered.  We add the
 +        # dummy "else" branch for extra safety.
 +        if using_gmake; then break; else :; fi
 +      done
 +      test "$MAKE" = : && skip_all_ "this test requires GNU make"
 +      export MAKE
 +      unset make_
 +      ;;
 +    gcc)
 +      # When gcc is required, export `CC=gcc' so that ./configure
 +      # always use it.  This is important only when the user
 +      # has defined CC in his environment, otherwise ./configure will
 +      # prefer gcc to other compilers.
 +      CC=${am__tool_prefix}gcc
 +      CFLAGS=$GNU_CFLAGS
 +      export CC CFLAGS CPPFLAGS
 +      echo "$me: running $CC --version"
 +      $CC --version || skip_all_ "GNU C compiler not available"
 +      echo "$me: running $CC -v"
 +      $CC -v || skip_all_ "botched installation for GNU C compiler"
 +      ;;
 +    gcj)
 +      GCJ=${am__tool_prefix}gcj
 +      export GCJ
 +      echo "$me: running $GCJ --version"
 +      $GCJ --version || skip_all_ "GNU Java compiler not available"
 +      echo "$me: running $GCJ -v"
 +      $GCJ -v || skip_all_ "botched installation for GNU Java compiler"
 +      ;;
 +    g++)
 +      CXX=${am__tool_prefix}g++
 +      CXXFLAGS=$GNU_CXXFLAGS
 +      export CXX CXXFLAGS CPPFLAGS
 +      echo "$me: running $CXX --version"
 +      $CXX --version || skip_all_ "GNU C++ compiler not available"
 +      echo "$me: running $CXX -v"
 +      $CXX -v || skip_all_ "botched installation for GNU C++ compiler"
 +      ;;
 +    gfortran)
 +      FC=${am__tool_prefix}gfortran
 +      FCFLAGS=$GNU_FCFLAGS
 +      export FC FCFLAGS
 +      echo "$me: running $FC --version"
 +      $FC --version || skip_all_ "GNU Fortran compiler not available"
 +      echo "$me: running $FC -v"
 +      $FC -v || skip_all_ "botched installation for GNU Fortran compiler"
 +      case " $required " in
 +        *\ g77\ *) ;;
 +        *) F77=$FC FFLAGS=$FCFLAGS; export F77 FFLAGS;;
 +      esac
 +      ;;
 +    g77)
 +      F77=${am__tool_prefix}g77
 +      FFLAGS=$GNU_FFLAGS
 +      export F77 FFLAGS
 +      echo "$me: running $F77 --version"
 +      $F77 --version || skip_all_ "GNU Fortran 77 compiler not available"
 +      echo "$me: running $F77 -v"
 +      $F77 -v || skip_all_ "botched installation for GNU Fortran 77 compiler"
 +      case " $required " in
 +        *\ gfortran\ *) ;;
 +        *) FC=$F77 FCFLAGS=$FFLAGS; export FC FCFLAGS;;
 +      esac
 +      ;;
 +    icc)
 +      CC=icc
 +      export CC CPPFLAGS # But not CFLAGS (see comments for `cl' above).
 +      # There is no way to ask *only* the compiler's version.
 +      # This tool always wants to do something (by default
 +      # it will try link *nothing* and complain it cannot find
 +      # main(); funny).  Use -help so it does not try linking anything.
 +      echo "$me: running $CC -V -help"
 +      $CC -V -help || skip_all_ "Intel C compiler \`$CC' not available"
 +      ;;
 +    javac)
 +      # The Java compiler from JDK 1.5 (and presumably earlier versions)
 +      # cannot handle the `-version' option by itself: it bails out
 +      # telling that source files are missing.  Adding also the `-help'
 +      # option seems to solve the problem.
 +      echo "$me: running javac -version -help"
 +      javac -version -help || skip_all_ "Sun Java compiler not available"
 +      ;;
 +    java)
 +      # See the comments above about `javac' for why we use also `-help'.
 +      echo "$me: running java -version -help"
 +      java -version -help || skip_all_ "Sun Java interpreter not found"
 +      ;;
 +    lib)
 +      AR=lib
 +      export AR
 +      # Attempting to create an empty archive will actually not
 +      # create the archive, but lib will output its version.
 +      echo "$me: running $AR -out:defstest.lib"
 +      $AR -out:defstest.lib \
 +        || skip_all_ "Microsoft \`lib' utility not available"
 +      ;;
 +    makedepend)
 +      echo "$me: running makedepend -f-"
 +      makedepend -f- \
 +        || skip_all_ "required program \`makedepend' not available"
 +      ;;
 +    makeinfo-html)
 +      # Make sure we have makeinfo, and it understands `--html'.
 +      echo "$me: running makeinfo --html --version"
 +      makeinfo --html --version \
 +        || skip_all_ "cannot find a makeinfo program that groks the" \
 +                 "\`--html' option"
 +      ;;
 +    mingw)
 +      uname_s=`uname -s || echo UNKNOWN`
 +      echo "$me: system name: $uname_s"
 +      case $uname_s in
 +        MINGW*) ;;
 +        *) skip_all_ "this test requires MSYS in MinGW mode" ;;
 +      esac
 +      ;;
 +    non-root)
 +      # Skip this test case if the user is root.
 +      # We try to append to a read-only file to detect this.
 +      priv_check_temp=priv-check.$$
 +      touch $priv_check_temp && chmod a-w $priv_check_temp \
 +        || framework_failure_ "creating unwritable file $priv_check_temp"
 +      # Not a useless use of subshell: lesser shells like Solaris /bin/sh
 +      # can exit if a builtin fails.
 +      overwrite_status=0
 +      (echo foo >> $priv_check_temp) || overwrite_status=$?
 +      rm -f $priv_check_temp
 +      if test $overwrite_status -eq 0; then
 +        skip_all_ "cannot drop file write permissions"
 +      fi
 +      unset priv_check_temp overwrite_status
 +      ;;
 +    perl-threads)
 +      if test "$WANT_NO_THREADS" = "yes"; then
 +        skip_all_ "Devel::Cover cannot cope with threads"
 +      fi
 +      ;;
 +    native)
 +      # Don't use "&&" here, to avoid a bug of 'set -e' present in
 +      # some (even relatively recent) versions of the BSD shell.
 +      # We add the dummy "else" branch for extra safety.
 +      if cross_compiling; then
 +        skip_all_ "doesn't work in cross-compile mode"
 +      else :; fi
 +      ;;
 +    python)
 +      # Python doesn't support --version, it has -V
 +      echo "$me: running python -V"
 +      python -V || skip_all_ "python interpreter not available"
 +      ;;
 +    ro-dir)
 +      # Skip this test case if read-only directories aren't supported
 +      # (e.g., under DOS.)
 +      ro_dir_temp=ro_dir.$$
 +      mkdir $ro_dir_temp && chmod a-w $ro_dir_temp \
 +        || framework_failure_ "creating unwritable directory $ro_dir_temp"
 +      # Not a useless use of subshell: lesser shells like Solaris /bin/sh
 +      # can exit if a builtin fails.
 +      create_status=0
 +      (: > $ro_dir_temp/probe) || create_status=$?
 +      rm -rf $ro_dir_temp
 +      if test $create_status -eq 0; then
 +        skip_all_ "cannot drop directory write permissions"
 +      fi
 +      unset ro_dir_temp create_status
 +      ;;
 +    runtest)
 +      # DejaGnu's runtest program. We rely on being able to specify
 +      # the program on the runtest command-line. This requires
 +      # DejaGnu 1.4.3 or later.
 +      echo "$me: running runtest SOMEPROGRAM=someprogram --version"
 +      runtest SOMEPROGRAM=someprogram --version \
 +        || skip_all_ "DejaGnu is not available"
 +      ;;
 +    tex)
 +      # No all versions of Tex support `--version', so we use
 +      # a configure check.
 +      if test -z "$TEX"; then
 +        skip_all_ "TeX is required, but it wasn't found by configure"
 +      fi
 +      ;;
 +    texi2dvi-o)
 +      # Texi2dvi supports `-o' since Texinfo 4.1.
 +      echo "$me: running texi2dvi -o /dev/null --version"
 +      texi2dvi -o /dev/null --version \
 +        || skip_all_ "required program \`texi2dvi' not available"
 +      ;;
-     lex)
-       test "$LEX" = false && skip_all_ "no Lex program available"
-       if test -z "$LEX"; then
-         # The user hasn't explicitly specified any lex program in the
-         # environment, so we try to use flex, skipping the test if it's
-         # not found.
-         LEX=flex
-         export LEX
-         echo "$me: running flex --version"
-         flex --version || skip_all_ "required program \`flex' not available"
-       fi
-       ;;
-     yacc)
-       test "$YACC" = false && skip_all_ "no Yacc program available"
-       if 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 || skip_all_ "required program \`bison' not available"
-       fi
++    lex)
++      test x"$LEX" = x"false" && skip_all_ "lex not found or disabled"
 +      export LEX
++      ;;
++    yacc)
++      test x"$YACC" = x"false" && skip_all_ "yacc not found or disabled"
++      export YACC
++      ;;
++    flex)
++      LEX=flex; export LEX
 +      echo "$me: running flex --version"
 +      flex --version || skip_all_ "required program \`flex' not available"
 +      ;;
++    bison)
++      YACC='bison -y'; export YACC
++      echo "$me: running bison --version"
++      bison --version || skip_all_ "required program \`bison' not available"
 +      ;;
 +    *)
 +      # Generic case: the tool must support --version.
 +      echo "$me: running $tool --version"
 +      # It is not likely but possible that $tool is a special builtin,
 +      # in which case the shell is allowed to exit after an error.
 +      # So, please leave the subshell here.
 +      ($tool --version) || skip_all_ "required program \`$tool' not available"
 +      ;;
 +  esac
 +done
 +
 +# Using just `$testbuilddir' for the check here is ok, since the
 +# further temporary subdirectory where the test will be run is
 +# ensured not to contain any whitespace character.
 +case $testbuilddir in
 +  *\ *|*\     *)
 +    case " $required " in
 +      *' libtool '* | *' libtoolize '* )
 +        skip_all_ "libtool has problems with spaces in builddir name";;
 +    esac
 +    ;;
 +esac
 +
 +# This test is necessary, although Automake's configure script bails out
 +# when $srcdir contains spaces.  This is because $testsrcdir is in not
 +# configure-time $srcdir, but is instead configure-time $abs_srcdir, and
 +# that is allowed to contain spaces.
 +case $testsrcdir in
 +  *\ * |*\    *)
 +    case " $required " in
 +      *' libtool '* | *' libtoolize '* | *' gettext '* )
 +        skip_all_ "spaces in srcdir name: libtool/gettext tests won't work";;
 +   esac
 +   ;;
 +esac
 +
 +# We might need extra macros, e.g., from Libtool or Gettext.
 +case " $required " in *\ libtool*) . ./libtool-macros.dir/get.sh;; esac
 +case " $required " in *\ gettext*) . ./gettext-macros.dir/get.sh;; esac
 +
 +
 +## ---------------------------------------------------------------- ##
 +##  Create and set up of the temporary directory used by the test.  ##
 +##  Set up of the exit trap for cleanup of said directory.          ##
 +## ---------------------------------------------------------------- ##
 +
 +# This might be used in testcases checking distribution-related features.
 +# Test scripts are free to override this if they need to.
 +distdir=$me-1.0
 +
 +# Set up the exit trap.
 +if test "$sh_errexit_works" = yes; then
 +  trap 'exit_status=$?
 +    set +e
 +    cd "$testbuilddir"
 +    if test $am_using_tap = yes; then
 +      if test $have_tap_plan_ != yes && test $exit_status -eq 0; then
 +        plan_ "now"
 +      fi
 +      test $exit_status -eq 0 && test $tap_pass_count_ -eq $tap_count_ \
 +        || keep_testdirs=yes
 +    else
 +      # This is to ensure that a test script does give a SKIP outcome just
 +      # because a command in it happens to exit with status 77.  This
 +      # behaviour, while from time to time useful to developers, is not
 +      # meant to be enabled by default, as it could cause spurious failures
 +      # in the wild.  Thus it will be enabled only when the variable
 +      # "am_explicit_skips" is set to a "true" value.
 +      case $am_explicit_skips in
 +        [yY]|[yY]es|1)
 +          if test $exit_status -eq 77 && test $am__test_skipped != yes; then
 +            echo "$me: implicit skip turned into failure"
 +            exit_status=78
 +          fi;;
 +      esac
 +      test $exit_status -eq 0 || keep_testdirs=yes
 +    fi
 +    am_keeping_testdirs || rm_rf_ $testSubDir
 +    set +x
 +    echo "$me: exit $exit_status"
 +    exit $exit_status
 +  ' 0
 +  trap "fatal_ 'caught signal SIGHUP'" 1
 +  trap "fatal_ 'caught signal SIGINT'" 2
 +  trap "fatal_ 'caught signal SIGTERM'" 15
 +  # Various shells seems to just ignore SIGQUIT under some circumstances,
 +  # even if the signal is not blocked; however, if the signal it trapped,
 +  # the trap gets correctly executed.  So we also trap SIGQUIT.
 +  # Here is a list of some shells that have been verified to exhibit the
 +  # problematic behavior with SIGQUIT:
 +  #  - zsh 4.3.12 on Debian GNU/Linux
 +  #  - /bin/ksh and /usr/xpg4/bin/sh on Solaris 10
 +  #  - Bash 3.2.51 on Solaris 10 and bash 4.1.5 on Debian GNU/Linux
 +  #  - AT&T ksh on Debian Gnu/Linux (deb package ksh, version 93u-1)
 +  # OTOH, at least these shells that do *not* exhibit that behaviour:
 +  #  - modern version of the Almquist Shell (at least 0.5.5.1), on
 +  #    both Solaris and GNU/Linux
 +  #  - Solaris 10 /bin/sh
 +  #  - public domain Korn Shell, version 5.2.14, on Debian GNU/Linux
 +  trap "fatal_ 'caught signal SIGQUIT'" 3
 +  # Ignore further SIGPIPE in the trap code.  This is required to avoid
 +  # a very weird issue with some shells, at least when the execution of
 +  # the automake testsuite is driven by the `prove' utility: if prove
 +  # (or the make process that has spawned it) gets interrupted with
 +  # Ctrl-C, the shell might go in a loop, continually getting a SIGPIPE,
 +  # sometimes finally dumping core, other times hanging indefinitely.
 +  # See also Test::Harness bug [rt.cpan.org #70855], archived at
 +  # <https://rt.cpan.org/Ticket/Display.html?id=70855>
 +  trap "trap '' 13; fatal_ 'caught signal SIGPIPE'" 13
 +fi
 +
 +# Create and populate the temporary directory, if and as required.
 +if test x"$am_create_testdir" = x"no"; then
 +  testSubDir=
 +else
 +  # The subdirectory where the current test script will run and write its
 +  # temporary/data files.  This will be created shortly, and will be removed
 +  # by the cleanup trap below if the test passes.  If the test doesn't pass,
 +  # this directory will be kept, to facilitate debugging.
 +  testSubDir=$me.dir
 +  test ! -d $testSubDir || rm_rf_ $testSubDir \
 +    || framework_failure_ "removing old test subdirectory"
 +  mkdir $testSubDir \
 +    || framework_failure_ "creating test subdirectory"
 +  cd ./$testSubDir \
 +    || framework_failure_ "cannot chdir into test subdirectory"
 +  if test x"$am_create_testdir" != x"empty"; then
 +    cp "$am_scriptdir"/install-sh "$am_scriptdir"/missing \
 +       "$am_scriptdir"/depcomp . \
 +      || framework_failure_ "fetching common files from $am_scriptdir"
 +    # Build appropriate environment in test directory.  E.g., create
 +    # configure.in, touch all necessary files, etc.  Don't use AC_OUTPUT,
 +    # but AC_CONFIG_FILES so that appending still produces a valid
 +    # configure.in.  But then, tests running config.status really need
 +    # to append AC_OUTPUT.
 +    {
 +      echo "AC_INIT([$me], [1.0])"
 +      if test x"$am_parallel_tests" = x"yes"; then
 +        echo "AM_INIT_AUTOMAKE([parallel-tests])"
 +      else
 +        echo "AM_INIT_AUTOMAKE"
 +      fi
 +      echo "AC_CONFIG_FILES([Makefile])"
 +    } >configure.in || framework_failure_ "creating configure.in skeleton"
 +  fi
 +fi
 +
 +
 +## ---------------- ##
 +##  Ready to go...  ##
 +## ---------------- ##
 +
 +set -x
 +pwd
index 79484a9,0000000..826c08a
mode 100644,000000..100644
--- /dev/null
@@@ -1,241 -1,0 +1,243 @@@
 +# -*- shell-script -*-
 +# @configure_input@
 +#
 +# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 +# 2005, 2006, 2007, 2008, 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
 +# 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/>.
 +
 +# Defines and minimal setup for Automake testing environment.
 +
 +# IMPORTANT NOTES AND REQUIREMENTS
 +#   - Multiple inclusions of this file should be idempotent.
 +#   - This code has to be 'set -e' clean.
 +#   - This file should execute correctly with any system's /bin/sh
 +#     shell, not only with configure-time detected $CONFIG_SHELL.
 +
 +# Be more Bourne compatible.
 +# (Snippet inspired to configure's initialization in Autoconf 2.64)
 +DUALCASE=1; export DUALCASE # for MKS sh
 +if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
 +  emulate sh
 +  NULLCMD=:
 +  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
 +  # is contrary to our usage.  Disable this feature.
 +  alias -g '${1+"$@"}'='"$@"'
 +  setopt NO_GLOB_SUBST
 +  # If Zsh is not started directly in Bourne-compatibility mode, it has
 +  # some incompatibilities in the handling of `$0' that conflict with
 +  # our usage: i.e., `$0' inside a file sourced with the `.' builtin is
 +  # temporarily set to the name of the sourced file.
 +  # Work around this when possible, otherwise abort the script.
 +  # Note that a bug in some versions of Zsh prevents us from resetting $0
 +  # in a sourced script, so the use of $argv0.  For more info see:
 +  #  <http://www.zsh.org/mla/workers/2009/msg01140.html>
 +  # Note: the apparently useless 'eval' below are needed by at least
 +  # dash 0.5.2, to prevent it from bailing out with an error like
 +  # "Syntax error: Bad substitution"
 +  if eval '[[ "$0" = *."test" ]]'; then
 +    # Good, FUNCTION_ARGZERO option was already off when this file was
 +    # sourced.  Thus we've nothing to do.
 +    argv0=$0
 +  elif eval 'test -n "${functrace[-1]}"'; then
 +    # FUNCTION_ARGZERO option was on, but we have a easy workaround.
 +    eval 'argv0=${functrace[-1]%:*}'
 +  else
 +    # Give up.
 +    echo "$0: cannot determine the path of running test script" >&2
 +    echo "$0: test was running with Zsh version $ZSH_VERSION" >&2
 +    echo "$0: did you enable the NO_FUNCTION_ARGZERO option?" >&2
 +    exit 99
 +  fi
 +else
 +  argv0=$0
 +  # Avoid command substitution failure, for Tru64 sh -e and instspc*.test.
 +  case `(set -o) 2>/dev/null || :` in *posix*) set -o posix;; esac
 +fi
 +
 +# Check that the environment is properly sanitized.
 +# Having variables exported to the empty string is OK, since our code
 +# treats such variables as if they were unset.
 +for var in \
 +  me \
 +  required \
 +  am_using_tap \
 +  am_parallel_tests \
 +  am_create_testdir \
 +  am_tap_implementation \
 +  am_test_prefer_config_shell \
 +  am_original_AUTOMAKE \
 +  am_original_ACLOCAL \
 +; do
 +  if eval "test x\"\$$var\" != x" && env | grep "^$var=" >/dev/null; then
 +    echo "$argv0: variable \`$var' is set in the environment:" \
 +         "this is unsafe" >&2
 +    exit 99
 +  fi
 +done
 +unset var
 +
 +# See whether the current test script is expected to use TAP or not.
 +# Use a sensible default, while allowing the scripts to override this
 +# check.
 +if test -z "$am_using_tap"; then
 +  case $argv0 in *.tap) am_using_tap=yes;; *) am_using_tap=no;; esac
 +fi
 +
 +testsrcdir='@abs_srcdir@'
 +top_testsrcdir='@abs_top_srcdir@'
 +testbuilddir='@abs_builddir@'
 +top_testbuilddir='@abs_top_builddir@'
 +testprefix='@prefix@'
 +
 +# Support for the "installcheck" target.
 +case ${am_running_installcheck:=no} in
 +  yes)
 +    am_amdir='@amdir@'
 +    am_automake_acdir='@automake_acdir@'
 +    am_bindir='@bindir@'
 +    am_datadir='@datadir@'
 +    am_docdir='@docdir@'
 +    am_pkgvdatadir='@pkgvdatadir@'
 +    am_scriptdir='@scriptdir@'
 +    am_system_acdir='@system_acdir@'
 +    ;;
 +  no)
 +    am_amdir=$top_testsrcdir/lib/am
 +    am_automake_acdir=$top_testsrcdir/m4
 +    am_bindir=$testbuilddir
 +    am_datadir=$top_testsrcdir
 +    am_docdir=$top_testsrcdir/doc
 +    am_pkgvdatadir=$top_testsrcdir/lib
 +    am_scriptdir=$top_testsrcdir/lib
 +    am_system_acdir=$top_testsrcdir/m4/acdir
 +    ;;
 +  *)
 +    echo "$argv0: variable \`am_running_installcheck' has invalid"
 +         "value \`$am_running_installcheck'" >&2
 +    exit 99
 +    ;;
 +esac
 +
 +APIVERSION='@APIVERSION@'
 +PATH_SEPARATOR='@PATH_SEPARATOR@'
 +
 +host_alias=${host_alias-'@host_alias@'}; export host_alias
 +build_alias=${build_alias-'@build_alias@'}; export build_alias
 +
 +# Make sure we override the user shell.  And do not read the value of
 +# $SHELL from the environment (think to the non-uncommon situation where
 +# e.g., $SHELL=/bin/tcsh).
 +SHELL=${AM_TESTSUITE_SHELL-'@SHELL@'}; export SHELL
 +
 +# User can override various tools used.  Prefer overriding specific for
 +# that automake testsuite, if they are available.
 +PERL=${AM_TESTSUITE_PERL-${PERL-'@PERL@'}}
 +MAKE=${AM_TESTSUITE_MAKE-${MAKE-'make'}}
++YACC=${AM_TESTSUITE_YACC-${YACC-'@YACC@'}}
++LEX=${AM_TESTSUITE_LEX-${LEX-'@LEX@'}}
 +AUTOCONF=${AM_TESTSUITE_AUTOCONF-${AUTOCONF-'@am_AUTOCONF@'}}
 +AUTOM4TE=${AM_TESTSUITE_AUTOM4TE-${AUTOM4TE-'@am_AUTOM4TE@'}}
 +AUTORECONF=${AM_TESTSUITE_AUTORECONF-${AUTORECONF-'@am_AUTORECONF@'}}
 +AUTOHEADER=${AM_TESTSUITE_AUTOHEADER-${AUTOHEADER-'@am_AUTOHEADER@'}}
 +AUTOUPDATE=${AM_TESTSUITE_AUTOUPDATE-${AUTOUPDATE-'@am_AUTOUPDATE@'}}
 +
 +# Tests who want complete control over aclocal or automake command-line
 +# options should use $am_original_ACLOCAL or $am_original_AUTOMAKE.  The
 +# `test -z' tests take care not to re-initialize them if defs-static
 +# is re-sourced, as we want defs-static to remain really idempotent.
 +if test -z "$am_original_AUTOMAKE"; then
 +  am_original_AUTOMAKE=${AM_TESTSUITE_AUTOMAKE-${AUTOMAKE-"automake-$APIVERSION"}}
 +fi
 +if test -z "$am_original_ACLOCAL"; then
 +  am_original_ACLOCAL=${AM_TESTSUITE_ACLOCAL-${ACLOCAL-"aclocal-$APIVERSION"}}
 +fi
 +
 +# Use -Werror because this also turns some Perl warnings into error.
 +# Tests for which this is inappropriate should use -Wno-error.
 +# Tests who want complete control over aclocal command-line options
 +# should use $am_original_ACLOCAL instead.
 +ACLOCAL="$am_original_ACLOCAL -Werror"
 +
 +# See how Automake should be run.  We put --foreign as the default
 +# strictness to avoid having to create lots and lots of files.  A test
 +# can override this by specifying a different strictness.  Use -Wall
 +# -Werror by default.  Tests for which this is inappropriate (e.g. when
 +# testing that a warning is enabled by a specific switch) should use
 +# -Wnone or/and -Wno-error.
 +# Tests who want complete control over automake command-line options
 +# should use $am_original_AUTOMAKE instead.
 +AUTOMAKE="$am_original_AUTOMAKE --foreign -Werror -Wall"
 +
 +# This is a hack to seamlessly support the infamous "autoconf wrappers",
 +# that might dispatch different autoconf versions depending on the name
 +# of the input files and/or the command-line options used.  See:
 +# <http://lists.gnu.org/archive/html/automake/2011-12/msg00039.html>
 +# FIXME: in the long run, the better fix will be to convert our testsuite
 +# to use `configure.ac' instead of `configure.in' as autoconf input.
 +AUTOCONF="$AUTOCONF -B /no/such/dir"
 +AUTOM4TE="$AUTOM4TE -B /no/such/dir"
 +AUTORECONF="$AUTORECONF -B /no/such/dir"
 +
 +# POSIX no longer requires 'egrep' and 'fgrep',
 +# but some hosts lack 'grep -E' and 'grep -F'.
 +EGREP=${AM_TESTSUITE_EGREP-'@EGREP@'}
 +FGREP=${AM_TESTSUITE_FGREP-'@FGREP@'}
 +
 +# Compilers and their flags.  These can point to non-GNU compilers (and
 +# on non-Linux and non-BSD systems, they probably will).
 +CC=${AM_TESTSUITE_CC-${CC-'@CC@'}}
 +CXX=${AM_TESTSUITE_CXX-${CXX-'@CXX@'}}
 +F77=${AM_TESTSUITE_F77-${F77-'@F77@'}}
 +FC=${AM_TESTSUITE_FC-${FC-'@FC@'}}
 +CFLAGS=${AM_TESTSUITE_CFLAGS-${CFLAGS-'@CFLAGS@'}}
 +CXXFLAGS=${AM_TESTSUITE_CXXFLAGS-${CXXFLAGS-'@CXXFLAGS@'}}
 +FCFLAGS=${AM_TESTSUITE_FCFLAGS-${FCFLAGS-'@FCFLAGS@'}}
 +FFLAGS=${AM_TESTSUITE_FFLAGS-${FFLAGS-'@FFLAGS@'}}
 +CPPFLAGS=${AM_TESTSUITE_CPPFLAGS-${CPPFLAGS-'@CPPFLAGS@'}}
 +
 +# Flags for the GNU compilers.
 +GNU_FFLAGS=${AM_TESTSUITE_GNU_FFLAGS-${GNU_FFLAGS-'@GNU_FFLAGS@'}}
 +GNU_FCFLAGS=${AM_TESTSUITE_GNU_FCFLAGS-${GNU_FCFLAGS-'@GNU_FCFLAGS@'}}
 +GNU_CXXFLAGS=${AM_TESTSUITE_GNU_CXXFLAGS-${GNU_CXXFLAGS-'@GNU_CXXFLAGS@'}}
 +GNU_CFLAGS=${AM_TESTSUITE_GNU_CFLAGS-${GNU_CFLAGS-'@GNU_CFLAGS@'}}
 +
 +# No all versions of Tex support `--version', so we use a configure
 +# check to decide if tex is available.  This decision is embodied in
 +# this variable.
 +TEX=${AM_TESTSUITE_TEX-'@TEX@'}
 +
 +# Whether $SHELL has working 'set -e' with exit trap.
 +sh_errexit_works='@sh_errexit_works@'
 +
 +# The amount we should wait after modifying files depends on the platform.
 +# For instance, Windows '95, '98 and ME have 2-second granularity
 +# and can be up to 3 seconds in the future w.r.t. the system clock.
 +sleep='sleep @MODIFICATION_DELAY@'
 +
 +# An old timestamp that can be given to a file, in "touch -t" format.
 +# The time stamp should be portable to all file systems of interest.
 +# Just for fun, choose the exact time of the announcement of the GNU project
 +# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
 +old_timestamp=198309271735.59
 +
 +# Make our wrapper script (or installed scripts, if running under
 +# "installcheck") accessible by default.  And avoid to uselessly
 +# extend $PATH multiple times if this file is sourced multiple times.
 +case $PATH in
 +  $am_bindir$PATH_SEPARATOR*) ;;
 +  *) PATH=$am_bindir$PATH_SEPARATOR$PATH;;
 +esac
 +export PATH
Simple merge
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
  # Ensure subdirs for subdir scanners are generated when subdir-objects
  # are used, even when dependency tracking is disabled.
  
- required='cc flex'
 -required=lex
++required='cc lex'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >>configure.in <<\END
  AC_PROG_CC
  AM_PROG_CC_C_O
diff --cc tests/lex3.test
  # Test associated with PR 19.
  # From Matthew D. Langston.
  
- required='cc flex'
 -required=lex
++required='cc lex'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AM_PROG_LEX
diff --cc tests/lex5.test
  
  # Test for subdir lexers.
  
- required='cc flex'
 -required=lex
++required='cc lex'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AM_PROG_CC_C_O
@@@ -82,11 -87,11 +85,11 @@@ EN
  $sleep
  
  $AUTOMAKE -a --no-force
- test -f ./ylwrap
  
  cd sub
 -using_gnumake || $MAKE Makefile
 +using_gmake || $MAKE Makefile
  $MAKE foo/foo2.o
+ ls -l # For debugging.
  test -f foo/foo2.c
  test -f foo/foo2.o
  
  
  # Please keep this in sync with sister test `yaccvapth.test'.
  
- required='cc flex'
 -required=lex
++required='cc lex'
  . ./defs || Exit 1
  
 -set -e
 -
  cat > lexoutroot.in << 'END'
  LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
  END
@@@ -73,10 -67,10 +73,10 @@@ mkdir su
  cd sub
  ../configure
  . ./lexoutroot
 -test -n "$LEX_OUTPUT_ROOT" # sanity check
 +test -n "$LEX_OUTPUT_ROOT" # Sanity check.
  cd ..
  
flex lexer.l
$LEX lexer.l
  mv "$LEX_OUTPUT_ROOT".c lexer.c
  
  cd sub
@@@ -521,10 -479,14 +520,18 @@@ lex5.test 
  lexcpp.test \
  lexvpath.test \
  lex-subobj-nodep.test \
 +lex-lib.test \
 +lex-lib-external.test \
 +lex-libobj.test \
 +lex-noyywrap.test \
+ lex-clean-cxx.test \
+ lex-clean.test \
+ lex-depend-cxx.test \
+ lex-depend-grep.test \
+ lex-depend.test \
+ lex-line.test \
+ lex-nodist.test \
+ lex-pr204.test \
  lflags.test \
  lflags2.test \
  libexec.test \
@@@ -913,13 -752,11 +919,12 @@@ silentf77.test 
  silentf90.test \
  silent-many-gcc.test \
  silent-many-generic.test \
- silent-lex-gcc.test \
- silent-lex-generic.test \
- silent-yacc-gcc.test \
- silent-yacc-generic.test \
 -silent-lex.test \
 +silent-nowarn.test \
 +silent-configsite.test \
  silent-nested-vars.test \
 -silent-configsite.test \
++silent-lex.test \
+ silent-yacc.test \
+ silent-yacc-headers.test \
  srcsub.test \
  srcsub2.test \
  space.test \
@@@ -1172,12 -910,9 +1177,9 @@@ warning-groups-win-over-strictness.tes
  werror.test \
  werror2.test \
  werror3.test \
 +werror4.test \
  whoami.test \
  xsource.test \
- yacc-basic.test \
- yacc-d-basic.test \
- yacc-clean.test \
 -xz.test \
  yacc.test \
  yacc2.test \
  yacc4.test \
@@@ -1185,13 -920,28 +1187,28 @@@ yacc5.test 
  yacc7.test \
  yacc8.test \
  yaccdry.test \
- yacc-dist-nobuild.test \
- yacc-nodist.test \
  yaccpp.test \
  yaccvpath.test \
 -yacc-clean-cxx.test \
+ yacc-auxdir.test \
+ yacc-basic.test \
++yacc-cxx.test \
+ yacc-bison-skeleton-cxx.test \
+ yacc-bison-skeleton.test \
 -yacc-cxx.test \
+ yacc-clean.test \
++yacc-clean-cxx.test \
+ yacc-d-basic.test \
+ yacc-d-cxx.test \
  yacc-d-vpath.test \
+ yacc-deleted-headers.test \
+ yacc-depend.test \
+ yacc-depend2.test \
  yacc-dist-nobuild-subdir.test \
+ yacc-dist-nobuild.test \
+ yacc-line.test \
+ yacc-mix-c-cxx.test \
+ yacc-nodist.test \
+ yacc-pr204.test \
+ yacc-weirdnames.test \
  yflags.test \
  yflags2.test \
  yflags-cmdline-override.test \
@@@ -1,5 -1,5 +1,5 @@@
  #!/bin/sh
--# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
++# Copyright (C) 2009, 2010, 2011, 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
  # 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 yacc'
+ required='gcc g++ gfortran lex yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  # Avoids too much code duplication.
  do_and_check_silent_build ()
  {
@@@ -185,14 -190,13 +188,19 @@@ $ACLOCA
  $AUTOMAKE --add-missing
  $AUTOCONF
  
 +# Sanity check: make sure the cache variables we force are really
 +# used by configure.
 +$FGREP am_cv_CC_dependencies_compiler_type configure
 +$FGREP am_cv_CXX_dependencies_compiler_type configure
+ # Ensure per-target rules are used, to ensure their coverage below.
+ # (We do not do an exhaustive check, that wouldn't be practical).
+ $FGREP 'bar-bar.o' Makefile.in
+ $FGREP 'fo2-foo5.c' Makefile.in
+ $FGREP 'fo2-foo6.c' Makefile.in
  
  # Force gcc ("fast") depmode.
 +depmodes="am_cv_CC_dependencies_compiler_type=gcc \
 +          am_cv_CXX_dependencies_compiler_type=gcc"
  # This apparently useless "for" loop is here to simplify the syncing
  # with sister test `silent-many-generic.test'.
  for config_args in \
@@@ -1,5 -1,5 +1,5 @@@
  #!/bin/sh
--# Copyright (C) 2009, 2010, 2011 Free Software Foundation, Inc.
++# Copyright (C) 2009, 2010, 2011, 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
  # sister test `silent-many-gcc.test', which requires the GNU compilers
  # and forces the use of gcc depmode.
  
- required='cc c++ fortran fortran77 flex yacc'
 -# FIXME: generic C++/Fortran compilers should suffice here
 -required='g++ gfortran lex yacc'
++required='cc c++ fortran fortran77 lex yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  # Avoids too much code duplication.
  do_and_check_silent_build ()
  {
Simple merge
@@@ -1,6 -1,6 +1,6 @@@
  #! /bin/sh
--# Copyright (C) 2002, 2003, 2004, 2006, 2011 Free Software Foundation,
--# Inc.
++# Copyright (C) 2002, 2003, 2004, 2006, 2011, 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
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2010, 2011 Free Software Foundation, Inc.
++# Copyright (C) 2010, 2011, 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
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
- # Basic semantic checks on Yacc support.
+ # Basic semantic checks on Yacc support (without yacc-generated headers).
+ # Keep in sync with sister test `yacc-cxx.test'.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
@@@ -55,33 -60,49 +58,52 @@@ $AUTOMAKE -
  
  ./configure
  $MAKE
- # The `parse.c' file must be created and not removed (i.e., not treated
- # like an "intermediate file" in the GNU make sense).
+ ls -l
+ # The Yacc-derived C sources must be created, and not removed once
+ # compiled (i.e., not treated like "intermediate files" in the GNU
+ # make sense).
  test -f parse.c
+ test -f bar-parse.c
+ # Check that per-object flags are honored.
+ test -f bar-parse.output
  
 -echo a | ./foo
 -echo b | ./foo && Exit 1
 +if cross_compiling; then :; else
 +  echo a | ./foo
 +  echo b | ./foo && Exit 1
 +  : For shells with busted 'set -e'.
 +fi
  
- # The generated file `parse.c' must be shipped.
+ echo a | ./bar
+ echo b | ./bar && Exit 1
+ # The Yacc-derived C sources must be shipped.
  $MAKE echo-distcom
- $MAKE -s echo-distcom | grep '[ /]parse.c '
+ $MAKE -s echo-distcom | grep '[ /]parse\.c '
+ $MAKE -s echo-distcom | grep '[ /]bar-parse\.c '
  $MAKE distdir
  ls -l $distdir
  test -f $distdir/parse.c
+ test -f $distdir/bar-parse.c
  
  # Sanity check on distribution.
- $MAKE distcheck
+ # Note that, for this to succeed, bar-parse.output must either not
+ # be distributed, or properly cleaned by automake-generated rules.
+ # We don't want to set the exact semantics yet, but want to ensure
+ # they are are consistent.
+ yl_distcheck
  
- # While we are at it, make sure that parse.c is erased by
+ # Make sure that the Yacc-derived C sources are erased by
  # maintainer-clean, and not by distclean.
  test -f parse.c
+ test -f bar-parse.c
  $MAKE distclean
+ ls -l
  test -f parse.c
- ./configure # Re-create `Makefile'.
+ test -f bar-parse.c
 -./configure # we must re-create `Makefile'
++./configure # We must re-create 'Makefile'.
  $MAKE maintainer-clean
+ ls -l
  test ! -f parse.c
+ test ! -f bar-parse.c
  
  :
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
  # Check that .c and .h files derived from non-distributed .y sources
  # are cleaned by "make clean", while .c and .h files derived from
  # distributed .y sources are cleaned by "make maintainer-clean".
+ # See also sister test `yacc-cxx-clean.test'.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
- # Tests on basic Yacc support for when we have -d in YFLAGS, AM_YFLAGS
- # or maude_YFLAGS.
+ # Tests Yacc support with yacc-generated headers
+ # (i.e., '-d' in *YFLAGS).
+ # Keep in sync with sister test `yacc-d-cxx.test'.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
- tab=' '
 -set -e
--
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
@@@ -37,10 -39,10 +37,10 @@@ foo_SOURCES = parse.y foo.
  AM_YFLAGS = -d
  END
  
 -# Original parser, with `foobar'
 +# Original parser, with `foobar'.
  cat > parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %token FOOBAR
@@@ -70,10 -72,10 +70,10 @@@ cd su
  
  $sleep
  
 -# New parser, with `fubar'
 +# New parser, with `fubar'.
  cat > ../parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %token FUBAR
@@@ -90,10 -92,10 +90,10 @@@ $FGREP FUBAR $distdir/parse.
  
  $sleep
  
 -# New parser, with `maude'
 +# New parser, with `maude'.
  cat > ../parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %token MAUDE
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
  required=yacc
  . ./defs || Exit 1
  
- distdir=$me-1.0
 -set -e
 -
+ # This test is bounded to fail for any implementation that
+ # triggers automake bug#7884.
+ useless_vpath_rebuild && skip_ "would trip on automake bug#7884"
  
  cat >> configure.in << 'END'
  AC_PROG_CC
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2011 Free Software Foundation, Inc.
++# Copyright (C) 2011, 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
  
  # Check that distributed Yacc-generated parsers are not uselessly
  # remade from an unpacked distributed tarball.
+ # See automake bug#7884.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
  # You should have received a copy of the GNU General Public License
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
- # Checks for .c and .h files derived from non-distributed .y sources.
+ # Checks for .c and .h files derived from non-distributed yacc sources.
+ # The test 'yacc-pr204.test' does similar check with AM_MAINTAINER_MODE
+ # enabled.
+ # The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
+ # for lex-generated .c files.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
@@@ -1,5 -1,5 +1,6 @@@
  #! /bin/sh
--# Copyright (C) 2002, 2004, 2010, 2011 Free Software Foundation, Inc.
++# Copyright (C) 2002, 2004, 2010, 2011, 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
  # along with this program.  If not, see <http://www.gnu.org/licenses/>.
  
  # For PR 204.
- # Sources derived from nodist_ sources should not be distributed.
+ # C sources derived from nodist_ yacc sources should not be distributed.
+ # See also related test `yacc-nodist.test'.
+ # The tests 'lex-nodist.test' and 'lex-pr204.test' does similar checks
+ # for lex-generated C files.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
 -set -e
 -
  cat >> configure.in <<'EOF'
  AM_MAINTAINER_MODE
  AC_PROG_CC
@@@ -1,5 -1,5 +1,6 @@@
  #! /bin/sh
--# Copyright (C) 2001, 2002, 2010, 2011 Free Software Foundation, Inc.
++# Copyright (C) 2001, 2002, 2010, 2011, 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
@@@ -1,5 -1,5 +1,5 @@@
  #! /bin/sh
--# Copyright (C) 2002, 2003, 2004, 2006, 2010, 2011 Free Software
++# Copyright (C) 2002, 2003, 2004, 2006, 2010, 2011, 2012 Free Software
  # Foundation, Inc.
  #
  # This program is free software; you can redistribute it and/or modify
Simple merge
Simple merge
@@@ -1,6 -1,6 +1,6 @@@
  #! /bin/sh
--# Copyright (C) 2001, 2002, 2003, 2010, 2011 Free Software Foundation,
--# Inc.
++# Copyright (C) 2001, 2002, 2003, 2010, 2011, 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
  
  # Please keep this in sync with sister test `yacc-d-vpath.test'.
  
 -required=yacc
 +required='cc yacc'
  . ./defs || Exit 1
  
- distdir=$me-1.0
 -set -e
--
  cat >> configure.in << 'END'
  AC_PROG_CC
  AC_PROG_YACC
@@@ -39,10 -39,10 +37,10 @@@ bin_PROGRAMS = fo
  foo_SOURCES = parse.y foo.c
  END
  
 -# Original parser, with `foobar'
 +# Original parser, with `foobar'.
  cat > parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %%
@@@ -66,10 -66,10 +64,10 @@@ cd su
  
  $sleep
  
 -# New parser, with `fubar'
 +# New parser, with `fubar'.
  cat > ../parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %%
@@@ -84,10 -84,10 +82,10 @@@ $FGREP fubar $distdir/parse.
  
  $sleep
  
 -# New parser, with `maude'
 +# New parser, with `maude'.
  cat > ../parse.y << 'END'
  %{
- int yylex () {return 0;}
+ int yylex () { return 0; }
  void yyerror (char *s) {}
  %}
  %%
Simple merge