automake-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Automake-commit] [SCM] GNU Automake branch, next, updated. Release-1-10


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, next, updated. Release-1-10-325-gd5995c4
Date: Sun, 29 Mar 2009 21:09:05 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Automake".

http://git.sv.gnu.org/gitweb/?p=automake.git;a=commitdiff;h=d5995c411f335e9eef6951c62ca16848ec2ed64f

The branch, next has been updated
       via  d5995c411f335e9eef6951c62ca16848ec2ed64f (commit)
       via  83460df1f5dff6a2a96e958d53117c8fe19a4ff8 (commit)
       via  b6bcc69d22d46f8ecfee9aba649d0f0547a24d91 (commit)
       via  1c503be3477330d01d4ff81548ae4c534822094e (commit)
       via  83b03f377b6b3614497d81e97fccd4fe59299811 (commit)
       via  fe936f644680510cf2a0b15ea2942c88204c9566 (commit)
       via  7ff99b75262d5ba025ec79b73cbe00a1e77f2751 (commit)
       via  68a57a2e0cadf9f1b3c7629944ed6375d1d0b85d (commit)
       via  1f63d3501c0255fce309bb3f0d54eefcd2fdfdf6 (commit)
       via  2cac2c3c0720240f91e5efc413afaac33baca28f (commit)
       via  8f33eec4110c89f2963a4e3910c8149c59e63b23 (commit)
       via  c4e28424e75dd75620064fd9a918249857855877 (commit)
       via  1b67aa701d5d105dfbf0d2a4bb5ab70fbc0e5158 (commit)
       via  868fb04577daf9c47a4a2bcdd9a92cb78e6cf056 (commit)
       via  66c2dcaa51c7a1216053dc2dde2d704aa17deef6 (commit)
       via  aceb0e55873cdb6bc4d6f33f3260fb5cdda5bbd3 (commit)
       via  9bfd7e89c90b5ad1721e4bcb536bae2f7562dbba (commit)
       via  0930139923e8db0b0334e17dc379682a63f73831 (commit)
       via  5dba7d0a6945ee746837ba27d4f06f9492fe8c91 (commit)
       via  df4f77d029cd7fe42722ab402bad105081d093b1 (commit)
       via  3a12ed5e97dc193a38dd14e031658cbd329b50ca (commit)
       via  04bb420a64c45f709bddea95c63fe0b2b35ad015 (commit)
       via  9003cc9b747b87abd92d421891c0d7ec9e75e0d0 (commit)
       via  64b35b506420a7e9a00af47fe8d0c283759aa4f6 (commit)
      from  d4cc23b052fda663345c0ac634cc8f07bb6417bb (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit d5995c411f335e9eef6951c62ca16848ec2ed64f
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Mar 29 23:05:38 2009 +0200

    Minor NEWS update.
    
    * NEWS: Minor update.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 83460df1f5dff6a2a96e958d53117c8fe19a4ff8
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Mar 29 07:48:08 2009 +0200

    Reorganize nodes in the manual.
    
    Avoid texinfo sectioning commands without nodes, by either
    introducing new nodes along with menus, or using headings
    commands.  Adjust all references.
    
    * doc/automake.texi: Throughout the manual, adjust references to
    new or changed node names.  Rename `non-configured' to
    `unconfigured', capitalize headings and section names better.
    (Top): List new menus and nodes introduced below.
    (Length Limitations): Renamed from ...
    (Length limitations): ... this.
    (aclocal Options): Renamed from ...
    (aclocal options): ... this.
    (Macro Search Path): Renamed from ...
    (Macro search path): ... this.  Rename subsubsections to
    subsubheadings.
    (Public Macros, Obsolete Macros, Private Macros): Renamed from
    (Public macros, Obsolete macros, Private macros): ... these.
    (Conditional Subdirectories): Introduce sub menu and split ...
    (SUBDIRS vs DIST_SUBDIRS, Subdirectories with AM_CONDITIONAL)
    (Subdirectories with AC_SUBST, Unconfigured Subdirectories):
    ... into these new nodes.  Adjust subsection names to node
    names.
    (Conditional Sources): Rename subsubsections to subsubheadings.
    (Conditional Programs): Likewise.
    (Program Variables): Renamed from ...
    (Program variables): ... this.
    (Libtool Issues): Introduce sub menu and split into ...
    (Required file ltmain.sh not found)
    (Objects created both with libtool and without): ... these new
    nodes.
    (Other Objects, Built Sources): Renamed from ...
    (Other objects, Built sources): ... these.
    (Built Sources Example): Renamed from ...
    (Built sources example): this.  Rename unnumberedsubsecs to
    subsubheadings.
    (Man Pages): Renamed from ...
    (Man pages): ... this.
    (Install): Introduce sub menu and split into ...
    (Basics of Installation, The Two Parts of Install)
    (Extending Installation, Staged Installs)
    (Install Rules for the User): ... these new nodes.
    (Dist): Introduce sub menu and split into ...
    (Basics of Distribution, Fine-grained Distribution Control)
    (The dist Hook, Checking the Distribution)
    (The Types of Distributions): ... these new nodes.
    (Tests): Introduce sub menu and split into ...
    (Simple Tests, Simple Tests using parallel-tests, DejaGnu Tests)
    (Install Tests): ... these new nodes.
    (Conditionals): Move the portability paragraph up, introduce sub
    menu and split into ...
    (Usage of Conditionals, Limits of Conditionals): ... these new
    nodes.  Link to several sections throughout the manual that deal
    with specific usage of conditionals.
    (CVS): Rename subsections to subheadings.
    (maintainer-mode): Likewise.
    (Limitations on File Names): Renamed from ...
    (limitations on file names): ... this.
    (Flag Variables Ordering): Rename subsections to subheadings.
    (Renamed Objects): Renamed from ...
    (Renamed objects): ... this.
    (Dependency Tracking Evolution): Introduce sub menu and split
    into ...
    (First Take on Dependencies, Dependencies As Side Effects)
    (Dependencies for the User, Techniques for Dependencies)
    (Recommendations for Tool Writers)
    (Future Directions for Dependencies): ... these new nodes.
    Report by Karl Berry.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit b6bcc69d22d46f8ecfee9aba649d0f0547a24d91
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Mar 29 01:23:30 2009 +0100

    Update AM_RECURSIVE_TARGETS for parallel-tests.
    
    * lib/am/check.am [PARALLEL_TESTS] (AM_RECURSIVE_TARGETS):
    Add check, recheck, check-html, recheck-html.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

commit 1c503be3477330d01d4ff81548ae4c534822094e
Merge: fe936f644680510cf2a0b15ea2942c88204c9566 
83b03f377b6b3614497d81e97fccd4fe59299811
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Mar 29 01:21:01 2009 +0100

    Merge branch 'ad-parallel-tests' into next
    
    * ad-parallel-tests:
      parallel-tests: New target recheck-html.
      parallel-tests: redo lazy checking: recheck and RECHECK_LOGS.
      parallel-tests: do not mark check-TESTS as `.MAKE'.
      parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
      check-html: Always create HTML output, note conversion failure.
      parallel-tests: per-extension test driver: <EXT>_LOG_COMPILER.
      parallel-tests: also record logs of SKIPped tests.
      Minor optimization in parallel-tests text box creation.

commit fe936f644680510cf2a0b15ea2942c88204c9566
Merge: d4cc23b052fda663345c0ac634cc8f07bb6417bb 
7ff99b75262d5ba025ec79b73cbe00a1e77f2751
Author: Ralf Wildenhues <address@hidden>
Date:   Sun Mar 29 00:59:46 2009 +0100

    Merge branch 'master' into next
    
    * master:
      Rewrite maintainer-check in separate tests, parallelizable.
      Fix maintainer-check failure.
      Fix latex warning in manual.
      Sync auxiliary files from upstream.
      manual: minor cleanups.
      Sane (un)install for empty directory variables.
      Ensure that empty directory variables work with empty content variables.
      Use --tag=FC with libtool also for .f90 files.
      DISTFILES containing a directory and files in that directory.
      Fix a documentation typo.
      Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile.
    
    Signed-off-by: Ralf Wildenhues <address@hidden>

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

Summary of changes:
 ChangeLog                                          |  293 +++++++++
 INSTALL                                            |   17 +-
 Makefile.am                                        |  114 ++++-
 Makefile.in                                        |  132 ++++-
 NEWS                                               |   13 +-
 THANKS                                             |    1 +
 automake.in                                        |   30 +-
 configure.ac                                       |    2 +-
 doc/Makefile.in                                    |   45 +-
 doc/automake.texi                                  |  542 +++++++++++-----
 lib/Automake/Makefile.in                           |   21 +-
 lib/Automake/tests/.gitignore                      |    2 +
 lib/Automake/tests/Makefile.am                     |    7 +-
 lib/Automake/tests/Makefile.in                     |  353 ++++++++---
 lib/INSTALL                                        |   17 +-
 lib/Makefile.in                                    |   21 +-
 lib/am/Makefile.in                                 |   13 +-
 lib/am/check.am                                    |   69 ++-
 lib/am/check2.am                                   |    2 +-
 lib/am/data.am                                     |   11 +-
 lib/am/distdir.am                                  |   22 +-
 lib/am/java.am                                     |    6 +-
 lib/am/libs.am                                     |   14 +-
 lib/am/lisp.am                                     |    8 +-
 lib/am/ltlib.am                                    |   12 +-
 lib/am/mans.am                                     |    8 +-
 lib/am/progs.am                                    |    6 +-
 lib/am/python.am                                   |   13 +-
 lib/am/scripts.am                                  |    6 +-
 lib/am/subdirs.am                                  |    6 +-
 lib/am/tags.am                                     |    6 +
 lib/am/texinfos.am                                 |   30 +-
 lib/config.guess                                   |   30 +-
 lib/config.sub                                     |   18 +-
 lib/texinfo.tex                                    |  668 +++++++++++++-------
 m4/Makefile.in                                     |   13 +-
 tests/Makefile.am                                  |   12 +-
 tests/Makefile.in                                  |   82 ++-
 tests/defs.in                                      |    2 +-
 tests/distdir.test                                 |   27 +-
 tests/fort5.test                                   |    5 +-
 tests/{txinfo32.test => instdir-java.test}         |   41 +-
 tests/{txinfo32.test => instdir-lisp.test}         |   40 +-
 tests/instdir-ltlib.test                           |   74 +++
 tests/instdir-prog.test                            |   72 +++
 tests/{txinfo32.test => instdir-python.test}       |   44 +-
 tests/instdir-texi.test                            |   70 ++
 tests/instdir.test                                 |   71 ++
 tests/instdir2.test                                |   93 +++
 tests/parallel-tests.test                          |   15 +-
 tests/parallel-tests2.test                         |   13 +
 .../{parallel-tests4.test => parallel-tests7.test} |   28 +-
 .../{parallel-tests5.test => parallel-tests8.test} |   61 +-
 .../{parallel-tests2.test => parallel-tests9.test} |   19 +-
 54 files changed, 2583 insertions(+), 757 deletions(-)
 create mode 100644 lib/Automake/tests/.gitignore
 copy tests/{txinfo32.test => instdir-java.test} (59%)
 copy tests/{txinfo32.test => instdir-lisp.test} (60%)
 create mode 100755 tests/instdir-ltlib.test
 create mode 100755 tests/instdir-prog.test
 copy tests/{txinfo32.test => instdir-python.test} (58%)
 create mode 100755 tests/instdir-texi.test
 create mode 100755 tests/instdir.test
 create mode 100755 tests/instdir2.test
 copy tests/{parallel-tests4.test => parallel-tests7.test} (73%)
 copy tests/{parallel-tests5.test => parallel-tests8.test} (52%)
 copy tests/{parallel-tests2.test => parallel-tests9.test} (75%)

diff --git a/ChangeLog b/ChangeLog
index a05df3a..fe63988 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,296 @@
+2009-03-29  Ralf Wildenhues  <address@hidden>
+
+       * NEWS: Minor update.
+
+       Reorganize nodes in the manual.
+       Avoid texinfo sectioning commands without nodes, by either
+       introducing new nodes along with menus, or using headings
+       commands.  Adjust all references.
+       * doc/automake.texi: Throughout the manual, adjust references to
+       new or changed node names.  Rename `non-configured' to
+       `unconfigured', capitalize headings and section names better.
+       (Top): List new menus and nodes introduced below.
+       (Length Limitations): Renamed from ...
+       (Length limitations): ... this.
+       (aclocal Options): Renamed from ...
+       (aclocal options): ... this.
+       (Macro Search Path): Renamed from ...
+       (Macro search path): ... this.  Rename subsubsections to
+       subsubheadings.
+       (Public Macros, Obsolete Macros, Private Macros): Renamed from
+       (Public macros, Obsolete macros, Private macros): ... these.
+       (Conditional Subdirectories): Introduce sub menu and split ...
+       (SUBDIRS vs DIST_SUBDIRS, Subdirectories with AM_CONDITIONAL)
+       (Subdirectories with AC_SUBST, Unconfigured Subdirectories):
+       ... into these new nodes.  Adjust subsection names to node
+       names.
+       (Conditional Sources): Rename subsubsections to subsubheadings.
+       (Conditional Programs): Likewise.
+       (Program Variables): Renamed from ...
+       (Program variables): ... this.
+       (Libtool Issues): Introduce sub menu and split into ...
+       (Required file ltmain.sh not found)
+       (Objects created both with libtool and without): ... these new
+       nodes.
+       (Other Objects, Built Sources): Renamed from ...
+       (Other objects, Built sources): ... these.
+       (Built Sources Example): Renamed from ...
+       (Built sources example): this.  Rename unnumberedsubsecs to
+       subsubheadings.
+       (Man Pages): Renamed from ...
+       (Man pages): ... this.
+       (Install): Introduce sub menu and split into ...
+       (Basics of Installation, The Two Parts of Install)
+       (Extending Installation, Staged Installs)
+       (Install Rules for the User): ... these new nodes.
+       (Dist): Introduce sub menu and split into ...
+       (Basics of Distribution, Fine-grained Distribution Control)
+       (The dist Hook, Checking the Distribution)
+       (The Types of Distributions): ... these new nodes.
+       (Tests): Introduce sub menu and split into ...
+       (Simple Tests, Simple Tests using parallel-tests, DejaGnu Tests)
+       (Install Tests): ... these new nodes.
+       (Conditionals): Move the portability paragraph up, introduce sub
+       menu and split into ...
+       (Usage of Conditionals, Limits of Conditionals): ... these new
+       nodes.  Link to several sections throughout the manual that deal
+       with specific usage of conditionals.
+       (CVS): Rename subsections to subheadings.
+       (maintainer-mode): Likewise.
+       (Limitations on File Names): Renamed from ...
+       (limitations on file names): ... this.
+       (Flag Variables Ordering): Rename subsections to subheadings.
+       (Renamed Objects): Renamed from ...
+       (Renamed objects): ... this.
+       (Dependency Tracking Evolution): Introduce sub menu and split
+       into ...
+       (First Take on Dependencies, Dependencies As Side Effects)
+       (Dependencies for the User, Techniques for Dependencies)
+       (Recommendations for Tool Writers)
+       (Future Directions for Dependencies): ... these new nodes.
+       Report by Karl Berry.
+
+2009-03-29  Ralf Wildenhues  <address@hidden>
+
+       Update AM_RECURSIVE_TARGETS for parallel-tests.
+       * lib/am/check.am [PARALLEL_TESTS] (AM_RECURSIVE_TARGETS):
+       Add check, recheck, check-html, recheck-html.
+
+2009-03-29  Ralf Wildenhues  <address@hidden>
+           Akim Demaille  <address@hidden>
+
+       parallel-tests: New target recheck-html.
+       * lib/am/check.am [PARALLEL_TESTS] (recheck-html): New phony,
+       recursive target.  Factor common implementation with
+       `check-html'.
+       * doc/automake.texi (Tests): Document recheck-html.
+       * tests/parallel-tests2.test: Test it.
+
+2009-03-28  Ralf Wildenhues  <address@hidden>
+           Akim Demaille  <address@hidden>
+
+       parallel-tests: redo lazy checking: recheck and RECHECK_LOGS.
+       Replace the LAZY_TEST_SUITE API with a simpler yet more powerful
+       one: RECHECK_LOGS specifies those tests which are to be removed
+       in any case before testing.  Provide a `recheck' convenience
+       target to set RECHECK_LOGS to all failed and unexpectedly passed
+       tests.  Document several ways to limit the set of tests run.
+       * lib/am/check.am [PARALLEL_TESTS] (RECHECK_LOGS): New variable,
+       default to $(TESTS_LOGS).
+       (check-TESTS): Remove $(RECHECK_LOGS) not $(TEST_LOGS).  Drop use
+       of LAZY_TEST_SUITE.
+       ($(TEST_SUITE_LOG)): Do not output note about lazy rerun, as
+       LAZY_TEST_SUITE is gone.
+       (recheck): New target.
+       (recheck-am, recheck-TESTS): New internal targets.
+       * doc/automake.texi (Tests): Update @vindex for TESTS and
+       TEST_LOGS.  Replace description of LAZY_TEST_SUITE with a list
+       of ways the set of tests to be run can be modified.  Document
+       RECHECK_LOGS and the recheck target.
+       * tests/defs.in: Unset RECHECK_LOGS not LAZY_TEST_SUITE.
+       * tests/parallel-tests.test: Adjust, replacing LAZY_TEST_SUITE
+       with corresponding RECHECK_LOGS settings.
+       * tests/parallel-tests9.test: New tests.
+       * tests/Makefile.am: Update.
+       Suggestion and different implementation by Akim Demaille.
+
+       parallel-tests: do not mark check-TESTS as `.MAKE'.
+       * lib/am/check.am [PARALLEL_TESTS] (.MAKE): Remove check-TESTS.
+       This rule removes files, which should not be executed with BSD
+       `make -n'.
+
+       parallel-tests: warn about $(srcdir), $(top_srcdir) in TESTS.
+       * automake.in (handle_tests): Warn about portability issue
+       concerning generated TESTS files listed with a `$(srcdir)/'
+       or `$(top_srcdir)/' prefix.
+       * doc/automake.texi (TESTS): Document this issue.  Mention that
+       the parallel-tests driver is still experimental.
+       * tests/parallel-tests8.test: New test.
+       * tests/Makefile.am: Update.
+
+       check-html: Always create HTML output, note conversion failure.
+       * lib/am/check.am (check-html): Create `$(TEST_SUITE_HTML)' in
+       any case.  Exit unsuccessfully if HTML creation failed.
+       * tests/parallel-tests2.test: Amend test to expose this.
+
+2009-03-24  Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: per-extension test driver: <EXT>_LOG_COMPILER.
+       For test files with extension <ext>, introduce the internal
+       variable <EXT>_LOG_COMPILE, which expands to
+       $(<EXT>_LOG_COMPILER) $(AM_<EXT>_LOG_FLAGS) $(<EXT>_LOG_FLAGS).
+       Turn also the lib/Automake/tests testsuite over to the new
+       test driver.
+       * doc/automake.texi (Tests): Document `EXT_LOG_COMPILER' and
+       `EXT_LOG_FLAGS'.
+       * lib/am/check2.am: Insert `%COMPILE%' right before test.
+       * automake.in (handle_tests): Substitute `COMPILE' for check2,
+       empty for tests without extension, and `$(ext_LOG_COMPILE)' for
+       extension `ext'.  In the latter case, define it from the public
+       components.
+       * configure.ac (AM_INIT_AUTOMAKE): Use `parallel-test' globally.
+       * tests/Makefile.am (AUTOMAKE_OPTIONS): Remove, not needed here
+       any more.
+       * lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Split ...
+       (PL_LOG_COMPILER, PL_LOG_FLAGS): ... into these new variables.
+       (TESTS_EXTENSIONS): New variable, initialize to `.pl'.
+       * tests/parallel-tests7.test: New test.
+       * tests/Makefile.am: Update.
+       Suggestion by Akim Demaille.
+
+2009-03-22  Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: also record logs of SKIPped tests.
+       * lib/am/check.am [PARALLEL_TESTS] ($(TEST_SUITE_LOG)): Record
+       SKIPs as well.
+       Suggested by Jim Meyering.
+
+       Minor optimization in parallel-tests text box creation.
+       * lib/am/check.am [PARALLEL-TESTS] (am__text_box): Use only one
+       awk invocation, rather than several tools, to create a text box.
+       Suggestion from Akim Demaille.
+
+2009-03-29  Ralf Wildenhues  <address@hidden>
+
+       Rewrite maintainer-check in separate tests, parallelizable.
+       * Makefile.am (sc_diff_automake_in_automake, sc_perl_syntax)
+       (sc_no_brace_variable_expansions, sc_rm_minus_f)
+       (sc_no_for_variable_in_macro, sc_mkinstalldirs)
+       (sc_pre_normal_post_install_uninstall, sc_perl_no_undef)
+       (sc_perl_no_split_regex_space, sc_cd_in_backquotes)
+       (sc_cd_relative_dir, sc_perl_at_uscore_in_scalar_context)
+       (sc_perl_local_no_parens, sc_perl_local)
+       (sc_AMDEP_TRUE_in_automake_in, sc_tests_make_without_am_makeflags)
+       (sc_tests_plain_make, sc_tests_plain_autoconf)
+       (sc_tests_plain_autoupdate, sc_tests_plain_automake)
+       (sc_tests_here_document_format, sc_tests_Exit_not_exit)
+       (sc_tests_automake_fails, sc_tests_plain_aclocal)
+       (sc_tests_plain_perl, sc_tests_required_after_defs)
+       (sc_tests_overriding_macros_on_cmdline, sc_tests_plain_sleep)
+       (sc_tests_plain_egrep_fgrep, sc_mkdir_p, sc_perl_at_substs)
+       (sc_unquoted_DESTDIR, sc_tabs_in_texi, sc_at_in_texi): New rules,
+       all phony, all listed in ...
+       (syntax_check_rules): ... this new variable and split out from ...
+       (maintainer-check): ... this rule.  Depend on $(syntax_check_rules).
+
+       * Makefile.am (maintainer-check): Do not complain if DESTDIR is
+       passed as argument to `make'.
+
+       * doc/automake.texi (Cross-Compilation): Fix underfull hbox.
+
+       Sync auxiliary files from upstream.
+       * INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
+       lib/texinfo.tex: Sync from upstream.
+
+2009-03-28  Ralf Wildenhues  <address@hidden>
+
+       manual: minor cleanups.
+       * doc/automake.texi (Yacc and Lex): Adjust spacing in example.
+       (Mixing Fortran 77 With C and C++): Drop unneeded @page breaks.
+
+       Sane (un)install for empty directory variables.
+       This patch fixes all install and uninstall rules to behave
+       sanely when $(wheredir) is the empty string, but $(where_HOW) is
+       nonempty, for all kinds of values of `where' and `HOW'.
+       * lib/am/data.am (install-%DIR%%PRIMARY%, uninstall-%DIR%%PRIMARY%):
+       Do not touch the install tree if the corresponding directory variable
+       $(%NDIR%dir) is empty.
+       * lib/am/java.am (install-%DIR%JAVA, uninstall-%DIR%JAVA): Likewise.
+       * lib/am/libs.am (install-%DIR%LIBRARIES, uninstall-%DIR%LIBRARIES):
+       Likewise.
+       * lib/am/lisp.am (install-%DIR%LISP, uninstall-%DIR%LISP): Likewise.
+       * lib/am/ltlib.am (install-%DIR%LTLIBRARIES, 
uninstall-%DIR%LTLIBRARIES):
+       Likewise.
+       * lib/am/mans.am (install-man%SECTION%, uninstall-man%SECTION%):
+       Likewise.
+       * lib/am/progs.am (install-%DIR%PROGRAMS, uninstall-%DIR%PROGRAMS):
+       Likewise.
+       * lib/am/python.am (install-%DIR%PYTHON, uninstall-%DIR%PYTHON):
+       Likewise.
+       * lib/am/scripts.am (install-%DIR%SCRIPTS, uninstall-%DIR%SCRIPTS):
+       Likewise.
+       * lib/am/texinfos.am (install-dvi-am, install-html-am, install-pdf-am)
+       (install-ps-am, uninstall-dvi-am, uninstall-html-am, uninstall-pdf-am)
+       (uninstall-ps-am): Likewise.
+       * tests/instdir2.test, tests/instdir-java.test,
+       tests/instdir-lisp.test, tests/instdir-ltlib.test,
+       tests/instdir-prog.test, tests/instdir-python.test,
+       tests/instdir-texi.test: New tests.
+       * tests/Makefile.am: Update.
+       * NEWS: Update.
+       Suggestion by Akim Demaille.
+
+       Ensure that empty directory variables work with empty content variables.
+       This test ensures that, if both $(wheredir) and $(where_HOW) are
+       the empty string, then the `install' and `uninstall' rules behave
+       sanely, for several directory variables `wheredir' and several
+       primaries `HOW'.
+       * tests/instdir.test: New test.
+       * tests/Makefile.am: Update.
+
+2009-03-23  Ralf Wildenhues  <address@hidden>
+
+       Use --tag=FC with libtool also for .f90 files.
+       * automake.in: Set 'libtool_tag' for language `fc'.
+       * tests/fort5.test: Grep for the tag.
+       * THANKS: Update.
+       Report by John R. Cary.
+
+2009-03-22  Peter Breitenlohner  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       For PR automake/533:
+       DISTFILES containing a directory and files in that directory.
+       When the source tree contains non-writable files or directories
+       (as happens during distcheck), and directories or entries
+       thereof are listed multiple times in variables to be
+       distributed, then the corresponding directories below $(distdir)
+       need to be made writable recursively.  Since file modes should
+       not change, they need to be copied recursively using `cp -f'.
+       * lib/am/distdir.am: Handle this situation.
+       * tests/distdir.test: Extend test to those cases.
+       * NEWS: Update.
+       Report by Peter Breitenlohner.
+
+2009-03-22  Jim Meyering  <address@hidden>
+
+       Fix a documentation typo.
+       * doc/automake.texi (Headers): Clarify the note telling when it's
+       better not to use noinst_HEADERS.
+
+2009-03-22  Ralf Wildenhues  <address@hidden>
+
+       Define AM_RECURSIVE_TARGETS, for gnulib's GNUmakefile.
+       This new macro lists all public targets which invoke `make'
+       recursively, or depend on targets which do so.  It allows to
+       prevent parallelism selectively, when multiple targets are
+       passed on the `make' command line.
+       * lib/am/distdir.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS): New
+       macro.
+       * lib/am/subdirs.am (AM_RECURSIVE_TARGETS): Likewise.
+       * lib/am/tags.am [%?SUBDIRS%] (AM_RECURSIVE_TARGETS):
+       Likewise.
+
 2009-03-11  Ralf Wildenhues  <address@hidden>
 
        Fix LAZY_TEST_SUITE handling and $(TEST_SUITE_LOG) recreation.
diff --git a/INSTALL b/INSTALL
index 8b82ade..2550dab 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,7 +2,7 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -159,7 +159,7 @@ Particular systems
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae"
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
@@ -174,6 +174,16 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -189,7 +199,8 @@ type, such as `sun4', or a canonical name which has the 
form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
diff --git a/Makefile.am b/Makefile.am
index 8b87a8c..af9147b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -106,70 +106,130 @@ dist-hook:
 
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
-maintainer-check: automake aclocal
+syntax_check_rules = \
+sc_diff_automake_in_automake \
+sc_perl_syntax \
+sc_no_brace_variable_expansions \
+sc_rm_minus_f \
+sc_no_for_variable_in_macro \
+sc_mkinstalldirs \
+sc_pre_normal_post_install_uninstall \
+sc_perl_no_undef \
+sc_perl_no_split_regex_space \
+sc_cd_in_backquotes \
+sc_cd_relative_dir \
+sc_perl_at_uscore_in_scalar_context \
+sc_perl_local_no_parens \
+sc_perl_local \
+sc_AMDEP_TRUE_in_automake_in \
+sc_tests_make_without_am_makeflags \
+sc_tests_plain_make \
+sc_tests_plain_autoconf \
+sc_tests_plain_autoupdate \
+sc_tests_plain_automake \
+sc_tests_here_document_format \
+sc_tests_Exit_not_exit \
+sc_tests_automake_fails \
+sc_tests_plain_aclocal \
+sc_tests_plain_perl \
+sc_tests_required_after_defs \
+sc_tests_overriding_macros_on_cmdline \
+sc_tests_plain_sleep \
+sc_tests_plain_egrep_fgrep \
+sc_mkdir_p \
+sc_perl_at_substs \
+sc_unquoted_DESTDIR \
+sc_tabs_in_texi \
+sc_at_in_texi
+
+.PHONY: $(syntax_check_rules)
+$(syntax_check_rules): automake aclocal
+maintainer-check: $(syntax_check_rules)
+
 ## This check avoids accidental configure substitutions in the source.
 ## There are exactly 6 lines that should be modified.  This works out
 ## to 22 lines of diffs.
+sc_diff_automake_in_automake:
        @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \
          echo "found too many diffs between automake.in and automake"; 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
        fi
+
 ## Syntax check with default Perl (on my machine, Perl 5).
+sc_perl_syntax:
        perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
        perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
+
 ## expect no instances of '${...}'.  However, $${...} is ok, since that
 ## is a shell construct, not a Makefile construct.
+sc_no_brace_variable_expansions:
        @if grep -F '$${' $(srcdir)/lib/am/[a-z]*.am | \
               grep -F -v '$$$$'; then \
          echo "Found too many uses of '\$${' in the lines above." 1>&2; \
          exit 1;                               \
        else :; fi
+
 ## Make sure `rm' is called with `-f'.
+sc_rm_minus_f:
        @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
            grep -E '\<rm ([^-]|\-[^f ]*\>)'; then \
          echo "Suspicious 'rm' invocation." 1>&2; \
          exit 1;                               \
        else :; fi
+
 ## Never use something like `for file in $(FILES)', this doesn't work
 ## if FILES is empty or if it contains shell meta characters (e.g. $ is
 ## commonly used in Java filenames).
+sc_no_for_variable_in_macro:
        @if grep 'for .* in \$$(' $(srcdir)/lib/am/[a-z]*.am; then \
          echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
          exit 1; \
        else :; fi
+
 ## Make sure all invocations of mkinstalldirs are correct.
+sc_mkinstalldirs:
        @if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
              grep -F -v '$$(mkinstalldirs)'; then \
          echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
          exit 1; \
        else :; fi
+
 ## Make sure all calls to PRE/NORMAL/POST_INSTALL/UNINSTALL
+sc_pre_normal_post_install_uninstall:
        @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \
                  $(srcdir)/lib/am/[a-z]*.am | \
              grep -v ':##' | grep -v ':        @\$$('; then \
          echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the 
lines above" 1>&2; \
          exit 1; \
        else :; fi
+
 ## We never want to use "undef", only "delete", but for $/.
+sc_perl_no_undef:
        @if grep -n -w 'undef ' $(srcdir)/automake.in | \
              grep -F -v 'undef $$/'; then \
          echo "Found undef in automake.in; use delete instead" 1>&2; \
          exit 1; \
        fi
+
 ## We never want split (/ /,...), only split (' ', ...).
+sc_perl_no_split_regex_space:
        @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
          echo "Found bad split in the lines above." 1>&2; \
          exit 1; \
        fi
+
 ## Look for cd within backquotes
+sc_cd_in_backquotes:
        @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am; then \
          echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
+
 ## Look for cd to a relative directory (may be influenced by CDPATH).
 ## Skip some known directories that are OK.
+sc_cd_relative_dir:
        @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am | \
              grep -v 'echo.*cd ' | \
@@ -182,62 +242,84 @@ maintainer-check: automake aclocal
          echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
+
 ## Using @_ in a scalar context is most probably a programming error.
+sc_perl_at_uscore_in_scalar_context:
        @if grep -Hn 'address@hidden) ] *= address@hidden' 
$(srcdir)/automake.in; then \
          echo "Using @_ in a scalar context in the lines above." 1>&2; \
          exit 1; \
        fi
+
 ## Forbid using parens with `local' to ease counting.
+sc_perl_local_no_parens:
        @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
          echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
          exit 1; \
        fi
+
 ## Allow only `local $_' in Automake.
+sc_perl_local:
        @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
        fi
+
 ## Don't let AMDEP_TRUE substitution appear in automake.in.
+sc_AMDEP_TRUE_in_automake_in:
        @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
          echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call make directly.
+sc_tests_make_without_am_makeflags:
        @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
                grep -v 'AM_MAKEFLAGS'; then \
          echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call make directly.
+sc_tests_plain_make:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*make'; then \
          echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call autoconf directly.
+sc_tests_plain_autoconf:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf'; 
then \
          echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call autoupdate directly.
+sc_tests_plain_autoupdate:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoupdate'; 
then \
          echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call automake directly.
+sc_tests_plain_automake:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake([^:]|$$)'; then \
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
          exit 1; \
        fi
+
 ## Tests should only use END and EOF for here documents
 ## (so that the next test is effective).
+sc_tests_here_document_format:
        @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF'; 
then \
          echo 'Use here documents with "END" and "EOF" only, for 
greppability.' 1>&2; \
          exit 1; \
        fi
+
 ## Tests should never call exit directly, but use Exit.
 ## This is so that the exit status is transported correctly across the 0 trap.
 ## Ignore comments, and ignore one perl line in ext2.test.
+sc_tests_Exit_not_exit:
        @found=false; for file in $(srcdir)/tests/*.test; do \
          res=`sed -n '/^#/d; /^\$$PERL/d; /<<.*END/,/^END/{b;}; 
/<<.*EOF/,/^EOF/{b;}; /exit [$$0-9]/p' $$file`; \
          if test -n "$$res"; then \
@@ -249,32 +331,42 @@ maintainer-check: automake aclocal
          echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 
1>&2; \
          exit 1; \
        fi
+
 ## Use AUTOMAKE_fails when appropriate
+sc_tests_automake_fails:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep 
'\$$AUTOMAKE.*&&.*[eE]xit'; then \
          echo 'Use AUTOMAKE_fails + grep to catch automake failures in the 
above tests.' 1>&2;  \
          exit 1; \
        fi
+
 ## Tests should never call aclocal directly.
+sc_tests_plain_aclocal:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; 
then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
          exit 1; \
        fi
+
 ## Tests should never call perl directly.
+sc_tests_plain_perl:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl'; then \
          echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
          exit 1; \
        fi
+
 ## Setting `required' after sourcing `./defs' is a bug.
+sc_tests_required_after_defs:
        @for file in $(srcdir)/tests/*.test; do \
          if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; 
then \
            echo 'Do not set "required" after sourcing "defs" in '"$$file: 
$$out" 1>&2; \
            exit 1; \
          fi; \
        done
+
 ## Overriding a Makefile macro on the command line is not portable when
 ## recursive targets are used.  Better use an envvar.  SHELL is an exception,
 ## POSIX says it can't come from the environment.  V and DESTDIRS are 
exceptions,
-## too, as package authors are urged not to intitialize this anywhere.
+## too, as package authors are urged not to initialize them anywhere.
+sc_tests_overriding_macros_on_cmdline:
        @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; 
then \
          echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e 
SHELL=$$SHELL"' 1>&2; \
          echo ' in the above lines, it is more portable.' 1>&2; \
@@ -291,14 +383,18 @@ maintainer-check: automake aclocal
          echo 'the above lines.' 1>&2; \
          exit 1; \
        fi
+
 ## Never use `sleep 1' to create files with different timestamps.
 ## Use `$sleep' instead.  Some filesystems (e.g., Windows') have only
 ## a 2sec resolution.
+sc_tests_plain_sleep:
        @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
          echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" 
instead.' 1>&2; \
          exit 1; \
        fi
+
 ## fgrep and egrep are not required by POSIX.
+sc_tests_plain_egrep_fgrep:
        @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
          echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or 
$$EGREP.' 1>&2; \
          exit 1; \
@@ -307,13 +403,17 @@ maintainer-check: automake aclocal
          echo 'Do not use egrep or fgrep in the above files, they are not 
portable.' 1>&2; \
          exit 1; \
        fi
+
+sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
          echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
          exit 1; \
        fi
+
 ## Try to make sure all @...@ substitutions are covered by our
 ## substitution rule.
+sc_perl_at_substs:
        @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
@@ -321,15 +421,21 @@ maintainer-check: automake aclocal
        @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
-       fi; \
-       if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
+       fi
+
+sc_unquoted_DESTDIR:
+       @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
          echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
          exit 1; \
        fi
+
+sc_tabs_in_texi:
        @if grep '      ' $(srcdir)/doc/automake.texi; then \
          echo 'Do not use tabs in the manual.' 1>&2; \
          exit 1; \
        fi
+
+sc_at_in_texi:
        @if grep -E '(address@hidden|^)@([       address@hidden|$$)' 
$(srcdir)/doc/automake.texi; \
        then \
          echo 'Unescaped @.' 1>&2; \
diff --git a/Makefile.in b/Makefile.in
index 1cdf70c..39d2a3a 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -87,6 +87,9 @@ RECURSIVE_TARGETS = all-recursive check-recursive 
dvi-recursive \
        ps-recursive uninstall-recursive
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -240,6 +243,45 @@ do_subst = sed \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
   -e 's,address@hidden@],$(datadir),g'
 
+
+# Some simple checks, and then ordinary check.  These are only really
+# guaranteed to work on my machine.
+syntax_check_rules = \
+sc_diff_automake_in_automake \
+sc_perl_syntax \
+sc_no_brace_variable_expansions \
+sc_rm_minus_f \
+sc_no_for_variable_in_macro \
+sc_mkinstalldirs \
+sc_pre_normal_post_install_uninstall \
+sc_perl_no_undef \
+sc_perl_no_split_regex_space \
+sc_cd_in_backquotes \
+sc_cd_relative_dir \
+sc_perl_at_uscore_in_scalar_context \
+sc_perl_local_no_parens \
+sc_perl_local \
+sc_AMDEP_TRUE_in_automake_in \
+sc_tests_make_without_am_makeflags \
+sc_tests_plain_make \
+sc_tests_plain_autoconf \
+sc_tests_plain_autoupdate \
+sc_tests_plain_automake \
+sc_tests_here_document_format \
+sc_tests_Exit_not_exit \
+sc_tests_automake_fails \
+sc_tests_plain_aclocal \
+sc_tests_plain_perl \
+sc_tests_required_after_defs \
+sc_tests_overriding_macros_on_cmdline \
+sc_tests_plain_sleep \
+sc_tests_plain_egrep_fgrep \
+sc_mkdir_p \
+sc_perl_at_substs \
+sc_unquoted_DESTDIR \
+sc_tabs_in_texi \
+sc_at_in_texi
+
 WGET = wget
 WGET_SV_CVS = $(WGET) http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/
 WGET_SV_GIT_CF = $(WGET) 
'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;hb=HEAD;f='
@@ -294,7 +336,7 @@ $(am__aclocal_m4_deps):
 install-binSCRIPTS: $(bin_SCRIPTS)
        @$(NORMAL_INSTALL)
        test -z "$(bindir)" || $(MKDIR_P) "$(DESTDIR)$(bindir)"
-       @list='$(bin_SCRIPTS)'; \
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || list=; \
        for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \
@@ -319,7 +361,7 @@ install-binSCRIPTS: $(bin_SCRIPTS)
 
 uninstall-binSCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(bin_SCRIPTS)'; \
+       @list='$(bin_SCRIPTS)'; test -n "$(bindir)" || exit 0; \
        files=`for p in $$list; do echo "$$p"; done | \
               sed -e 's,.*/,,;$(transform)'`; \
        test -n "$$list" || exit 0; \
@@ -479,10 +521,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
@@ -796,55 +842,77 @@ INSTALL: lib/INSTALL
 dist-hook:
        cd $(distdir)/tests && chmod a+rx *.test
 
-# Some simple checks, and then ordinary check.  These are only really
-# guaranteed to work on my machine.
-maintainer-check: automake aclocal
+.PHONY: $(syntax_check_rules)
+$(syntax_check_rules): automake aclocal
+maintainer-check: $(syntax_check_rules)
+
+sc_diff_automake_in_automake:
        @if test `diff $(srcdir)/automake.in automake | wc -l` -ne 22; then \
          echo "found too many diffs between automake.in and automake"; 1>&2; \
          diff -c $(srcdir)/automake.in automake; \
          exit 1; \
        fi
+
+sc_perl_syntax:
        perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w automake
        perllibdir="./lib$(PATH_SEPARATOR)$(srcdir)/lib" $(PERL) -c -w aclocal
+
+sc_no_brace_variable_expansions:
        @if grep -F '$${' $(srcdir)/lib/am/[a-z]*.am | \
               grep -F -v '$$$$'; then \
          echo "Found too many uses of '\$${' in the lines above." 1>&2; \
          exit 1;                               \
        else :; fi
+
+sc_rm_minus_f:
        @if grep -v '^#' $(srcdir)/lib/am/[a-z]*.am $(srcdir)/tests/*.test | \
            grep -E '\<rm ([^-]|\-[^f ]*\>)'; then \
          echo "Suspicious 'rm' invocation." 1>&2; \
          exit 1;                               \
        else :; fi
+
+sc_no_for_variable_in_macro:
        @if grep 'for .* in \$$(' $(srcdir)/lib/am/[a-z]*.am; then \
          echo 'Use "list=$$(mumble); for var in $$$$list".' 1>&2 ; \
          exit 1; \
        else :; fi
+
+sc_mkinstalldirs:
        @if grep -n 'mkinstalldirs' $(srcdir)/lib/am/[a-z]*.am | \
              grep -F -v '$$(mkinstalldirs)'; then \
          echo "Found incorrect use of mkinstalldirs in the lines above" 1>&2; \
          exit 1; \
        else :; fi
+
+sc_pre_normal_post_install_uninstall:
        @if grep -E -n '\((PRE|NORMAL|POST)_(|UN)INSTALL\)' \
                  $(srcdir)/lib/am/[a-z]*.am | \
              grep -v ':##' | grep -v ':        @\$$('; then \
          echo "Found incorrect use of PRE/NORMAL/POST_INSTALL/UNINSTALL in the 
lines above" 1>&2; \
          exit 1; \
        else :; fi
+
+sc_perl_no_undef:
        @if grep -n -w 'undef ' $(srcdir)/automake.in | \
              grep -F -v 'undef $$/'; then \
          echo "Found undef in automake.in; use delete instead" 1>&2; \
          exit 1; \
        fi
+
+sc_perl_no_split_regex_space:
        @if grep -n 'split (/ /' $(srcdir)/automake.in; then \
          echo "Found bad split in the lines above." 1>&2; \
          exit 1; \
        fi
+
+sc_cd_in_backquotes:
        @if grep -n '^[^#]*` *cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am; then \
          echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
+
+sc_cd_relative_dir:
        @if grep -n '^[^#]*cd ' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am | \
              grep -v 'echo.*cd ' | \
@@ -857,48 +925,70 @@ maintainer-check: automake aclocal
          echo "Consider using \$$(am__cd) in the lines above." 1>&2; \
          exit 1; \
        fi
+
+sc_perl_at_uscore_in_scalar_context:
        @if grep -Hn 'address@hidden) ] *= address@hidden' 
$(srcdir)/automake.in; then \
          echo "Using @_ in a scalar context in the lines above." 1>&2; \
          exit 1; \
        fi
+
+sc_perl_local_no_parens:
        @if grep '^[ \t]*local *(' $(srcdir)/automake.in; then \
          echo "Don't use \`local' with parens: use several \`local' above." 
>&2; \
          exit 1; \
        fi
+
+sc_perl_local:
        @if grep -v '^[ \t]*local \$$_;' $(srcdir)/automake.in | \
                grep '^[ \t]*local [^*]'; then \
          echo "Please avoid \`local'." 1>&2; \
          exit 1; \
        fi
+
+sc_AMDEP_TRUE_in_automake_in:
        @if grep '@AMDEP''_TRUE@' $(srcdir)/automake.in; then \
          echo "Don't put AMDEP_TRUE substitution in automake.in" 1>&2; \
          exit 1; \
        fi
+
+sc_tests_make_without_am_makeflags:
        @if grep '^[^#].*(MAKE) ' $(srcdir)/lib/am/*.am $(srcdir)/automake.in |\
                grep -v 'AM_MAKEFLAGS'; then \
          echo 'Use $$(MAKE) $$(AM_MAKEFLAGS).' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_make:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*make'; then \
          echo 'Do not run "make" in the above tests.  Use "$$MAKE" instead.' 
1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_autoconf:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoconf'; 
then \
          echo 'Do not run "autoconf" in the above tests.  Use "$$AUTOCONF" 
instead.' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_autoupdate:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*autoupdate'; 
then \
          echo 'Do not run "autoupdate" in the above tests.  Use "$$AUTOUPDATE" 
instead.' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_automake:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep -E ':[   
]*automake([^:]|$$)'; then \
          echo 'Do not run "automake" in the above tests.  Use "$$AUTOMAKE" 
instead.' 1>&2;  \
          exit 1; \
        fi
+
+sc_tests_here_document_format:
        @if grep '<<' $(srcdir)/tests/*.test | grep -v 'END' | grep -v 'EOF'; 
then \
          echo 'Use here documents with "END" and "EOF" only, for 
greppability.' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_Exit_not_exit:
        @found=false; for file in $(srcdir)/tests/*.test; do \
          res=`sed -n '/^#/d; /^\$$PERL/d; /<<.*END/,/^END/{b;}; 
/<<.*EOF/,/^EOF/{b;}; /exit [$$0-9]/p' $$file`; \
          if test -n "$$res"; then \
@@ -910,24 +1000,34 @@ maintainer-check: automake aclocal
          echo 'Do not call plain "exit", use "Exit" instead, in above tests.' 
1>&2; \
          exit 1; \
        fi
+
+sc_tests_automake_fails:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep 
'\$$AUTOMAKE.*&&.*[eE]xit'; then \
          echo 'Use AUTOMAKE_fails + grep to catch automake failures in the 
above tests.' 1>&2;  \
          exit 1; \
        fi
+
+sc_tests_plain_aclocal:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*aclocal'; 
then \
          echo 'Do not run "aclocal" in the above tests.  Use "$$ACLOCAL" 
instead.' 1>&2;  \
          exit 1; \
        fi
+
+sc_tests_plain_perl:
        @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[      ]*perl'; then \
          echo 'Do not run "perl" in the above tests.  Use "$$PERL" instead.' 
1>&2; \
          exit 1; \
        fi
+
+sc_tests_required_after_defs:
        @for file in $(srcdir)/tests/*.test; do \
          if out=`sed -n '/defs/,$${/required=/p;}' $$file`; test -n "$$out"; 
then \
            echo 'Do not set "required" after sourcing "defs" in '"$$file: 
$$out" 1>&2; \
            exit 1; \
          fi; \
        done
+
+sc_tests_overriding_macros_on_cmdline:
        @if grep -E '\$$MAKE .*(SHELL=.*=|=.*SHELL=)' $(srcdir)/tests/*.test; 
then \
          echo 'Rewrite "$$MAKE foo=bar SHELL=$$SHELL" as "foo=bar $$MAKE -e 
SHELL=$$SHELL"' 1>&2; \
          echo ' in the above lines, it is more portable.' 1>&2; \
@@ -944,10 +1044,14 @@ maintainer-check: automake aclocal
          echo 'the above lines.' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_sleep:
        @if grep -E '\bsleep +[12345]\b' $(srcdir)/tests/*.test; then \
          echo 'Do not use "sleep x" in the above tests.  Use "$$sleep" 
instead.' 1>&2; \
          exit 1; \
        fi
+
+sc_tests_plain_egrep_fgrep:
        @if grep -E '\b[ef]grep\b' $(srcdir)/tests/*.test ; then \
          echo 'Do not use egrep or fgrep in test cases.  Use $$FGREP or 
$$EGREP.' 1>&2; \
          exit 1; \
@@ -956,11 +1060,15 @@ maintainer-check: automake aclocal
          echo 'Do not use egrep or fgrep in the above files, they are not 
portable.' 1>&2; \
          exit 1; \
        fi
+
+sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
          echo 'Do not use mkdir_p in the above files, use MKDIR_P.' 1>&2; \
          exit 1; \
        fi
+
+sc_perl_at_substs:
        @if test `grep -E 'address@hidden@' aclocal | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in aclocal" 1>&2; \
          exit 1; \
@@ -968,15 +1076,21 @@ maintainer-check: automake aclocal
        @if test `grep -E 'address@hidden@' automake | wc -l` -ne 0; then \
          echo "Unresolved @...@ substitution in automake" 1>&2; \
          exit 1; \
-       fi; \
-       if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
+       fi
+
+sc_unquoted_DESTDIR:
+       @if grep -E "[^\'\"]\\\$$\(DESTDIR" $(srcdir)/lib/am/*.am; then \
          echo 'Suspicious unquoted DESTDIR uses.' 1>&2 ; \
          exit 1; \
        fi
+
+sc_tabs_in_texi:
        @if grep '      ' $(srcdir)/doc/automake.texi; then \
          echo 'Do not use tabs in the manual.' 1>&2; \
          exit 1; \
        fi
+
+sc_at_in_texi:
        @if grep -E '(address@hidden|^)@([       address@hidden|$$)' 
$(srcdir)/doc/automake.texi; \
        then \
          echo 'Unescaped @.' 1>&2; \
diff --git a/NEWS b/NEWS
index 0f7159d..9e3d629 100644
--- a/NEWS
+++ b/NEWS
@@ -83,6 +83,9 @@ New in 1.10a:
     Both install and uninstall may sometimes enter (`cd' into) the target
     installation directory now, when no build-local scripts are used.
 
+    Both install and uninstall do not fail anymore but do nothing if an
+    installation directory variable like `bindir' is set to the empty string.
+
     For built-in rules, `make install' now fails reliably if installation
     of a file failed.  Conversely, `make uninstall' even succeeds when
     issued multiple times.
@@ -114,9 +117,10 @@ New in 1.10a:
   - The `color-tests' option causes colored test result output on terminals.
 
   - The `parallel-tests' option enables a new test driver that allows for
-    parallel test execution, and formatted result output as RST
-    (reStructuredText) and HTML.  Enabling this option may require some
-    changes to your test suite setup; see the manual for details.
+    parallel test execution, inter-test dependencies, lazy test execution
+    for unit-testing, and formatted result output as RST (reStructuredText)
+    and HTML.  Enabling this option may require some changes to your test
+    suite setup; see the manual for details.
 
   - The `silent-rules' option enables Linux kernel-style silent build output.
     This option requires the widely supported but non-POSIX `make' feature
@@ -195,6 +199,9 @@ Bugs fixed in 1.10a:
   - The default no-op recursive rules for these targets also work with BSD make
     now: html, install-html, install-dvi, install-pdf, install-pdf, 
install-info.
 
+  - `make distcheck' works also when both a directory and some file below it
+    have been added to a distribution variable, such as EXTRA_DIST or 
*_SOURCES.
+
 * Bugs introduced by 1.10:
 
   - Fix output of dummy dependency files in presence of post-processed
diff --git a/THANKS b/THANKS
index c99d634..9f91c9c 100644
--- a/THANKS
+++ b/THANKS
@@ -155,6 +155,7 @@ Johannes Nicolai    address@hidden
 John F Trudeau         address@hidden
 John Pierce            address@hidden
 John Ratliff           address@hidden
+John R. Cary           address@hidden
 John W. Coomes         address@hidden
 Josh MacDonald         address@hidden
 Joshua Cowan           address@hidden
diff --git a/automake.in b/automake.in
index 11caff9..6165851 100755
--- a/automake.in
+++ b/automake.in
@@ -935,6 +935,7 @@ register_language ('name' => 'fc',
                   'compiler' => 'FCCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
+                  'libtool_tag' => 'FC',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
@@ -4917,6 +4918,13 @@ sub handle_tests
                return $obj
                  if $val =~ /address@hidden@$/;
                $obj =~ s/\$\(EXEEXT\)$//o;
+
+               if ($val =~ /(\$\((top_)?srcdir\))\//o)
+                 {
+                   msg ('error', $subvar->rdef ($cond)->location,
+                        "parallel-tests: using `$1' in TESTS is currently 
broken: `$val'");
+                 }
+
                foreach my $test_suffix (@test_suffixes)
                  {
                    next
@@ -4929,6 +4937,7 @@ sub handle_tests
                                                GENERIC => 0,
                                                OBJ => $obj,
                                                SOURCE => $val,
+                                               COMPILE => '',
                                                EXT => '');
                return $obj;
              });
@@ -4953,12 +4962,21 @@ sub handle_tests
              $post = '.log';
              $prev = $cur;
              $nhelper++;
-             $output_rules .= file_contents ('check2', new Automake::Location,
-                                             GENERIC => 1,
-                                             OBJ => '',
-                                             SOURCE => '$<',
-                                             EXT => $test_suffix)
-               if $test_suffix ne $at_exeext && $test_suffix ne '';
+             if ($test_suffix ne $at_exeext && $test_suffix ne '')
+               {
+                 (my $ext = $test_suffix) =~ s/^\.//;
+                 $ext = uc $ext;
+                 my $compile = $ext . '_LOG_COMPILE';
+                 define_variable ($compile,
+                                  '$(' . $ext . '_LOG_COMPILER) $(AM_' .  $ext 
. '_LOG_FLAGS)'
+                                  . ' $(' . $ext . '_LOG_FLAGS)', INTERNAL);
+                 $output_rules .= file_contents ('check2', new 
Automake::Location,
+                                                 GENERIC => 1,
+                                                 OBJ => '',
+                                                 SOURCE => '$<',
+                                                 COMPILE => '$(' . $compile . 
')' ,
+                                                 EXT => $test_suffix);
+               }
            }
 
          define_variable ('TEST_LOGS_TMP', '$(TEST_LOGS:.log=.log-t)', 
INTERNAL);
diff --git a/configure.ac b/configure.ac
index 7073d6a..d7bf2fa 100644
--- a/configure.ac
+++ b/configure.ac
@@ -29,7 +29,7 @@ AC_CANONICAL_BUILD
 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
 
-AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests])
+AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests 
parallel-tests])
 
 # The API version is the base version.  We must guarantee
 # compatibility for all releases with the same API version.
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 61915de..e78b11c 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -334,7 +334,8 @@ maintainer-clean-vti:
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
          rm -f "$(DESTDIR)$(dvidir)/$$f"; \
@@ -342,7 +343,8 @@ uninstall-dvi-am:
 
 uninstall-html-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(HTMLS)'; for p in $$list; do \
+       @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
          rm -rf "$(DESTDIR)$(htmldir)/$$f"; \
@@ -374,7 +376,8 @@ uninstall-info-am:
 
 uninstall-pdf-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
          rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
@@ -382,7 +385,8 @@ uninstall-pdf-am:
 
 uninstall-ps-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
          rm -f "$(DESTDIR)$(psdir)/$$f"; \
@@ -423,7 +427,7 @@ maintainer-clean-aminfo:
 install-man1: $(dist_man1_MANS)
        @$(NORMAL_INSTALL)
        test -z "$(man1dir)" || $(MKDIR_P) "$(DESTDIR)$(man1dir)"
-       @list='$(dist_man1_MANS)'; \
+       @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
        { for i in $$list; do echo "$$i"; done; \
        } | while read p; do \
          if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
@@ -447,7 +451,7 @@ install-man1: $(dist_man1_MANS)
 
 uninstall-man1:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_man1_MANS)'; \
+       @list='$(dist_man1_MANS)'; test -n "$(man1dir)" || exit 0; \
        files=`{ for i in $$list; do echo "$$i"; done; \
        } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \
              -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \
@@ -457,7 +461,8 @@ uninstall-man1:
 install-dist_docDATA: $(dist_doc_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
-       @list='$(dist_doc_DATA)'; for p in $$list; do \
+       @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -468,7 +473,7 @@ install-dist_docDATA: $(dist_doc_DATA)
 
 uninstall-dist_docDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_doc_DATA)'; \
+       @list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
@@ -555,10 +560,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
@@ -628,7 +637,8 @@ install-dvi: install-dvi-am
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
        test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -643,7 +653,8 @@ install-html: install-html-am
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
        test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-       @list='$(HTMLS)'; list2=; for p in $$list; do \
+       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          $(am__strip_dir) \
          if test -d "$$d$$p"; then \
@@ -666,7 +677,7 @@ install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
        test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
        for file in $$list; do \
          case $$file in \
            $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \
@@ -686,7 +697,7 @@ install-info-am: $(INFO_DEPS)
        @$(POST_INSTALL)
        @if (install-info --version && \
             install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
+         list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
            echo " install-info --info-dir='$(DESTDIR)$(infodir)' 
'$(DESTDIR)$(infodir)/$$relfile'";\
@@ -700,7 +711,8 @@ install-pdf: install-pdf-am
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
        test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -712,7 +724,8 @@ install-ps: install-ps-am
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
        test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
diff --git a/doc/automake.texi b/doc/automake.texi
index 84048aa..764dad6 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -101,7 +101,7 @@ section entitled address@hidden Free Documentation 
License.''
 * configure::                   Scanning configure.ac or configure.in
 * Directories::                 Declaring subdirectories
 * Programs::                    Building programs and libraries
-* Other objects::               Other derived objects
+* Other Objects::               Other derived objects
 * Other GNU Tools::             Other GNU Tools
 * Documentation::               Building documentation
 * Install::                     What gets installed
@@ -161,7 +161,7 @@ General ideas
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
 * Canonicalization::            How derived variables are named
-* Length limitations::          Staying below the command line length limit
+* Length Limitations::          Staying below the command line length limit
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 
@@ -179,8 +179,8 @@ Scanning @file{configure.ac}
 
 Auto-generating aclocal.m4
 
-* aclocal options::             Options supported by aclocal
-* Macro search path::           How aclocal finds .m4 files
+* aclocal Options::             Options supported by aclocal
+* Macro Search Path::           How aclocal finds .m4 files
 * Extending aclocal::           Writing your own aclocal macros
 * Local Macros::                Organizing local macros
 * Serials::                     Serial lines in Autoconf macros
@@ -188,9 +188,9 @@ Auto-generating aclocal.m4
 
 Autoconf macros supplied with Automake
 
-* Public macros::               Macros that you can use.
-* Obsolete macros::             Macros that you should stop using.
-* Private macros::              Macros that you should not use.
+* Public Macros::               Macros that you can use.
+* Obsolete Macros::             Macros that you should stop using.
+* Private Macros::              Macros that you should not use.
 
 Directories
 
@@ -199,6 +199,13 @@ Directories
 * Alternative::                 Subdirectories without recursion
 * Subpackages::                 Nesting packages
 
+Conditional Subdirectories
+
+* SUBDIRS vs DIST_SUBDIRS::     Two sets of directories
+* Subdirectories with AM_CONDITIONAL::  Specifying conditional subdirectories
+* Subdirectories with AC_SUBST::  Another way for conditional recursion
+* Unconfigured Subdirectories::  Not even creating a @samp{Makefile}
+
 Building Programs and Libraries
 
 * A Program::                   Building a program
@@ -208,7 +215,7 @@ Building Programs and Libraries
                                 library builds
 * Default _SOURCES::            Default source files
 * LIBOBJS::                     Special handling for LIBOBJS and ALLOCA
-* Program variables::           Variables used when building a program
+* Program Variables::           Variables used when building a program
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
 * Objective C Support::         Compiling Objective C sources
@@ -262,9 +269,9 @@ Other Derived Objects
 * Data::                        Architecture-independent data files
 * Sources::                     Derived sources
 
-Built sources
+Built Sources
 
-* Built sources example::       Several ways to handle built sources.
+* Built Sources Example::       Several ways to handle built sources.
 
 Other GNU Tools
 
@@ -277,7 +284,30 @@ Other GNU Tools
 Building documentation
 
 * Texinfo::                     Texinfo
-* Man pages::                   Man pages
+* Man Pages::                   Man pages
+
+Installation
+
+* Basics of Installation::      What gets installed where
+* The Two Parts of Install::    Installing data and programs separately
+* Extending Installation::      Adding your own rules for installation
+* Staged Installs::             Installation in a temporary location
+* Install Rules for the User::  Useful additional rules
+
+Distribution
+
+* Basics of Distribution::      Files distributed by default
+* Fine-grained Distribution Control::  @code{dist_} and @code{nodist_} prefixes
+* The dist Hook::               A target for last-minute distribution changes
+* Checking the Distribution::   @samp{make distcheck} explained
+* The Types of Distributions::  A variety of formats and compression methods
+
+Support for Test Suites
+
+* Simple Tests::                Listing programs and scripts in @code{TESTS}
+* Simple Tests using parallel-tests::  More powerful test driver
+* DejaGnu Tests::               Interfacing with the external testing framework
+* Install Tests::               Running tests on installed packages
 
 Miscellaneous Rules
 
@@ -285,6 +315,11 @@ Miscellaneous Rules
 * Suffixes::                    Handling new file extensions
 * Multilibs::                   Support for multilibs.
 
+Conditionals
+
+* Usage of Conditionals::       Declaring conditional content
+* Limits of Conditionals::      Enclosing complete statements
+
 When Automake Isn't Enough
 
 * Extending::                   Adding new rules or overriding existing ones.
@@ -295,10 +330,10 @@ Frequently Asked Questions about Automake
 * CVS::                         CVS and generated files
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
 * wildcards::                   Why doesn't Automake support wildcards?
-* limitations on file names::   Limitations on source and installed file names
+* Limitations on File Names::   Limitations on source and installed file names
 * distcleancheck::              Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs.@: AM_CFLAGS vs.@: mumble_CFLAGS
-* renamed objects::             Why are object files sometimes renamed?
+* Renamed Objects::             Why are object files sometimes renamed?
 * Per-Object Flags::            How to simulate per-object flags?
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to Hard-Coded Locations
@@ -309,6 +344,15 @@ History of Automake
 * Dependency Tracking Evolution::  Evolution of Automatic Dependency Tracking
 * Releases::                    Statistics about Automake Releases
 
+Dependency Tracking Evolution
+
+* First Take on Dependencies::  Precomputed dependency tracking
+* Dependencies As Side Effects::  Update at developer compile time
+* Dependencies for the User::   Update at user compile time
+* Techniques for Dependencies:: Alternative approaches
+* Recommendations for Tool Writers::  What tool writers can do to help
+* Future Directions for Dependencies::  Languages Automake does not know
+
 Copying This Manual
 
 * GNU Free Documentation License::  License for copying this manual
@@ -927,8 +971,8 @@ provided earlier (@pxref{Standard Directory Variables}), 
all the
 variables based on @var{exec-prefix} designate architecture-dependent
 directories whose files will be installed by @code{make install-exec}.
 The others designate architecture-independent directories and will
-serve files installed by @code{make install-data}.  @xref{Install},
-for more details.
+serve files installed by @code{make install-data}.  @xref{The Two Parts
+of Install}, for more details.
 
 Here is how we could revisit our two-host installation example,
 assuming that (1) we want to install the package directly in
@@ -1027,7 +1071,7 @@ create output.
 @end table
 
 For instance when installing GCC, the GNU Compiler Collection, we can
-use @address@hidden to specify that we want to build
+use @option{--target=@/@var{TARGET}} to specify that we want to build
 GCC as a cross-compiler for @var{TARGET}.  Mixing @option{--build} and
 @option{--target}, we can actually cross-compile a cross-compiler;
 such a three-way cross-compilation is known as a @dfn{Canadian cross}.
@@ -1043,7 +1087,7 @@ options.
 @cindex Programs, renaming during installation
 
 The GNU Build System provides means to automatically rename
-executables and manpages before they are installed (@pxref{Man pages}).
+executables and manpages before they are installed (@pxref{Man Pages}).
 This is especially convenient
 when installing a GNU package on a system that already has a
 proprietary implementation you do not want to overwrite.  For instance,
@@ -1183,8 +1227,8 @@ being erased by @code{make clean}, or even @code{VPATH} 
builds not
 working).
 
 @xref{Creating amhello}, to recreate @file{amhello-1.0.tar.gz} using
address@hidden distcheck}.  @xref{Dist}, for more information about
address@hidden
address@hidden distcheck}.  @xref{Checking the Distribution}, for more
+information about @code{distcheck}.
 
 @node Dependency Tracking
 @subsection Automatic Dependency Tracking
@@ -1689,7 +1733,7 @@ understand how Automake works.
 * Strictness::                  Standards conformance checking
 * Uniform::                     The Uniform Naming Scheme
 * Canonicalization::            How derived variables are named
-* Length limitations::          Staying below the command line length limit
+* Length Limitations::          Staying below the command line length limit
 * User Variables::              Variables reserved for the user
 * Auxiliary Programs::          Programs automake might require
 @end menu
@@ -1977,10 +2021,10 @@ Some primaries also allow additional prefixes that 
control other
 aspects of @command{automake}'s behavior.  The currently defined prefixes
 are @samp{dist_}, @samp{nodist_}, @samp{nobase_}, and @samp{notrans_}.
 These prefixes are explained later (@pxref{Program and Library Variables})
-(@pxref{Man pages}).
+(@pxref{Man Pages}).
 
 
address@hidden Length limitations
address@hidden Length Limitations
 @section Staying below the command line length limit
 
 @cindex command line length limit
@@ -2017,10 +2061,10 @@ data2_DATA = address@hidden @dots{} address@hidden
 
 @noindent
 and will cause Automake to treat the two lists separately during
address@hidden install}.  See @ref{Install} for choosing directory names
-that will keep the ordering of the two parts of installation
-(@pxref{Two-Part Install}).  Note that @code{make dist} may still
-only work on a host with a higher length limit in this example.
address@hidden install}.  See @ref{The Two Parts of Install} for choosing
+directory names that will keep the ordering of the two parts of
+installation Note that @code{make dist} may still only work on a host
+with a higher length limit in this example.
 
 Automake itself employs a couple of strategies to avoid long command
 lines.  For example, when @address@hidden@}/} is prepended to file
@@ -2930,7 +2974,7 @@ This introduces an Automake conditional 
(@pxref{Conditionals}).
 This macro allows @code{automake} to detect subsequent access within
 @file{configure.ac} to a conditional previously introduced with
 @code{AM_CONDITIONAL}, thus enabling conditional @code{AC_CONFIG_FILES}
-(@pxref{Conditionals}).
+(@pxref{Usage of Conditionals}).
 
 @item AM_GNU_GETTEXT
 This macro is required for packages that use GNU gettext
@@ -3000,7 +3044,7 @@ aclocal}).  You can also use it to maintain your own set 
of custom
 macros (@pxref{Local Macros}).
 
 At startup, @command{aclocal} scans all the @file{.m4} files it can
-find, looking for macro definitions (@pxref{Macro search path}).  Then
+find, looking for macro definitions (@pxref{Macro Search Path}).  Then
 it scans @file{configure.ac}.  Any mention of one of the macros found
 in the first step causes that macro, and any macros it in turn
 requires, to be put into @file{aclocal.m4}.
@@ -3039,16 +3083,16 @@ called conditionally).  @command{autom4te} is expected 
to be in the
 overridden using the @env{AUTOM4TE} environment variable.
 
 @menu
-* aclocal options::             Options supported by aclocal
-* Macro search path::           How aclocal finds .m4 files
+* aclocal Options::             Options supported by aclocal
+* Macro Search Path::           How aclocal finds .m4 files
 * Extending aclocal::           Writing your own aclocal macros
 * Local Macros::                Organizing local macros
 * Serials::                     Serial lines in Autoconf macros
 * Future of aclocal::           aclocal's scheduled death
 @end menu
 
address@hidden aclocal options
address@hidden aclocal options
address@hidden aclocal Options
address@hidden aclocal Options
 
 @cindex @command{aclocal}, Options
 @cindex Options, @command{aclocal}
@@ -3151,8 +3195,8 @@ way as it is for @command{automake} (@pxref{Invoking 
Automake}).
 
 @end table
 
address@hidden Macro search path
address@hidden Macro search path
address@hidden Macro Search Path
address@hidden Macro Search Path
 
 @cindex Macro search path
 @cindex @command{aclocal} search path
@@ -3172,7 +3216,7 @@ configured when @command{automake} itself is built.  This 
is
 @file{@@datadir@@/aclocal/}, which typically
 expands to @address@hidden@}/share/aclocal/}.  To find the compiled-in
 value of @var{acdir}, use the @option{--print-ac-dir} option
-(@pxref{aclocal options}).
+(@pxref{aclocal Options}).
 @end table
 
 As an example, suppose that @command{automake-1.6.2} was configured with
@@ -3183,10 +3227,10 @@ As an example, suppose that @command{automake-1.6.2} 
was configured with
 @item @file{/usr/local/share/aclocal/}
 @end enumerate
 
-As explained in (@pxref{aclocal options}), there are several options that
+As explained in (@pxref{aclocal Options}), there are several options that
 can be used to change or extend this search path.
 
address@hidden Modifying the macro search path: @option{--acdir}
address@hidden Modifying the Macro Search Path: @option{--acdir}
 
 The most erroneous option to modify the search path is
 @address@hidden, which changes default directory and
@@ -3200,10 +3244,10 @@ drops the @var{APIVERSION} directory.  For example, if 
one specifies
 This option, @option{--acdir}, is intended for use by the internal
 Automake test suite only; it is not ordinarily needed by end-users.
 
address@hidden Modifying the macro search path: @samp{-I @var{dir}}
address@hidden Modifying the Macro Search Path: @samp{-I @var{dir}}
 
 Any extra directories specified using @option{-I} options
-(@pxref{aclocal options}) are @emph{prepended} to this search list.  Thus,
+(@pxref{aclocal Options}) are @emph{prepended} to this search list.  Thus,
 @samp{aclocal -I /foo -I /bar} results in the following search path:
 
 @enumerate
@@ -3213,7 +3257,7 @@ Any extra directories specified using @option{-I} options
 @item @var{acdir}
 @end enumerate
 
address@hidden Modifying the macro search path: @file{dirlist}
address@hidden Modifying the Macro Search Path: @file{dirlist}
 @cindex @file{dirlist}
 
 There is a third mechanism for customizing the search path.  If a
@@ -3435,7 +3479,7 @@ do not really care about the rebuild rules, you should 
define
 When @samp{aclocal -I m4} is run, it will build an @file{aclocal.m4}
 that @code{m4_include}s any file from @file{m4/} that defines a
 required macro.  Macros not found locally will still be searched in
-system-wide directories, as explained in @ref{Macro search path}.
+system-wide directories, as explained in @ref{Macro Search Path}.
 
 Custom macros should be distributed for the same reason that
 @file{configure.ac} is: so that other people have all the sources of
@@ -3598,8 +3642,8 @@ with serial 1.
 
 @noindent
 Because both files have the same serial number, @command{aclocal} uses
-the first it found in its search path order (@pxref{Macro search
-path}).  @command{aclocal} therefore ignores
+the first it found in its search path order (@pxref{Macro Search
+Path}).  @command{aclocal} therefore ignores
 @file{/usr/share/aclocal/thirdparty.m4} and outputs an
 @file{aclocal.m4} that contains @samp{m4_include([m4/thirdparty.m4])}.
 
@@ -3705,15 +3749,15 @@ Automake ships with several Autoconf macros that you 
can use from your
 @command{aclocal} in @file{aclocal.m4}.
 
 @menu
-* Public macros::               Macros that you can use.
-* Obsolete macros::             Macros that you should stop using.
-* Private macros::              Macros that you should not use.
+* Public Macros::               Macros that you can use.
+* Obsolete Macros::             Macros that you should stop using.
+* Private Macros::              Macros that you should not use.
 @end menu
 
 @c consider generating the following subsections automatically from m4 files.
 
address@hidden Public macros
address@hidden Public macros
address@hidden Public Macros
address@hidden Public Macros
 
 @table @code
 
@@ -3870,8 +3914,8 @@ into @code{LIBOBJS}.
 @end table
 
 
address@hidden Obsolete macros
address@hidden Obsolete macros
address@hidden Obsolete Macros
address@hidden Obsolete Macros
 @cindex obsolete macros
 @cindex autoupdate
 
@@ -3945,8 +3989,8 @@ you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} 
instead.
 @end table
 
 
address@hidden Private macros
address@hidden Private macros
address@hidden Private Macros
address@hidden Private Macros
 
 The following macros are private macros you should not call directly.
 They are called by the other public macros when appropriate.  Do not
@@ -4101,6 +4145,14 @@ Variables, autoconf, The Autoconf Manual}).  Using 
Automake
 conditionals is the preferred solution.  Before we illustrate these
 two possibilities, let's introduce @code{DIST_SUBDIRS}.
 
address@hidden
+* SUBDIRS vs DIST_SUBDIRS::     Two sets of directories
+* Subdirectories with AM_CONDITIONAL::  Specifying conditional subdirectories
+* Subdirectories with AC_SUBST::  Another way for conditional recursion
+* Unconfigured Subdirectories::  Not even creating a @samp{Makefile}
address@hidden menu
+
address@hidden SUBDIRS vs DIST_SUBDIRS
 @subsection @code{SUBDIRS} vs.@: @code{DIST_SUBDIRS}
 @cindex @code{DIST_SUBDIRS}, explained
 
@@ -4133,7 +4185,8 @@ If @code{SUBDIRS} contains @code{AC_SUBST} variables,
 does not know the possible values of these variables.  In this case
 @code{DIST_SUBDIRS} needs to be defined manually.
 
address@hidden Conditional subdirectories with @code{AM_CONDITIONAL}
address@hidden Subdirectories with AM_CONDITIONAL
address@hidden Subdirectories with @code{AM_CONDITIONAL}
 @cindex @code{SUBDIRS} and @code{AM_CONDITIONAL}
 @cindex @code{AM_CONDITIONAL} and @code{SUBDIRS}
 
@@ -4174,7 +4227,8 @@ In this case Automake will define @samp{DIST_SUBDIRS = 
src opt}
 automatically because it knows that @code{MAYBE_OPT} can contain
 @samp{opt} in some condition.
 
address@hidden Conditional Subdirectories with @code{AC_SUBST}
address@hidden Subdirectories with AC_SUBST
address@hidden Subdirectories with @code{AC_SUBST}
 @cindex @code{SUBDIRS} and @code{AC_SUBST}
 @cindex @code{AC_SUBST} and @code{SUBDIRS}
 
@@ -4208,7 +4262,8 @@ The drawback is that since Automake cannot guess what the 
possible
 values of @code{MAYBE_OPT} are, it is necessary to define
 @code{DIST_SUBDIRS}.
 
address@hidden Non-configured Subdirectories
address@hidden Unconfigured Subdirectories
address@hidden Unconfigured Subdirectories
 @cindex Subdirectories, configured conditionally
 
 The semantics of @code{DIST_SUBDIRS} are often misunderstood by some
@@ -4252,7 +4307,7 @@ lists all the directories that have been configured.
 @end itemize
 @end cartouche
 
-In order to prevent recursion in some non-configured directory you
+In order to prevent recursion in some unconfigured directory you
 must therefore ensure that this directory does not appear in
 @code{DIST_SUBDIRS} (and @code{SUBDIRS}).  For instance, if you define
 @code{SUBDIRS} conditionally using @code{AC_SUBST} and do not define
@@ -4268,7 +4323,7 @@ configuration where all directories are known to appear in
 distribute these directories).
 
 @cindex Subdirectories, not distributed
-In few packages, non-configured directories are not even expected to
+In few packages, unconfigured directories are not even expected to
 be distributed.  Although these packages do not require the
 aforementioned extra arrangements, there is another pitfall.  If the
 name of a directory appears in @code{SUBDIRS} or @code{DIST_SUBDIRS},
@@ -4325,7 +4380,8 @@ nobase_include_HEADERS = sys/types.h
 @vindex nodist_
 
 @samp{nobase_} should be specified first when used in conjunction with
-either @samp{dist_} or @samp{nodist_} (@pxref{Dist}).  For instance:
+either @samp{dist_} or @samp{nodist_} (@pxref{Fine-grained Distribution
+Control}).  For instance:
 
 @example
 nobase_dist_pkgdata_DATA = images/vortex.pgm sounds/whirl.ogg
@@ -4468,7 +4524,7 @@ to build programs and libraries.
                                 library builds
 * Default _SOURCES::            Default source files
 * LIBOBJS::                     Special handling for LIBOBJS and ALLOCA
-* Program variables::           Variables used when building a program
+* Program Variables::           Variables used when building a program
 * Yacc and Lex::                Yacc and Lex support
 * C++ Support::                 Compiling C++ sources
 * Objective C Support::         Compiling Objective C sources
@@ -4670,7 +4726,7 @@ Fortunately there are two other ways to achieve the same 
result.  One is
 to use configure substitutions in @code{_LDADD} variables, the other is
 to use an Automake conditional.
 
address@hidden Conditional compilation using @code{_LDADD} substitutions
address@hidden Conditional Compilation using @code{_LDADD} Substitutions
 
 @cindex @code{EXTRA_prog_SOURCES}, defined
 
@@ -4708,7 +4764,7 @@ either @file{hello-linux.o} or @file{hello-generic.o}, 
and added to
 both @code{hello_DEPENDENCIES} and @code{hello_LDADD} in order to be
 built and linked in.
 
address@hidden Conditional compilation using Automake conditionals
address@hidden Conditional Compilation using Automake Conditionals
 
 An often simpler way to compile source files conditionally is to use
 Automake conditionals.  For instance, you could use this
@@ -4754,7 +4810,7 @@ at configure time.  For instance, GNU @code{cpio} only 
builds
 achieve conditional compilation of programs are the same you can use
 to compile source files conditionally: substitutions or conditionals.
 
address@hidden Conditional programs using @command{configure} substitutions
address@hidden Conditional Programs using @command{configure} Substitutions
 
 @vindex EXTRA_PROGRAMS
 @cindex @code{EXTRA_PROGRAMS}, defined
@@ -4779,7 +4835,7 @@ Obviously it cannot rewrite values obtained at run-time 
through
 appending @samp{$(EXEEXT)} yourself, as in @samp{AC_SUBST([MT],
 ['address@hidden@}'])}.
 
address@hidden Conditional programs using Automake conditionals
address@hidden Conditional Programs using Automake Conditionals
 
 You can also use Automake conditionals (@pxref{Conditionals}) to
 select programs to be built.  In this case you don't have to worry
@@ -5297,7 +5353,13 @@ performed automatically by Autoconf (@pxref{AC_LIBOBJ vs 
LIBOBJS, ,
 @node Libtool Issues
 @subsection Common Issues Related to Libtool's Use
 
address@hidden @samp{required file `./ltmain.sh' not found}
address@hidden
+* Error required file ltmain.sh not found::      The need to run libtoolize
+* Objects created both with libtool and without:: Avoid a specific build race
address@hidden menu
+
address@hidden Error required file ltmain.sh not found
address@hidden Error: @samp{required file `./ltmain.sh' not found}
 @cindex @file{ltmain.sh} not found
 @cindex @command{libtoolize}, no longer run by @command{automake}
 @cindex @command{libtoolize} and @command{autoreconf}
@@ -5325,6 +5387,7 @@ replacing existing @file{bootstrap.sh} or 
@file{autogen.sh} scripts by
 a call to @command{autoreconf} should also free you from any similar
 incompatible change in the future.
 
address@hidden Objects created both with libtool and without
 @subsubsection Objects @samp{created with both libtool and without}
 
 Sometimes, the same source file is used both to build a libtool
@@ -5359,7 +5422,7 @@ object `foo.$(OBJEXT)' created both with libtool and 
without
 @end example
 
 A workaround for this issue is to ensure that these two objects get
-different basenames.  As explained in @ref{renamed objects}, this
+different basenames.  As explained in @ref{Renamed Objects}, this
 happens automatically when per-targets flags are used.
 
 @example
@@ -5583,7 +5646,7 @@ different name for the intermediate object files.  
Ordinarily a file
 like @file{sample.c} will be compiled to produce @file{sample.o}.
 However, if the program's @code{_CFLAGS} variable is set, then the
 object file will be named, for instance, @file{maude-sample.o}.  (See
-also @ref{renamed objects}.)  The use of per-target compilation flags
+also @ref{Renamed Objects}.)  The use of per-target compilation flags
 with C sources requires that the macro @code{AM_PROG_CC_C_O} be called
 from @file{configure.ac}.
 
@@ -5848,7 +5911,7 @@ be defined by hand (as in the past), however at the time 
of writing
 autoconf, The Autoconf Manual}.
 
 
address@hidden Program variables
address@hidden Program Variables
 @section Variables used when building a program
 
 Occasionally it is useful to know which @file{Makefile} variables
@@ -6040,7 +6103,7 @@ We recommend using the following renaming hack used in 
@command{gdb}:
 #define yylhs   c_yylhs
 #define yylen   c_yylen
 #define yydefred c_yydefred
-#define yydgoto c_yydgoto
+#define yydgoto  c_yydgoto
 #define yysindex c_yysindex
 #define yyrindex c_yyrindex
 #define yygindex c_yygindex
@@ -6136,7 +6199,7 @@ Automake includes some support for Unified Parallel C.
 
 Any package including Unified Parallel C code must define the output
 variable @code{UPC} in @file{configure.ac}; the simplest way to do
-this is to use the @code{AM_PROG_UPC} macro (@pxref{Public macros}).
+this is to use the @code{AM_PROG_UPC} macro (@pxref{Public Macros}).
 
 A few additional variables are defined when a Unified Parallel C
 source file is seen:
@@ -6320,7 +6383,6 @@ Fortran 77, C and C++ compilers on nearly all platforms.  
However,
 @command{cfortran} is not yet Free Software, but it will be in the next
 major release.}.
 
address@hidden
 Automake can help in two ways:
 
 @enumerate
@@ -6373,8 +6435,6 @@ is mentioned in @file{configure.ac}.  Also, if 
@samp{$(FLIBS)} hadn't
 been mentioned in @code{foo_LDADD} and @code{libfoo_la_LIBADD}, then
 Automake would have issued a warning.
 
-
address@hidden
 @menu
 * How the Linker is Chosen::    Automatic linker selection
 @end menu
@@ -6704,7 +6764,7 @@ bin_PROGRAMS = liver$(EXEEXT)
 The targets Automake generates are likewise given the @samp{$(EXEEXT)}
 extension.
 
-The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Tests}) are also
+The variables @code{TESTS} and @code{XFAIL_TESTS} (@pxref{Simple Tests}) are 
also
 rewritten if they contain filenames that have been declared as programs
 in the same @file{Makefile}.  (This is mostly useful when some programs
 from @code{check_PROGRAMS} are listed in @code{TESTS}.)
@@ -6736,7 +6796,7 @@ an @command{automake}-generated rule for 
@samp{foo$(EXEEXT)}.  Without
 the @option{no-exeext} option, this use will give a diagnostic.
 
 
address@hidden Other objects
address@hidden Other Objects
 @chapter Other Derived Objects
 
 Automake can handle derived objects that are not C programs.  Sometimes
@@ -6815,7 +6875,7 @@ automake: automake.in Makefile
 Such scripts for which a build rule has been supplied need to be
 deleted explicitly using @code{CLEANFILES} (@pxref{Clean}), and their
 sources have to be distributed, usually with @code{EXTRA_DIST}
-(@pxref{Dist}).
+(@pxref{Basics of Distribution}).
 
 Another common way to build scripts is to process them from
 @file{configure} with @code{AC_CONFIG_FILES}.  In this situation
@@ -6891,8 +6951,8 @@ will install the two files as @file{$(includedir)/foo.h} 
and
 Usually, only header files that accompany installed libraries need to
 be installed.  Headers used by programs or convenience libraries are
 not installed.  The @code{noinst_HEADERS} variable can be used for
-such headers.  However when the header actually belongs to one
-convenient library or program, we recommend listing it in the
+such headers.  However when the header actually belongs to a single
+convenience library or program, we recommend listing it in the
 program's or library's @code{_SOURCES} variable (@pxref{Program
 Sources}) instead of in @code{noinst_HEADERS}.  This is clearer for
 the @file{Makefile.am} reader.  @code{noinst_HEADERS} would be the
@@ -6944,7 +7004,7 @@ dist_pkgdata_DATA = clean-kr.am clean.am @dots{}
 
 
 @node Sources
address@hidden Built sources
address@hidden Built Sources
 
 Because Automake's automatic dependency tracking works as a side-effect
 of compilation (@pxref{Dependencies}) there is a bootstrap issue: a
@@ -7002,11 +7062,11 @@ The next section illustrates and discusses the handling 
of built sources
 on a toy example.
 
 @menu
-* Built sources example::       Several ways to handle built sources.
+* Built Sources Example::       Several ways to handle built sources.
 @end menu
 
address@hidden Built sources example
address@hidden Built sources example
address@hidden Built Sources Example
address@hidden Built Sources Example
 
 Suppose that @file{foo.c} includes @file{bindir.h}, which is
 installation-dependent and not distributed: it needs to be built.  Here
@@ -7018,7 +7078,7 @@ We suggest several implementations below.  It's not meant 
to be an
 exhaustive listing of all ways to handle built sources, but it will give
 you a few ideas if you encounter this issue.
 
address@hidden First try
address@hidden First Try
 
 This first implementation will illustrate the bootstrap issue mentioned
 in the previous section (@pxref{Sources}).
@@ -7059,7 +7119,7 @@ for instance, it should be inspected while generating tags
 (@pxref{Tags}).  In other words, it does not help our present problem,
 and the build would fail identically without it.
 
address@hidden Using @code{BUILT_SOURCES}
address@hidden Using @code{BUILT_SOURCES}
 
 A solution is to require @file{bindir.h} to be built before anything
 else.  This is what @code{BUILT_SOURCES} is meant for (@pxref{Sources}).
@@ -7108,7 +7168,7 @@ foo.c:2: bindir.h: No such file or directory
 make: *** [foo.o] Error 1
 @end example
 
address@hidden Recording dependencies manually
address@hidden Recording Dependencies manually
 
 Usually people are happy enough with @code{BUILT_SOURCES} because they
 never build targets such as @samp{make foo} before @samp{make all}, as
@@ -7144,7 +7204,7 @@ because Automake doesn't have to output any 
@samp{foo.$(OBJEXT):}
 target: it relies on a suffix rule instead (i.e., @samp{.c.$(OBJEXT):}).
 Always check the generated @file{Makefile.in} if you do this.
 
address@hidden Build @file{bindir.h} from @file{configure}
address@hidden Build @file{bindir.h} from @file{configure}
 
 It's possible to define this preprocessor macro from @file{configure},
 either in @file{config.h} (@pxref{Defining Directories, , Defining
@@ -7169,7 +7229,7 @@ However, it's not always possible to build sources from
 @file{configure}, especially when these sources are generated by a tool
 that needs to be built first.
 
address@hidden Build @file{bindir.c}, not @file{bindir.h}.
address@hidden Build @file{bindir.c}, not @file{bindir.h}.
 
 Another attractive idea is to define @code{bindir} as a variable or
 function exported from @file{bindir.o}, and build @file{bindir.c}
@@ -7189,7 +7249,7 @@ need to be built, so it won't cause any trouble.  
@file{bindir.o} is
 always dependent on @file{bindir.c}, so @file{bindir.c} will get built
 first.
 
address@hidden Which is best?
address@hidden Which is best?
 
 There is no panacea, of course.  Each solution has its merits and
 drawbacks.
@@ -7507,7 +7567,7 @@ Currently Automake provides support for Texinfo and man 
pages.
 
 @menu
 * Texinfo::                     Texinfo
-* Man pages::                   Man pages
+* Man Pages::                   Man pages
 @end menu
 
 
@@ -7712,8 +7772,8 @@ TEXINFO_TEX = ../doc/texinfo.tex
 @end vtable
 
 
address@hidden Man pages
address@hidden Man pages
address@hidden Man Pages
address@hidden Man Pages
 
 @cindex @code{_MANS} primary, defined
 @cindex @code{MANS} primary, defined
@@ -7804,7 +7864,8 @@ notrans_man_MANS = foo.3
 @cindex @code{nodist_} and @code{notrans_}
 
 @samp{notrans_} must be specified first when used in conjunction with
-either @samp{dist_} or @samp{nodist_} (@pxref{Dist}).  For instance:
+either @samp{dist_} or @samp{nodist_} (@pxref{Fine-grained Distribution
+Control}).  For instance:
 
 @example
 notrans_dist_man3_MANS = bar.3
@@ -7816,13 +7877,22 @@ notrans_dist_man3_MANS = bar.3
 @cindex Installation support
 @cindex @samp{make install} support
 
address@hidden Basics of installation
-
 Naturally, Automake handles the details of actually installing your
 program once it has been built.  All files named by the various
 primaries are automatically installed in the appropriate places when the
 user runs @samp{make install}.
 
address@hidden
+* Basics of Installation::      What gets installed where
+* The Two Parts of Install::    Installing data and programs separately
+* Extending Installation::      Adding your own rules for installation
+* Staged Installs::             Installation in a temporary location
+* Install Rules for the User::  Useful additional rules
address@hidden menu
+
address@hidden Basics of Installation
address@hidden Basics of Installation
+
 A file named in a primary is installed by copying the built file into
 the appropriate directory.  The base name of the file is used when
 installing.
@@ -7849,7 +7919,7 @@ will install @file{stdio.h} in @samp{$(includedir)} and 
@file{types.h}
 in @samp{$(includedir)/sys}.
 
 For most file types, Automake will install multiple files at once, while
-avoiding command line length issues (@pxref{Length limitations}).  Since
+avoiding command line length issues (@pxref{Length Limitations}).  Since
 some @command{install} programs will not install the same file twice in
 one invocation, you may need to ensure that file lists are unique within
 one variable such as @samp{nobase_include_HEADERS} above.
@@ -7860,7 +7930,8 @@ rely on any particular file installation order even among 
different
 file types (library dependencies are an exception here).
 
 
address@hidden The two parts of install
address@hidden The Two Parts of Install
address@hidden The Two Parts of Install
 
 Automake generates separate @code{install-data} and @code{install-exec}
 rules, in case the installer is installing on multiple machines that
@@ -7893,7 +7964,8 @@ the name (e.g., @code{myexecbin_PROGRAMS}) is installed by
 @code{install-exec}.  All other user-defined prefixes are installed by
 @code{install-data}.
 
address@hidden Extending installation
address@hidden Extending Installation
address@hidden Extending Installation
 
 It is possible to extend this mechanism by defining an
 @code{install-exec-local} or @code{install-data-local} rule.  If these
@@ -7909,7 +7981,8 @@ instance, it is possible to perform post-installation 
modifications
 using an install hook.  @xref{Extending}, for some examples.
 @cindex Install hook
 
address@hidden Staged installs
address@hidden Staged Installs
address@hidden Staged Installs
 
 @vindex DESTDIR
 Automake generates support for the @code{DESTDIR} variable in all
@@ -7942,7 +8015,8 @@ must write that code to respect @code{DESTDIR}.
 @xref{Makefile Conventions, , , standards, The GNU Coding Standards},
 for another usage example.
 
address@hidden Rules for the user
address@hidden Install Rules for the User
address@hidden Install Rules for the User
 
 Automake also generates rules for targets @code{uninstall},
 @code{installdirs}, and @code{install-strip}.
@@ -8024,7 +8098,16 @@ We recommend that you follow this same set of heuristics 
in your
 @node Dist
 @chapter What Goes in a Distribution
 
address@hidden Basics of distribution
address@hidden
+* Basics of Distribution::      Files distributed by default
+* Fine-grained Distribution Control::  @code{dist_} and @code{nodist_} prefixes
+* The dist Hook::               A target for last-minute distribution changes
+* Checking the Distribution::   @samp{make distcheck} explained
+* The Types of Distributions::  A variety of formats and compression methods
address@hidden menu
+
address@hidden Basics of Distribution
address@hidden Basics of Distribution
 
 @cindex @samp{make dist}
 
@@ -8083,7 +8166,8 @@ exact list of subdirectories to include in the 
distribution
 (@pxref{Conditional Subdirectories}).
 
 
address@hidden Fine-grained distribution control
address@hidden Fine-grained Distribution Control
address@hidden Fine-grained Distribution Control
 
 @vindex dist_
 @vindex nodist_
@@ -8105,7 +8189,8 @@ bin_PROGRAMS = foo
 nodist_foo_SOURCES = do-not-distribute.c
 @end example
 
address@hidden The dist hook
address@hidden The dist Hook
address@hidden The dist Hook
 
 @trindex dist-hook
 
@@ -8155,7 +8240,8 @@ Note that when packages are nested using 
@code{AC_CONFIG_SUBDIRS}
 @samp{$(top_distdir)} are relative to the package where @samp{make
 dist} was run, not to any sub-packages involved.
 
address@hidden Checking the distribution
address@hidden Checking the Distribution
address@hidden Checking the Distribution
 
 @cindex @samp{make distcheck}
 @cindex @samp{make distcleancheck}
@@ -8250,7 +8336,8 @@ distuninstallcheck:
         @@:
 @end example
 
address@hidden The types of distributions
address@hidden The Types of Distributions
address@hidden The Types of Distributions
 
 Automake generates rules to provide archives of the project for
 distributions in various formats.  Their targets are:
@@ -8305,6 +8392,14 @@ default, only the @code{dist-gzip} target is hooked to 
@code{dist}.
 Automake supports three forms of test suites, the first two of which
 are very similar.
 
address@hidden
+* Simple Tests::                Listing programs and scripts in @code{TESTS}
+* Simple Tests using parallel-tests::  More powerful test driver
+* DejaGnu Tests::               Interfacing with the external testing framework
+* Install Tests::               Running tests on installed packages
address@hidden menu
+
address@hidden Simple Tests
 @section Simple Tests
 
 If the variable @code{TESTS} is defined, its value is taken to be a
@@ -8313,7 +8408,8 @@ Programs needing data files should look for them in 
@code{srcdir}
 (which is both an environment variable and a make variable) so they
 work when building in a separate directory (@pxref{Build Directories,
 , Build Directories , autoconf, The Autoconf Manual}), and in
-particular for the @code{distcheck} rule (@pxref{Dist}).
+particular for the @code{distcheck} rule (@pxref{Checking the
+Distribution}).
 
 For each of the @code{TESTS}, the result of execution is printed along
 with the test name, where @code{PASS} denotes a successful test,
@@ -8377,11 +8473,13 @@ by the tests, not the tests themselves.  Of course you 
can set
 @code{TESTS = $(check_PROGRAMS)} if all your programs are test cases.
 
 
address@hidden Simple tests using @samp{parallel-tests}
address@hidden Simple Tests using parallel-tests
address@hidden Simple Tests using @samp{parallel-tests}
 @cindex @option{parallel-tests}, Using
+
 The option @option{parallel-tests} (@pxref{Options}) enables a test
-suite driver that is mostly compatible to the simple test driver
-described above, but provides a few more features and slightly different
+suite driver that is mostly compatible to the simple test driver described
+in the previous section, but provides a few more features and slightly 
different
 semantics.  It features concurrent execution of tests with @code{make -j},
 allows to specify inter-test dependencies, lazy reruns of tests that
 have not completed in a prior run, summary and verbose output in
@@ -8391,8 +8489,11 @@ for exceptional failures.  Similar to the simple test 
driver,
 the @code{check_*} variables are honored, and the environment variable
 @env{srcdir} is set during test execution.
 
+This test driver is still experimental and may undergo changes in order
+to satisfy additional portability requirements.
+
 @vindex TEST_SUITE_LOG
address@hidden TEST_LOGS
address@hidden TESTS
 The driver operates by defining a set of @command{make} rules to create
 a summary log file, @code{TEST_SUITE_LOG}, which defaults to
 @file{test-suite.log} and requires a @file{.log} suffix.  This file
@@ -8401,6 +8502,7 @@ depends upon log files created for each single test 
program listed in
 corresponding tests.
 
 @vindex TEST_EXTENSIONS
address@hidden TEST_LOGS
 Each log file is created when the corresponding test has completed.
 The set of log files is listed in the read-only variable
 @code{TEST_LOGS}, and defaults to @code{TESTS}, with the executable
@@ -8409,6 +8511,34 @@ extension if any (@pxref{EXEEXT}), as well as any suffix 
listed in
 @code{TEST_EXTENSIONS} defaults to @file{.test}.  Results are undefined
 if a test file name ends in several concatenated suffixes.
 
address@hidden _LOG_COMPILER
address@hidden _LOG_FLAGS
address@hidden @var{EXT}_LOG_COMPILE
address@hidden @var{EXT}_LOG_COMPILER
address@hidden @var{EXT}_LOG_FLAGS
address@hidden address@hidden
+For tests that match an extension @address@hidden listed in
address@hidden, you can provide a test driver using the variable
address@hidden@var{ext}_LOG_COMPILER} (note the upper-case extension) and pass
+options in @address@hidden and allow the user to pass
+options in @address@hidden  It will cause all tests with
+this extension to be called with this driver.  For example,
+
address@hidden
+TESTS = foo.pl bar.py
+TEST_EXTENSIONS = .pl .py
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -w
+PY_LOG_COMPILER = $(PYTHON)
+PY_LOG_FLAGS = -v
address@hidden example
+
address@hidden
+will invoke @samp{$(PERL) -w foo.pl} and @samp{$(PYTHON) -v bar.py} to
+produce @file{foo.log} and @file{bar.log}, respectively.  The
address@hidden variable is still expanded before the driver,
+but should be reserved for the user.
+
 @vindex VERBOSE
 As with the simple driver above, by default one status line is printed
 per completed test, and a short summary after the suite has completed.
@@ -8444,12 +8574,55 @@ Tests can exit with an exit status of 99 to signal such 
a @emph{hard
 error}.  Unless the variable @code{DISABLE_HARD_ERRORS} is set to a
 nonempty value, such tests will be counted as failed.
 
address@hidden LAZY_TEST_SUITE
-By default, all tests listed in @code{TESTS} are run upon @code{make
-check}.  When @code{LAZY_TEST_SUITE} is nonempty, then log files of
-a previous run are not removed before starting the test suite, so only
-tests that have not yet been completed are run, as well as tests that
-have been modified after the previous run.
+By default, the test suite driver will run all tests, but there are
+several ways to limit the set of tests that are run:
+
address@hidden @bullet
address@hidden
+You can set the @code{TESTS} variable, similarly to how you can with
+the simple test driver from the previous section.  For example, you can
+use a command like this to run only a subset of the tests:
+
address@hidden
+env TESTS="foo.test bar.test" make -e check
address@hidden example
+
address@hidden
+You can set the @code{TEST_LOGS} variable.  By default, this variable is
+computed at @command{make} run time from the value of @code{TESTS} as
+described above.  For example, you can use the following:
+
address@hidden
+set x subset*.log; shift
+env TEST_LOGS="foo.log $*" make -e check
address@hidden example
+
address@hidden
address@hidden RECHECK_LOGS
address@hidden lazy test execution
+By default, the test driver removes all old per-test log files before it
+starts running tests to regenerate them.  The variable
address@hidden contains the set of log files which are removed.
address@hidden defaults to @code{TEST_LOGS}, which means all tests
+need to be rechecked.  By overriding this variable, you can choose which
+tests need to be reconsidered.  For example, you can lazily rerun only
+those tests which are outdated, i.e., older than their prerequisite test
+files, by setting this variable to the empty value:
+
address@hidden
+env RECHECK_LOGS= make -e check
address@hidden example
+
address@hidden
address@hidden recheck
address@hidden recheck-html
+You can ensure that all tests are rerun which have failed or passed
+unexpectedly, by running @code{make recheck} in the test directory.
+This convenience target will set @code{RECHECK_LOGS} appropriately
+before invoking the main test driver.  The @code{recheck-html} target
+does the same as @code{recheck} but again converts the resulting log
+file in HTML format, like the @code{check-html} target.
address@hidden itemize
 
 In order to guarantee an ordering between tests even with @code{make
 address@hidden, dependencies between the corresponding log files may be
@@ -8484,7 +8657,19 @@ the inference rules generated by @command{automake} can 
apply.  For
 literal test names, @command{automake} can generate per-target rules
 to avoid this limitation.
 
+Please note that it is currently not possible to use @code{$(srcdir)/}
+or @code{$(top_srcdir)/} in the @code{TESTS} variable.  This technical
+limitation is necessary to avoid generating test logs in the source tree
+and has the unfortunate consequence thast it is not possible to specify
+distributed tests that are themselves generated by means of explicit
+rules, in a way that is portable to all @command{make} implementations
+(@pxref{Make Target Lookup,,, autoconf, The Autoconf Manual}, the
+semantics of FreeBSD and OpenBSD @command{make} conflict with this).
+In case of doubt you may want to require to use GNU @command{make},
+or work around the issue with inference rules to generate the tests.
+
 
address@hidden DejaGnu Tests
 @section DejaGnu Tests
 
 If @uref{ftp://ftp.gnu.org/gnu/dejagnu/, @command{dejagnu}} appears in
@@ -8529,6 +8714,7 @@ dejagnu, The DejaGnu Manual}.
 
 In either case, the testing is done via @samp{make check}.
 
address@hidden Install Tests
 @section Install Tests
 
 The @code{installcheck} target is available to the user as a way to
@@ -8679,13 +8865,13 @@ in the first few lines of the @file{NEWS} file.
 @item @option{color-tests}
 @cindex Option, @option{color-tests}
 @opindex color-tests
-Cause output of the simple test suite (@pxref{Tests}) to be
+Cause output of the simple test suite (@pxref{Simple Tests}) to be
 colorized on capable terminals.
 
 @item @option{dejagnu}
 @cindex Option, @option{dejagnu}
 @opindex dejagnu
-Cause @command{dejagnu}-specific rules to be generated.  @xref{Tests}.
+Cause @command{dejagnu}-specific rules to be generated.  @xref{DejaGnu Tests}.
 
 @item @option{dist-bzip2}
 @cindex Option, @option{dist-bzip2}
@@ -8803,7 +8989,7 @@ this directory.
 @cindex Option, @option{parallel-tests}
 @opindex parallel-tests
 Enable test suite driver for @code{TESTS} that can run tests in parallel
-(@pxref{Tests}, for more information).
+(@pxref{Simple Tests using parallel-tests}, for more information).
 
 @item @option{readme-alpha}
 @cindex Option, @option{readme-alpha}
@@ -9160,7 +9346,24 @@ they are needed to rebuild @file{Makefile.in}.
 
 Automake supports a simple type of conditionals.
 
address@hidden Usage
+These conditionals are not the same as conditionals in
+GNU Make.  Automake conditionals are checked at configure time by the
address@hidden script, and affect the translation from
address@hidden to @file{Makefile}.  They are based on options passed
+to @file{configure} and on results that @file{configure} has discovered
+about the host system.  GNU Make conditionals are checked at @command{make}
+time, and are based on variables passed to the make program or defined
+in the @file{Makefile}.
+
+Automake conditionals will work with any make program.
+
address@hidden
+* Usage of Conditionals::       Declaring conditional content
+* Limits of Conditionals::      Enclosing complete statements
address@hidden menu
+
address@hidden Usage of Conditionals
address@hidden Usage of Conditionals
 
 @acindex AM_CONDITIONAL
 Before using a conditional, you must define it by using
@@ -9266,20 +9469,8 @@ AM_COND_IF([SHELL_WRAPPER],
            [AC_CONFIG_FILES([wrapper:wrapper.in])])
 @end example
 
address@hidden Portability
-
-Note that conditionals in Automake are not the same as conditionals in
-GNU Make.  Automake conditionals are checked at configure time by the
address@hidden script, and affect the translation from
address@hidden to @file{Makefile}.  They are based on options passed
-to @file{configure} and on results that @file{configure} has discovered
-about the host system.  GNU Make conditionals are checked at @command{make}
-time, and are based on variables passed to the make program or defined
-in the @file{Makefile}.
-
-Automake conditionals will work with any make program.
-
address@hidden Limits
address@hidden Limits of Conditionals
address@hidden Limits of Conditionals
 
 Conditionals should enclose complete statements like variables or
 rules definitions.  Automake cannot deal with conditionals used inside
@@ -9306,7 +9497,8 @@ endif
 AM_CPPFLAGS = -DFEATURE_A $(DEBUGFLAGS) -DFEATURE_B
 @end example
 
address@hidden or
address@hidden
+or
 
 @example
 AM_CPPFLAGS = -DFEATURE_A
@@ -9316,6 +9508,12 @@ endif
 AM_CPPFLAGS += -DFEATURE_B
 @end example
 
+More details and examples of conditionals are described alongside
+various Automake features in this manual (@pxref{Conditional
+Subdirectories}, @pxref{Conditional Sources}, @pxref{Conditional
+Programs}, @pxref{Conditional Libtool Libraries}, @pxref{Conditional
+Libtool Sources}).
+
 @node Gnits
 @chapter The effect of @option{--gnu} and @option{--gnits}
 
@@ -9632,10 +9830,10 @@ destination directory in order to create relative links.
 
 When writing @code{install-exec-hook} or @code{install-data-hook},
 please bear in mind that the exec/data distinction is based on the
-installation directory, not on the primary used (@pxref{Install}).  So
-a @code{foo_SCRIPTS} will be installed by @code{install-data}, and a
address@hidden will be installed by @code{install-exec}.  You
-should define your hooks consequently.
+installation directory, not on the primary used (@pxref{The Two Parts of
+Install}).  So a @code{foo_SCRIPTS} will be installed by
address@hidden, and a @code{barexec_SCRIPTS} will be installed by
address@hidden  You should define your hooks consequently.
 
 @c FIXME should include discussion of variables you can use in these
 @c rules
@@ -9675,7 +9873,7 @@ constructed.  Of course this target is not required if the
 @option{no-dist} option (@pxref{Options}) is used.
 
 The variables @samp{$(top_distdir)} and @samp{$(distdir)}
-(@pxref{Dist}) will be passed from the outer package to the subpackage
+(@pxref{The dist Hook}) will be passed from the outer package to the subpackage
 when the @code{distdir} target is invoked.  These two variables have
 been adjusted for the directory that is being recursed into, so they
 are ready to use.
@@ -9969,10 +10167,10 @@ lists.
 * CVS::                         CVS and generated files
 * maintainer-mode::             missing and AM_MAINTAINER_MODE
 * wildcards::                   Why doesn't Automake support wildcards?
-* limitations on file names::   Limitations on source and installed file names
+* Limitations on File Names::   Limitations on source and installed file names
 * distcleancheck::              Files left in build directory after distclean
 * Flag Variables Ordering::     CFLAGS vs.@: AM_CFLAGS vs.@: mumble_CFLAGS
-* renamed objects::             Why are object files sometimes renamed?
+* Renamed Objects::             Why are object files sometimes renamed?
 * Per-Object Flags::            How to simulate per-object flags?
 * Multiple Outputs::            Writing rules for tools with many output files
 * Hard-Coded Install Paths::    Installing to Hard-Coded Locations
@@ -9981,7 +10179,7 @@ lists.
 @node CVS
 @section CVS and generated files
 
address@hidden Background: distributed generated files
address@hidden Background: distributed generated Files
 @cindex generated files, distributed
 @cindex rebuild rules
 
@@ -10002,7 +10200,7 @@ As generated files shipped in packages are up-to-date, 
and because
 @command{tar} preserves times-tamps, these rebuild rules are not
 triggered when a user unpacks and builds a package.
 
address@hidden Background: CVS and timestamps
address@hidden Background: CVS and Timestamps
 @cindex timestamps and CVS
 @cindex CVS and timestamps
 
@@ -10025,7 +10223,7 @@ after a @command{cvs update} that updates both files, 
even if
 checked in.  Calling @command{make} will then trigger a spurious rebuild
 of @file{configure}.
 
address@hidden Living with CVS in Autoconfiscated projects
address@hidden Living with CVS in Autoconfiscated Projects
 @cindex CVS and generated files
 @cindex generated files and CVS
 
@@ -10033,7 +10231,7 @@ There are basically two clans amongst maintainers: 
those who keep all
 distributed files under CVS, including generated files, and those who
 keep generated files @emph{out} of CVS.
 
address@hidden All files in CVS
address@hidden All Files in CVS
 
 @itemize @bullet
 @item
@@ -10099,7 +10297,7 @@ tree, @file{Makefile.in} will happen to be newer than
 
 @end itemize
 
address@hidden Generated files out of CVS
address@hidden Generated Files out of CVS
 
 One way to get CVS and @command{make} working peacefully is to never
 store generated files in CVS, i.e., do not CVS-control files that
@@ -10125,7 +10323,7 @@ produces bogus output (for instance a non-portable C 
file), something
 other developers could have noticed if they weren't using their own
 versions of this tool.
 
address@hidden Third-party files
address@hidden Third-party Files
 @cindex CVS and third-party files
 @cindex third-party files and CVS
 
@@ -10143,7 +10341,7 @@ Issues, Integrating with CVS, gettext, GNU gettext 
tools}.
 @node maintainer-mode
 @section @command{missing} and @code{AM_MAINTAINER_MODE}
 
address@hidden @command{missing}
address@hidden @command{missing}
 @cindex @command{missing}, purpose
 
 The @command{missing} script is a wrapper around several maintainer
@@ -10172,7 +10370,7 @@ rule is spuriously triggered, halting the build.  This 
failure to let
 the build continue is one of the arguments of the
 @code{AM_MAINTAINER_MODE} advocates.
 
address@hidden @code{AM_MAINTAINER_MODE}
address@hidden @code{AM_MAINTAINER_MODE}
 @cindex @code{AM_MAINTAINER_MODE}, purpose
 @acindex AM_MAINTAINER_MODE
 
@@ -10294,8 +10492,8 @@ variables as far Automake is concerned.
 You can get warnings about @samp{$(wildcard ...}) constructs using the
 @option{-Wportability} flag.
 
address@hidden limitations on file names
address@hidden Limitations on file names
address@hidden Limitations on File Names
address@hidden Limitations on File Names
 @cindex file names, limitations on
 
 Automake attempts to support all kinds of file names, even those that
@@ -10368,8 +10566,8 @@ Nowadays it is no longer worth worrying about the 8.3 
limits of
 This is a diagnostic you might encounter while running @samp{make
 distcheck}.
 
-As explained in @ref{Dist}, @samp{make distcheck} attempts to build
-and check your package for errors like this one.
+As explained in @ref{Checking the Distribution}, @samp{make distcheck}
+attempts to build and check your package for errors like this one.
 
 @samp{make distcheck} will perform a @code{VPATH} build of your
 package (@pxref{VPATH Builds}), and then call @samp{make distclean}.
@@ -10501,7 +10699,8 @@ in distributing it.
 
 @vrindex distcleancheck_listfiles
 For desperate cases, it's always possible to disable this check by
-setting @code{distcleancheck_listfiles} as documented in @ref{Dist}.
+setting @code{distcleancheck_listfiles} as documented in @ref{Checking
+the Distribution}.
 Make sure you do understand the reason why @samp{make distcheck}
 complains before you do this.  @code{distcleancheck_listfiles} is a
 way to @emph{hide} errors, not to fix them.  You can always do better.
@@ -10528,7 +10727,7 @@ put the flag into @code{AM_CXXFLAGS} it is prepended to 
the other
 flags, not appended.
 @end display
 
address@hidden Compile Flag Variables
address@hidden Compile Flag Variables
 @cindex Flag Variables, Ordering
 @cindex Compile Flag Variables
 @cindex @code{AM_CCASFLAGS} and @code{CCASFLAGS}
@@ -10706,12 +10905,12 @@ Finally, we have avoided naming the variable of the 
example
 Automake to think that this is actually a per-target variable (like
 @code{mumble_LDFLAGS}) for some non-declared @code{LIBFOO} target.
 
address@hidden Other Variables
address@hidden Other Variables
 
 There are other variables in Automake that follow similar principles
 to allow user options.  For instance, Texinfo rules (@pxref{Texinfo})
 use @code{MAKEINFOFLAGS} and @code{AM_MAKEINFOFLAGS}.  Similarly,
-DejaGnu tests (@pxref{Tests}) use @code{RUNTESTDEFAULTFLAGS} and
+DejaGnu tests (@pxref{DejaGnu Tests}) use @code{RUNTESTDEFAULTFLAGS} and
 @code{AM_RUNTESTDEFAULTFLAGS}.  The tags and ctags rules
 (@pxref{Tags}) use @code{ETAGSFLAGS}, @code{AM_ETAGSFLAGS},
 @code{CTAGSFLAGS}, and @code{AM_CTAGSFLAGS}.  Java rules
@@ -10725,7 +10924,7 @@ obeys this naming scheme.  The slight difference is that
 
 However you should not think that all variables ending with
 @code{FLAGS} follow this convention.  For instance,
address@hidden (@pxref{Dist}) and
address@hidden (@pxref{Checking the Distribution}) and
 @code{ACLOCAL_AMFLAGS} (see @ref{Rebuilding} and @ref{Local Macros}),
 are two variables that are only useful to the maintainer and have no
 user counterpart.
@@ -10741,7 +10940,7 @@ variable), and @code{mumble_LIBADD} exists only as a 
per-target
 variable.  @xref{Program and Library Variables}.
 
 
address@hidden renamed objects
address@hidden Renamed Objects
 @section Why are object files sometimes renamed?
 
 This happens when per-target compilation flags are used.  Object
@@ -10807,7 +11006,7 @@ foo_CFLAGS = -some -flags
 @noindent
 @file{foo-foo.o}, @file{foo-bar.o}, and @file{foo-main.o} will all be
 compiled with @samp{-some -flags}.  (If you wonder about the names of
-these object files, see @ref{renamed objects}.)  Note that
+these object files, see @ref{Renamed Objects}.)  Note that
 @code{foo_CFLAGS} gives the flags to use when compiling all the C
 sources of the @emph{program} @code{foo}, it has nothing to do with
 @file{foo.c} or @file{foo-foo.o} specifically.
@@ -10846,8 +11045,8 @@ could think about defining the @samp{foo-foo.o: foo.c} 
rule yourself.
 We recommend against this, because this is error prone.  For instance,
 if you add such a rule to the first example, it will break the day you
 decide to remove @code{foo_CFLAGS} (because @file{foo.c} will then be
-compiled as @file{foo.o} instead of @file{foo-foo.o}, @pxref{renamed
-objects}).  Also in order to support dependency tracking, the two
+compiled as @file{foo.o} instead of @file{foo-foo.o}, @pxref{Renamed
+Objects}).  Also in order to support dependency tracking, the two
 @file{.o}/@file{.obj} extensions, and all the other flags variables
 involved in a compilation, you will end up modifying a copy of the
 rule previously output by @command{automake} for this file.  If a new
@@ -12030,7 +12229,17 @@ tracking methods, their flaws, and their fixes.  We 
conclude with
 recommendations for tool writers, and by indicating future directions
 for dependency tracking work in Automake.
 
address@hidden First Take
address@hidden
+* First Take on Dependencies::  Precomputed dependency tracking
+* Dependencies As Side Effects::  Update at developer compile time
+* Dependencies for the User::   Update at user compile time
+* Techniques for Dependencies:: Alternative approaches
+* Recommendations for Tool Writers::  What tool writers can do to help
+* Future Directions for Dependencies::  Languages Automake does not know
address@hidden menu
+
address@hidden First Take on Dependencies
address@hidden First Take on Dependency Tracking
 @unnumberedsubsubsec Description
 
 Our first attempt at automatic dependency tracking was based on the
@@ -12089,6 +12298,7 @@ implementation of dependency tracking, I believe the 
impetus and
 inspiration was Jim Meyering.  (I could be mistaken.  If you know
 otherwise feel free to correct me.)
 
address@hidden Dependencies As Side Effects
 @subsection Dependencies As Side Effects
 @unnumberedsubsubsec Description
 
@@ -12138,6 +12348,7 @@ output of @command{gcc} to include a dummy dependency 
for each header
 file.
 @end itemize
 
address@hidden Dependencies for the User
 @subsection Dependencies for the User
 @unnumberedsubsubsec Description
 
@@ -12238,6 +12449,7 @@ because we have to encode two compilation rules in 
@file{Makefile}
 (with or without @command{depcomp}), the produced @file{Makefile}s are
 larger.
 
address@hidden Techniques for Dependencies
 @subsection Techniques for Computing Dependencies
 
 There are actually several ways for a build tool like Automake to
@@ -12270,6 +12482,7 @@ powerful, but unfortunately it is not portable enough 
for use in
 @command{automake}.
 @end table
 
address@hidden Recommendations for Tool Writers
 @subsection Recommendations for Tool Writers
 
 We think that every compilation tool ought to be able to generate
@@ -12281,7 +12494,8 @@ bug.  Finally, the tool should generate a dependency 
for each probe,
 instead of each successful file open, in order to avoid the duplicated
 new header bug.
 
address@hidden Future Directions for Automake's Dependency Tracking
address@hidden Future Directions for Dependencies
address@hidden Future Directions for Dependencies
 
 Currently, only languages and compilers understood by Automake can
 have dependency tracking enabled.  We would like to see if it is
@@ -12460,7 +12674,7 @@ parentheses is the number of generated test cases.
 @c  LocalWords:  SunOS fying basenames exeext uninstalled oldinclude kr FSF's
 @c  LocalWords:  pkginclude oldincludedir sysconf sharedstate localstate gcc rm
 @c  LocalWords:  sysconfdir sharedstatedir localstatedir preexist CLEANFILES gz
address@hidden  LocalWords:  unnumberedsubsec depfile tmpdepfile depmode const 
interoperate
address@hidden  LocalWords:  depfile tmpdepfile depmode const interoperate
 @c  LocalWords:  JAVAC javac JAVAROOT builddir CLASSPATH ENV pyc pyo pkgpython
 @c  LocalWords:  pyexecdir pkgpyexecdir Python's pythondir pkgpythondir txi ois
 @c  LocalWords:  installinfo vers MAKEINFO makeinfo MAKEINFOFLAGS noinstall rf
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index ce768a9..fc94e53 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -84,6 +84,9 @@ am__installdirs = "$(DESTDIR)$(perllibdir)" 
"$(DESTDIR)$(perllibdir)"
 DATA = $(dist_perllib_DATA) $(nodist_perllib_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -275,7 +278,8 @@ $(am__aclocal_m4_deps):
 install-dist_perllibDATA: $(dist_perllib_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
-       @list='$(dist_perllib_DATA)'; for p in $$list; do \
+       @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -286,7 +290,7 @@ install-dist_perllibDATA: $(dist_perllib_DATA)
 
 uninstall-dist_perllibDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_perllib_DATA)'; \
+       @list='$(dist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
@@ -294,7 +298,8 @@ uninstall-dist_perllibDATA:
 install-nodist_perllibDATA: $(nodist_perllib_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(perllibdir)" || $(MKDIR_P) "$(DESTDIR)$(perllibdir)"
-       @list='$(nodist_perllib_DATA)'; for p in $$list; do \
+       @list='$(nodist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -305,7 +310,7 @@ install-nodist_perllibDATA: $(nodist_perllib_DATA)
 
 uninstall-nodist_perllibDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(nodist_perllib_DATA)'; \
+       @list='$(nodist_perllib_DATA)'; test -n "$(perllibdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(perllibdir)' && rm -f" $$files ")"; \
@@ -462,10 +467,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
diff --git a/lib/Automake/tests/.gitignore b/lib/Automake/tests/.gitignore
new file mode 100644
index 0000000..ffbdfaf
--- /dev/null
+++ b/lib/Automake/tests/.gitignore
@@ -0,0 +1,2 @@
+*.log
+*.log-t
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
index acd769f..ad5d45e 100644
--- a/lib/Automake/tests/Makefile.am
+++ b/lib/Automake/tests/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-## Copyright (C) 2002, 2003, 2008  Free Software Foundation, Inc.
+## Copyright (C) 2002, 2003, 2008, 2009  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
@@ -15,7 +15,10 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
+
 TESTS = \
 Condition.pl \
 Condition-t.pl \
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index b3cc49c..478dbe7 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -65,6 +65,72 @@ test "X$(AM_COLOR_TESTS)" != Xno \
   blu=''; \
   std=''; \
 }
+am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
+am__vpath_adj = case $$p in \
+    $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
+    *) f=$$p;; \
+  esac;
+am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
+am__install_max = 40
+am__nobase_strip_setup = \
+  srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
+am__nobase_strip = \
+  for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
+am__nobase_list = $(am__nobase_strip_setup); \
+  for p in $$list; do echo "$$p $$p"; done | \
+  sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
+  $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
+    if (++n[$$2] == $(am__install_max)) \
+      { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
+    END { for (dir in files) print dir, files[dir] }'
+am__base_list = \
+  sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
+  sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
+# Restructured Text title and section.
+am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
+am__rst_section = sed 'p;s/./=/g;p;g'
+# Put stdin (possibly several lines separated by ".  ") in a box.
+am__text_box = $(AWK) '{                               \
+  n = split($$0, lines, "\\.  "); max = 0;             \
+  for (i = 1; i <= n; ++i)                             \
+    if (max < length(lines[i]))                                \
+      max = length(lines[i]);                          \
+  for (i = 0; i < max; ++i) line = line "=";           \
+  print line;                                          \
+  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
+  print line;                                          \
+}'
+# Solaris 10 'make', and several other traditional 'make' implementations,
+# pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
+# by disabling -e (using the XSI extension "set +e") if it's set.
+am__sh_e_setup = case $$- in *e*) set +e;; esac
+# To be inserted before the command running the test.  Creates the
+# directory for the log if needed.  Stores in $dir the directory
+# containing $f, in $tst the test, in $log the log, and passes
+# TESTS_ENVIRONMENT.  Save and restore TERM around use of
+# TESTS_ENVIRONMENT, in case that unsets it.
+am__check_pre = \
+$(am__sh_e_setup);                                     \
+$(am__vpath_adj_setup) $(am__vpath_adj)                        \
+srcdir=$(srcdir); export srcdir;                       \
+rm -f address@hidden;                                          \
+trap 'st=$$?; rm -f '\''$(abs_builddir)/address@hidden'\''; (exit $$st); exit 
$$st' \
+  1 2 13 15;                                           \
+am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;           \
+test "x$$am__odir" = x. || $(MKDIR_P) "$$am__odir" || exit $$?;        \
+if test -f "./$$f"; then dir=./;                       \
+elif test -f "$$f"; then dir=;                         \
+else dir="$(srcdir)/"; fi;                             \
+tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
+$(TESTS_ENVIRONMENT)
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
+TEST_SUITE_LOG = test-suite.log
+TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
+am__test_logs1 = $(TESTS:=.log)
+TEST_LOGS = $(am__test_logs1:.pl.log=.log)
+PL_LOG_COMPILE = $(PL_LOG_COMPILER) $(AM_PL_LOG_FLAGS) $(PL_LOG_FLAGS)
+TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
@@ -154,7 +220,9 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
 TESTS = \
 Condition.pl \
 Condition-t.pl \
@@ -167,6 +235,7 @@ EXTRA_DIST = $(TESTS)
 all: all-am
 
 .SUFFIXES:
+.SUFFIXES: .html .log .pl
 $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
@@ -204,97 +273,159 @@ ctags: CTAGS
 CTAGS:
 
 
-check-TESTS: $(TESTS)
-       @failed=0; all=0; xfail=0; xpass=0; skip=0; \
-       srcdir=$(srcdir); export srcdir; \
-       list=' $(TESTS) '; \
-       $(am__tty_colors); \
-       if test -n "$$list"; then \
-         for tst in $$list; do \
-           if test -f ./$$tst; then dir=./; \
-           elif test -f $$tst; then dir=; \
-           else dir="$(srcdir)/"; fi; \
-           if $(TESTS_ENVIRONMENT) $${dir}$$tst; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *[\ \     ]$$tst[\ \      ]*) \
-               xpass=`expr $$xpass + 1`; \
-               failed=`expr $$failed + 1`; \
-               col=$$red; res=XPASS; \
-             ;; \
-             *) \
-               col=$$grn; res=PASS; \
-             ;; \
-             esac; \
-           elif test $$? -ne 77; then \
-             all=`expr $$all + 1`; \
-             case " $(XFAIL_TESTS) " in \
-             *[\ \     ]$$tst[\ \      ]*) \
-               xfail=`expr $$xfail + 1`; \
-               col=$$lgn; res=XFAIL; \
-             ;; \
-             *) \
-               failed=`expr $$failed + 1`; \
-               col=$$red; res=FAIL; \
-             ;; \
-             esac; \
-           else \
-             skip=`expr $$skip + 1`; \
-             col=$$blu; res=SKIP; \
-           fi; \
-           echo "$${col}$$res$${std}: $$tst"; \
-         done; \
-         if test "$$all" -eq 1; then \
-           tests="test"; \
-           All=""; \
-         else \
-           tests="tests"; \
-           All="All "; \
-         fi; \
-         if test "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="$$All$$all $$tests passed"; \
-           else \
-             if test "$$xfail" -eq 1; then failures=failure; else 
failures=failures; fi; \
-             banner="$$All$$all $$tests behaved as expected ($$xfail expected 
$$failures)"; \
-           fi; \
-         else \
-           if test "$$xpass" -eq 0; then \
-             banner="$$failed of $$all $$tests failed"; \
-           else \
-             if test "$$xpass" -eq 1; then passes=pass; else passes=passes; 
fi; \
-             banner="$$failed of $$all $$tests did not behave as expected 
($$xpass unexpected $$passes)"; \
-           fi; \
-         fi; \
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           if test "$$skip" -eq 1; then \
-             skipped="($$skip test was not run)"; \
-           else \
-             skipped="($$skip tests were not run)"; \
-           fi; \
-           test `echo "$$skipped" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$skipped"; \
-         fi; \
-         report=""; \
-         if test "$$failed" -ne 0 && test -n "$(PACKAGE_BUGREPORT)"; then \
-           report="Please report to $(PACKAGE_BUGREPORT)"; \
-           test `echo "$$report" | wc -c` -le `echo "$$banner" | wc -c` || \
-             dashes="$$report"; \
-         fi; \
-         dashes=`echo "$$dashes" | sed s/./=/g`; \
-         if test "$$failed" -eq 0; then \
-           echo "$$grn$$dashes"; \
-         else \
-           echo "$$red$$dashes"; \
-         fi; \
-         echo "$$banner"; \
-         test -z "$$skipped" || echo "$$skipped"; \
-         test -z "$$report" || echo "$$report"; \
-         echo "$$dashes$$std"; \
-         test "$$failed" -eq 0; \
-       else :; fi
+# To be appended to the command running the test.  Handle the stdout
+# and stderr redirection, and catch the exit status.
+am__check_post =                                       \
+>address@hidden 2>&1;                                          \
+estatus=$$?;                                           \
+if test -n '$(DISABLE_HARD_ERRORS)'                    \
+   && test $$estatus -eq 99; then                      \
+  estatus=1;                                           \
+fi;                                                    \
+TERM=$$__SAVED_TERM; export TERM;                      \
+$(am__tty_colors);                                     \
+xfailed=PASS;                                          \
+case " $(XFAIL_TESTS) " in                             \
+  *[\ \        ]$$f[\ \        ]* | *[\ \      ]$$dir$$f[\ \   ]*) \
+    xfailed=XFAIL;;                                    \
+esac;                                                  \
+case $$estatus:$$xfailed in                            \
+    0:XFAIL) col=$$red; res=XPASS;;                    \
+    0:*)     col=$$grn; res=PASS ;;                    \
+    77:*)    col=$$blu; res=SKIP ;;                    \
+    99:*)    col=$$red; res=FAIL ;;                    \
+    *:XFAIL) col=$$lgn; res=XFAIL;;                    \
+    *:*)     col=$$red; res=FAIL ;;                    \
+esac;                                                  \
+echo "$${col}$$res$${std}: $$f";                       \
+echo "$$res: $$f (exit: $$estatus)" |                  \
+  $(am__rst_section) >$@;                              \
+cat address@hidden >>$@;                                               \
+rm -f address@hidden
+
+$(TEST_SUITE_LOG): $(TEST_LOGS)
+       @$(am__sh_e_setup);                                             \
+       list='$(TEST_LOGS)';                                            \
+       results=`for f in $$list; do                                    \
+                  read line < $$f && echo "$$line" || echo FAIL;       \
+                done`;                                                 \
+       all=`echo "$$results" | sed '/^$$/d' | wc -l | sed -e 's/^[      
]*//'`; \
+       fail=`echo "$$results" | grep -c '^FAIL'`;                      \
+       pass=`echo "$$results" | grep -c '^PASS'`;                      \
+       skip=`echo "$$results" | grep -c '^SKIP'`;                      \
+       xfail=`echo "$$results" | grep -c '^XFAIL'`;                    \
+       xpass=`echo "$$results" | grep -c '^XPASS'`;                    \
+       failures=`expr $$fail + $$xpass`;                               \
+       all=`expr $$all - $$skip`;                                      \
+       if test "$$all" -eq 1; then tests=test; All=;                   \
+       else tests=tests; All="All "; fi;                               \
+       case fail=$$fail:xpass=$$xpass:xfail=$$xfail in                 \
+         fail=0:xpass=0:xfail=0)                                       \
+           msg="$$All$$all $$tests passed.  ";                         \
+           exit=true;;                                                 \
+         fail=0:xpass=0:xfail=*)                                       \
+           msg="$$All$$all $$tests behaved as expected";               \
+           if test "$$xfail" -eq 1; then xfailures=failure;            \
+           else xfailures=failures; fi;                                \
+           msg="$$msg ($$xfail expected $$xfailures).  ";              \
+           exit=true;;                                                 \
+         fail=*:xpass=0:xfail=*)                                       \
+           msg="$$fail of $$all $$tests failed.  ";                    \
+           exit=false;;                                                \
+         fail=*:xpass=*:xfail=*)                                       \
+           msg="$$failures of $$all $$tests did not behave as expected"; \
+           if test "$$xpass" -eq 1; then xpasses=pass;                 \
+           else xpasses=passes; fi;                                    \
+           msg="$$msg ($$xpass unexpected $$xpasses).  ";              \
+           exit=false;;                                                \
+         *)                                                            \
+            echo >&2 "incorrect case"; exit 4;;                                
\
+       esac;                                                           \
+       if test "$$skip" -ne 0; then                                    \
+         if test "$$skip" -eq 1; then                                  \
+           msg="$$msg($$skip test was not run).  ";                    \
+         else                                                          \
+           msg="$$msg($$skip tests were not run).  ";                  \
+         fi;                                                           \
+       fi;                                                             \
+       {                                                               \
+         echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" |       \
+           $(am__rst_title);                                           \
+         echo "$$msg";                                                 \
+         echo;                                                         \
+         echo ".. contents:: :depth: 2";                               \
+         echo;                                                         \
+         for f in $$list; do                                           \
+           read line < $$f;                                            \
+           case $$line in                                              \
+             PASS:*|XFAIL:*);;                                         \
+             *) echo; cat $$f;;                                        \
+           esac;                                                       \
+         done;                                                         \
+       } >$(TEST_SUITE_LOG).tmp;                                       \
+       mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
+       if test "$$failures" -ne 0; then                                \
+         msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG).  ";              \
+         if test -n "$(PACKAGE_BUGREPORT)"; then                       \
+           msg="$${msg}Please report to $(PACKAGE_BUGREPORT).  ";      \
+         fi;                                                           \
+       fi;                                                             \
+       $(am__tty_colors);                                              \
+       if $$exit; then                                                 \
+         echo $(ECHO_N) "$$grn$(ECHO_C)";                              \
+        else                                                           \
+         echo $(ECHO_N) "$$red$(ECHO_C)";                              \
+       fi;                                                             \
+       echo "$$msg" | $(am__text_box);                                 \
+       echo $(ECHO_N) "$$std$(ECHO_C)";                                \
+       test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
+       $$exit
+
+# Run all the tests.
+check-TESTS:
+       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
+       @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
+       @set_logs=; if test "X$(TEST_LOGS)" = X.log; then               \
+         set_logs=TEST_LOGS=;                                          \
+       fi;                                                             \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
+recheck-TESTS:
+       @list='$(TEST_LOGS)';                                           \
+       logs=`for f in $$list; do                                       \
+               if read line < $$f; then                                \
+                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
+               else echo $$f; fi;                                      \
+             done | tr '\012\015' '  '`;                               \
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
+
+.log.html:
+       @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
+       for r2h in $$list; do                                           \
+         if ($$r2h --version) >/dev/null 2>&1; then                    \
+           R2H=$$r2h;                                                  \
+         fi;                                                           \
+       done;                                                           \
+       if test -z "$$R2H"; then                                        \
+         echo >&2 "cannot find rst2html, cannot create $@";            \
+         exit 2;                                                       \
+       fi;                                                             \
+       $$R2H $< >address@hidden
+       @mv address@hidden $@
+
+# Be sure to run check-TESTS first, and then to convert the result.
+# Beware of concurrent executions.  And expect check-TESTS to fail.
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`;                  \
+       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+         rv=0; else rv=$$?;                                    \
+       fi;                                                     \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
+       exit $$rv
+.pl.log:
+       @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -312,10 +443,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
@@ -342,6 +477,10 @@ install-strip:
          `test -z '$(STRIP)' || \
            echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
 mostlyclean-generic:
+       -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
+       -test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
+       -test -z "$(TEST_SUITE_HTML)" || rm -f $(TEST_SUITE_HTML)
+       -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
 
 clean-generic:
 
@@ -418,18 +557,20 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: check-am install-am install-strip
-
-.PHONY: all all-am check check-TESTS check-am clean clean-generic \
-       distclean distclean-generic distdir dvi dvi-am html html-am \
-       info info-am install install-am install-data install-data-am \
-       install-dvi install-dvi-am install-exec install-exec-am \
-       install-html install-html-am install-info install-info-am \
-       install-man install-pdf install-pdf-am install-ps \
-       install-ps-am install-strip installcheck installcheck-am \
-       installdirs maintainer-clean maintainer-clean-generic \
-       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am uninstall \
-       uninstall-am
+.MAKE: check-am check-html install-am install-strip recheck-am \
+       recheck-html
+
+.PHONY: all all-am check check-TESTS check-am check-html clean \
+       clean-generic distclean distclean-generic distdir dvi dvi-am \
+       html html-am info info-am install install-am install-data \
+       install-data-am install-dvi install-dvi-am install-exec \
+       install-exec-am install-html install-html-am install-info \
+       install-info-am install-man install-pdf install-pdf-am \
+       install-ps install-ps-am install-strip installcheck \
+       installcheck-am installdirs maintainer-clean \
+       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
+       pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
+       uninstall uninstall-am
 
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
diff --git a/lib/INSTALL b/lib/INSTALL
index 8b82ade..2550dab 100644
--- a/lib/INSTALL
+++ b/lib/INSTALL
@@ -2,7 +2,7 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007, 2008 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
    This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
@@ -159,7 +159,7 @@ Particular systems
 CC is not installed, it is recommended to use the following options in
 order to use an ANSI C compiler:
 
-     ./configure CC="cc -Ae"
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
 
 and if that doesn't work, install pre-built binaries of GCC for HP-UX.
 
@@ -174,6 +174,16 @@ and if that doesn't work, try
 
      ./configure CC="cc -nodtk"
 
+   On Solaris, don't put `/usr/ucb' early in your `PATH'.  This
+directory contains several dysfunctional programs; working variants of
+these programs are available in `/usr/bin'.  So, if you need `/usr/ucb'
+in your `PATH', put it _after_ `/usr/bin'.
+
+   On Haiku, software installed for all users goes in `/boot/common',
+not `/usr/local'.  It is recommended to use the following options:
+
+     ./configure --prefix=/boot/common
+
 Specifying the System Type
 ==========================
 
@@ -189,7 +199,8 @@ type, such as `sun4', or a canonical name which has the 
form:
 
 where SYSTEM can have one of these forms:
 
-     OS KERNEL-OS
+     OS
+     KERNEL-OS
 
    See the file `config.sub' for the possible values of each field.  If
 `config.sub' isn't included in this package, then this package doesn't
diff --git a/lib/Makefile.in b/lib/Makefile.in
index b85109d..f272d69 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -87,6 +87,9 @@ am__installdirs = "$(DESTDIR)$(pkgvdatadir)" 
"$(DESTDIR)$(scriptdir)"
 DATA = $(dist_pkgvdata_DATA) $(dist_script_DATA)
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+AM_RECURSIVE_TARGETS = $(RECURSIVE_TARGETS:-recursive=) \
+       $(RECURSIVE_CLEAN_TARGETS:-recursive=) tags TAGS ctags CTAGS \
+       distdir
 ETAGS = etags
 CTAGS = ctags
 DIST_SUBDIRS = $(SUBDIRS)
@@ -250,7 +253,8 @@ $(am__aclocal_m4_deps):
 install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(pkgvdatadir)" || $(MKDIR_P) "$(DESTDIR)$(pkgvdatadir)"
-       @list='$(dist_pkgvdata_DATA)'; for p in $$list; do \
+       @list='$(dist_pkgvdata_DATA)'; test -n "$(pkgvdatadir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -261,7 +265,7 @@ install-dist_pkgvdataDATA: $(dist_pkgvdata_DATA)
 
 uninstall-dist_pkgvdataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_pkgvdata_DATA)'; \
+       @list='$(dist_pkgvdata_DATA)'; test -n "$(pkgvdatadir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(pkgvdatadir)' && rm -f" $$files ")"; \
@@ -269,7 +273,8 @@ uninstall-dist_pkgvdataDATA:
 install-dist_scriptDATA: $(dist_script_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(scriptdir)" || $(MKDIR_P) "$(DESTDIR)$(scriptdir)"
-       @list='$(dist_script_DATA)'; for p in $$list; do \
+       @list='$(dist_script_DATA)'; test -n "$(scriptdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -280,7 +285,7 @@ install-dist_scriptDATA: $(dist_script_DATA)
 
 uninstall-dist_scriptDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_script_DATA)'; \
+       @list='$(dist_script_DATA)'; test -n "$(scriptdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(scriptdir)' && rm -f" $$files ")"; \
@@ -437,10 +442,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 9fab900..ca6badd 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -243,7 +243,8 @@ $(am__aclocal_m4_deps):
 install-dist_amDATA: $(dist_am_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(amdir)" || $(MKDIR_P) "$(DESTDIR)$(amdir)"
-       @list='$(dist_am_DATA)'; for p in $$list; do \
+       @list='$(dist_am_DATA)'; test -n "$(amdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -254,7 +255,7 @@ install-dist_amDATA: $(dist_am_DATA)
 
 uninstall-dist_amDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_am_DATA)'; \
+       @list='$(dist_am_DATA)'; test -n "$(amdir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(amdir)' && rm -f" $$files ")"; \
@@ -282,10 +283,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
diff --git a/lib/am/check.am b/lib/am/check.am
index fcb9add..f5153e3 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -52,7 +52,7 @@ include inst-vars.am
 ## It provides special support for "unit tests", that is to say,
 ## tests that (once run) no longer need to be re-compiled and
 ## re-run at each "make check", unless their sources changed.  To
-## enable unit-test supports, define LAZY_TEST_SUITE.  In such a
+## enable unit-test supports, set RECHECK_LOGS to empty.  In such a
 ## setting, that heavily relies on correct dependencies, its users may
 ## prefer to define EXTRA_PROGRAMS instead of check_PROGRAMS, because
 ## it allows intertwined compilation and execution of the tests.
@@ -75,13 +75,15 @@ am__rst_title   = sed 's/.*/   &   
/;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = { nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
-  sed "s/\\.  /\\$$nl/g"; } | sed '/^$$/d' |                   \
-$(AWK) '{ if (final) final = final "\n" $$0; else final = $$0; }\
-max < length($$0) { max = length($$0); }                       \
-END {                                                          \
-  for (i = 0; i < max; ++i) line = line "=";                   \
-  print line; print final; print line;                         \
+am__text_box = $(AWK) '{                               \
+  n = split($$0, lines, "\\.  "); max = 0;             \
+  for (i = 1; i <= n; ++i)                             \
+    if (max < length(lines[i]))                                \
+      max = length(lines[i]);                          \
+  for (i = 0; i < max; ++i) line = line "=";           \
+  print line;                                          \
+  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
+  print line;                                          \
 }'
 
 # Solaris 10 'make', and several other traditional 'make' implementations,
@@ -194,15 +196,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          for f in $$list; do                                           \
            read line < $$f;                                            \
            case $$line in                                              \
-             SKIP:*|PASS:*|XFAIL:*);;                                  \
+             PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
            esac;                                                       \
          done;                                                         \
        } >$(TEST_SUITE_LOG).tmp;                                       \
        mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
-       if test -n '$(LAZY_TEST_SUITE)'; then                           \
-         msg="$${msg}(tests were rerun lazily).  ";                    \
-       fi;                                                             \
        if test "$$failures" -ne 0; then                                \
          msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG).  ";              \
          if test -n "$(PACKAGE_BUGREPORT)"; then                       \
@@ -220,13 +219,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
        test x"$$VERBOSE" = x || $$exit || cat $(TEST_SUITE_LOG);       \
        $$exit
 
+RECHECK_LOGS = $(TEST_LOGS)
+
 # Run all the tests.
 check-TESTS:
-## Expand $(TEST_LOGS) only once, to avoid exceeding line length limits.
-       @list='$(TEST_LOGS)'; if test -z '$(LAZY_TEST_SUITE)'           \
-         && test -n "$$list"; then                                     \
-         rm -f $$list;                                                 \
-       fi
+## Expand $(RECHECK_LOGS) only once, to avoid exceeding line length limits.
+       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
 ## We always have to remove TEST_SUITE_LOG, to ensure its rule is run
 ## in any case even in lazy mode: otherwise, if no test needs rerunning,
 ## or a prior run plus reruns all happen within the same timestamp
@@ -240,8 +238,24 @@ check-TESTS:
          set_logs=TEST_LOGS=;                                          \
        fi;                                                             \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
-.MAKE: check-TESTS
 
+## Rerun all FAILed or XPASSed tests (as well as all whose logs are out
+## of date or do not exist).
+recheck-TESTS:
+       @list='$(TEST_LOGS)';                                           \
+       logs=`for f in $$list; do                                       \
+               if read line < $$f; then                                \
+                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
+               else echo $$f; fi;                                      \
+             done | tr '\012\015' '  '`;                               \
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
+.PHONY: recheck recheck-am recheck-TESTS
+.MAKE: recheck-am
+
+AM_RECURSIVE_TARGETS += check recheck
 
 ## -------------- ##
 ## Produce HTML.  ##
@@ -263,14 +277,17 @@ check-TESTS:
 
 # Be sure to run check-TESTS first, and then to convert the result.
 # Beware of concurrent executions.  And expect check-TESTS to fail.
-check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else   \
-         rv=$$?;                                               \
-         $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML);           \
-         exit $$rv;                                            \
-       fi
-.PHONY: check-html
-.MAKE: check-html
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`;                  \
+       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+         rv=0; else rv=$$?;                                    \
+       fi;                                                     \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
+       exit $$rv
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
+
+AM_RECURSIVE_TARGETS += check-html recheck-html
 
 else !%?PARALLEL_TESTS%
 
diff --git a/lib/am/check2.am b/lib/am/check2.am
index 58ca9e6..237e20a 100644
--- a/lib/am/check2.am
+++ b/lib/am/check2.am
@@ -17,4 +17,4 @@
 ## From a test file to a log file.
 ?GENERIC?%EXT%.log:
 ?!GENERIC?%OBJ%: %SOURCE%
-       @p='%SOURCE%'; $(am__check_pre) "$$tst" $(am__check_post)
+       @p='%SOURCE%'; $(am__check_pre) %COMPILE% "$$tst" $(am__check_post)
diff --git a/lib/am/data.am b/lib/am/data.am
index 62383fa..3e0eec3 100644
--- a/lib/am/data.am
+++ b/lib/am/data.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006,
-## 2007, 2008  Free Software Foundation, Inc.
+## 2007, 2008, 2009  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
@@ -32,7 +32,8 @@ install-%DIR%%PRIMARY%: $(%DIR%_%PRIMARY%)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_%PRIMARY%)'; for p in $$list; do \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
 ## If the _%PRIMARY% variable has an entry like foo/bar, install it as
@@ -45,8 +46,8 @@ if %?BASE%
          $(INSTALL_%ONE_PRIMARY%) $$files "$(DESTDIR)$(%NDIR%dir)" || exit 
$$?; \
        done
 else !%?BASE%
-       @list='$(%DIR%_%PRIMARY%)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for file in $$files; do \
            if test -f "$$file"; then xfiles="$$xfiles $$file"; \
            else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \
@@ -69,7 +70,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%%PRIMARY%
 uninstall-%DIR%%PRIMARY%:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_%PRIMARY%)'; \
+       @list='$(%DIR%_%PRIMARY%)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index ad5e771..5ee7b5c 100644
--- a/lib/am/distdir.am
+++ b/lib/am/distdir.am
@@ -64,6 +64,10 @@ am__relativize = \
 endif %?SUBDIRS%
 
 .PHONY: distdir
+if %?SUBDIRS%
+AM_RECURSIVE_TARGETS += distdir
+endif %?SUBDIRS%
+
 distdir: $(DISTFILES)
 ##
 ## For Gnits users, this is pretty handy.  Look at 15 lines
@@ -198,10 +202,16 @@ endif %?TOPDIR_P%
 ## directory exists only in $(srcdir), because some vendor Make (such
 ## as Tru64) will magically create an empty directory in `.'
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+## If the destination directory already exists, it may contain read-only
+## files, e.g., during `make distcheck'.
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
 ## Test for file existence because sometimes a file gets included in
 ## DISTFILES twice.  For example this happens when a single source
@@ -375,6 +385,10 @@ endif %?TOPDIR_P%
 if %?TOPDIR_P%
 
 .PHONY: dist dist-all
+if %?SUBDIRS%
+AM_RECURSIVE_TARGETS += dist dist-all
+endif %?SUBDIRS%
+
 dist dist-all: distdir
 ?GZIP? tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c 
>$(distdir).tar.gz
 ?BZIP2?        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c 
>$(distdir).tar.bz2
@@ -395,6 +409,10 @@ endif %?TOPDIR_P%
 
 
 if %?TOPDIR_P%
+if %?SUBDIRS%
+AM_RECURSIVE_TARGETS += distcheck
+endif %?SUBDIRS%
+
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
 # tarfile.
diff --git a/lib/am/java.am b/lib/am/java.am
index f183bee..7ec62ae 100644
--- a/lib/am/java.am
+++ b/lib/am/java.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008 Free Software
+## Copyright (C) 1998, 1999, 2001, 2003, 2004, 2006, 2008, 2009 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -50,7 +50,7 @@ install-%DIR%JAVA: class%DIR%.stamp
 ## A single .java file can be compiled into multiple .class files.  So
 ## we just install all the .class files that got built into this
 ## directory.  This is not optimal, but will have to do for now.
-       @test -n "$(%DIR%_JAVA)" || exit 0; \
+       @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
        set x *.class; shift; test "$$1" != "*.class" || exit 0; \
        echo " $(INSTALL_DATA)" "$$@" "'$(DESTDIR)$(%NDIR%dir)/$$p'"; \
        $(INSTALL_DATA) "$$@" "$(DESTDIR)$(%NDIR%dir)"
@@ -65,7 +65,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%JAVA
 uninstall-%DIR%JAVA:
        @$(NORMAL_UNINSTALL)
-       @test -n "$(%DIR%_JAVA)" || exit 0; \
+       @test -n "$(%DIR%_JAVA)" && test -n "$(%NDIR%dir)" || exit 0; \
        set x *.class; shift; test "$$1" != "*.class" || exit 0; \
        echo " ( cd '$(DESTDIR)$(%NDIR%dir)' && rm -f" "$$@" ")"; \
        cd "$(DESTDIR)$(%NDIR%dir)" && rm -f "$$@"
diff --git a/lib/am/libs.am b/lib/am/libs.am
index ee0061e..c92eff7 100644
--- a/lib/am/libs.am
+++ b/lib/am/libs.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006,
-## 2007, 2008  Free Software Foundation, Inc.
+## 2007, 2008, 2009  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
@@ -32,7 +32,8 @@ install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LIBRARIES)'; list2=; for p in $$list; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
            list2="$$list2 $$p"; \
          else :; fi; \
@@ -43,8 +44,8 @@ if %?BASE%
 else !%?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LIBRARIES)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
            if test -f "$$p"; then xfiles="$$xfiles $$p"; else :; fi; done; \
          test -z "$$xfiles" || { \
@@ -61,7 +62,8 @@ endif !%?BASE%
 ## useless; sh never actually executes this command.  Read the GNU
 ## Standards for a little enlightenment on this.
        @$(POST_INSTALL)
-       @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
          if test -f $$p; then \
            %BASE?$(am__strip_dir):f=$$p;% \
 ## Must ranlib after installing because mod time changes.
@@ -82,7 +84,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
 uninstall-%DIR%LIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LIBRARIES)'; \
+       @list='$(%DIR%_LIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/lisp.am b/lib/am/lisp.am
index bda2bcc..4cbf630 100644
--- a/lib/am/lisp.am
+++ b/lib/am/lisp.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-## 2007, 2008 Free Software Foundation, Inc.
+## 2007, 2008, 2009 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
@@ -85,8 +85,8 @@ am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
        @$(NORMAL_INSTALL)
 ## Do not install anything if EMACS was not found.
-       @if test "$(EMACS)" != no; then \
-         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
+       @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
+         $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
 ?!BASE?          $(am__vpath_adj_setup) \
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
@@ -115,7 +115,7 @@ if %?INSTALL%
 uninstall-%DIR%LISP:
        @$(NORMAL_UNINSTALL)
 ## Do not uninstall anything if EMACS was not found.
-       @test "$(EMACS)" != no || exit 0; \
+       @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
        list='$(%DIR%_LISP)'; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
diff --git a/lib/am/ltlib.am b/lib/am/ltlib.am
index 08e055d..5788f78 100644
--- a/lib/am/ltlib.am
+++ b/lib/am/ltlib.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2005, 2006, 2007, 2008, 2009 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
@@ -32,7 +32,8 @@ install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
 if %?BASE%
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_LTLIBRARIES)'; list2=; for p in $$list; do \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       list2=; for p in $$list; do \
          if test -f $$p; then \
            list2="$$list2 $$p"; \
          else :; fi; \
@@ -48,8 +49,8 @@ if %?BASE%
 ?!LIBTOOL?       $(INSTALL) $(INSTALL_STRIP_FLAG) $$list 
"$(DESTDIR)$(%NDIR%dir)"; \
        }
 else !%?BASE%
-       @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
-         if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)"  || list=; \
+       for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; 
done | \
        sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
        $(AWK) 'BEGIN { cur = "." } \
          { if ($$2 == cur) { files = files " " $$1 } \
@@ -82,7 +83,8 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
 uninstall-%DIR%LTLIBRARIES:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
+       @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
+       for p in $$list; do \
          %BASE?$(am__strip_dir):f=$$p;% \
 ?LIBTOOL?        echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
 ?LIBTOOL?        $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) 
--mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
diff --git a/lib/am/mans.am b/lib/am/mans.am
index d389145..1828c5d 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -34,7 +34,7 @@ install-man%SECTION%: %DEPS%
        test -z "$(man%SECTION%dir)" || $(MKDIR_P) 
"$(DESTDIR)$(man%SECTION%dir)"
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; \
+       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        { for i in $$list; do echo "$$i"; done;  \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -66,7 +66,7 @@ if %?NOTRANS_MANS%
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; \
+       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        { for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -110,7 +110,7 @@ uninstall-man%SECTION%:
        @$(NORMAL_UNINSTALL)
 if %?NOTRANS_MANS%
 ## Handle MANS with notrans_ prefix
-       @list='%NOTRANS_SECT_LIST%'; \
+       @list='%NOTRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from notrans_man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
@@ -125,7 +125,7 @@ if %?NOTRANS_MANS%
 endif %?NOTRANS_MANS%
 if %?TRANS_MANS%
 ## Handle MANS without notrans_ prefix
-       @list='%TRANS_SECT_LIST%'; \
+       @list='%TRANS_SECT_LIST%'; test -n "$(man%SECTION%dir)" || exit 0; \
        files=`{ for i in $$list; do echo "$$i"; done; \
 ## Extract all items from man_MANS that should go in this section.
 ## This must be done dynamically to support conditionals.
diff --git a/lib/am/progs.am b/lib/am/progs.am
index 114407f..64f7543 100644
--- a/lib/am/progs.am
+++ b/lib/am/progs.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
-## 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2006, 2007, 2008, 2009 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
@@ -27,7 +27,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_PROGRAMS)'; \
+       @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
        for p in $$list; do echo "$$p $$p"; done | \
 ## On Cygwin with libtool test won't see `foo.exe' but instead `foo'.
 ## So we check for both.
@@ -78,7 +78,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PROGRAMS
 uninstall-%DIR%PROGRAMS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PROGRAMS)'; \
+       @list='$(%DIR%_PROGRAMS)'; test -n "$(%NDIR%dir)" || list=; \
        files=`for p in $$list; do echo "$$p"; done | \
 ## Remove any leading directory before applying $(transform),
 ## but keep the directory part in the hold buffer, in order to
diff --git a/lib/am/python.am b/lib/am/python.am
index 7047452..70beba4 100644
--- a/lib/am/python.am
+++ b/lib/am/python.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008  Free Software
-## Foundation, Inc.
+## Copyright (C) 1999, 2001, 2003, 2004, 2006, 2007, 2008, 2009  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
@@ -30,7 +30,8 @@ install-%DIR%PYTHON: $(%DIR%_PYTHON)
        @$(NORMAL_INSTALL)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 if %?BASE%
-       @list='$(%DIR%_PYTHON)'; dlist=''; list2=''; for p in $$list; do\
+       @list='$(%DIR%_PYTHON)'; dlist=; list2=; test -n "$(%NDIR%dir)" || 
list=; \
+       for p in $$list; do \
 ## A file can be in the source directory or the build directory.
          if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
          if test -f $$b$$p; then \
@@ -58,8 +59,8 @@ if %?BASE%
          fi; \
        else :; fi
 else !%?BASE%
-       @list='$(%DIR%_PYTHON)'; $(am__nobase_list) | \
-       while read dir files; do \
+       @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
+       $(am__nobase_list) | while read dir files; do \
          xfiles=; for p in $$files; do \
 ## A file can be in the source directory or the build directory.
            if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \
@@ -94,7 +95,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%PYTHON
 uninstall-%DIR%PYTHON:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_PYTHON)'; \
+       @list='$(%DIR%_PYTHON)'; test -n "$(%NDIR%dir)" || list=; \
 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
 ?!BASE?        $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
        test -n "$$files" || exit 0; \
diff --git a/lib/am/scripts.am b/lib/am/scripts.am
index b8e61c9..cba6b63 100644
--- a/lib/am/scripts.am
+++ b/lib/am/scripts.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2003, 2004, 2006, 2007,
-## 2008 Free Software Foundation, Inc.
+## 2008, 2009 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
@@ -32,7 +32,7 @@ install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
        test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
 ## Funny invocation because Makefile variable can be empty, leading to
 ## a syntax error in sh.
-       @list='$(%DIR%_SCRIPTS)'; \
+       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || list=; \
 ?!BASE?        $(am__nobase_strip_setup); \
        for p in $$list; do \
 ## A file can be in the source directory or the build directory.
@@ -77,7 +77,7 @@ if %?INSTALL%
 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
 uninstall-%DIR%SCRIPTS:
        @$(NORMAL_UNINSTALL)
-       @list='$(%DIR%_SCRIPTS)'; \
+       @list='$(%DIR%_SCRIPTS)'; test -n "$(%NDIR%dir)" || exit 0; \
 ?BASE? files=`for p in $$list; do echo "$$p"; done | \
 ?BASE?        sed -e 's,.*/,,;$(transform)'`; \
 ?!BASE?        $(am__nobase_strip_setup); \
diff --git a/lib/am/subdirs.am b/lib/am/subdirs.am
index 1888042..7fbb09e 100644
--- a/lib/am/subdirs.am
+++ b/lib/am/subdirs.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2003,
-## 2004, 2008 Free Software Foundation, Inc.
+## 2004, 2008, 2009 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
@@ -18,6 +18,10 @@
 RECURSIVE_TARGETS += all-recursive check-recursive installcheck-recursive
 RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive        \
   distclean-recursive maintainer-clean-recursive
+## All documented targets which invoke `make' recursively, or depend
+## on targets that do so.
+AM_RECURSIVE_TARGETS += $(RECURSIVE_TARGETS:-recursive=) \
+  $(RECURSIVE_CLEAN_TARGETS:-recursive=)
 
 .PHONY: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
 .MAKE: $(RECURSIVE_TARGETS) $(RECURSIVE_CLEAN_TARGETS)
diff --git a/lib/am/tags.am b/lib/am/tags.am
index a654ec8..1eabe58 100644
--- a/lib/am/tags.am
+++ b/lib/am/tags.am
@@ -37,6 +37,9 @@ ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
 
 ETAGS = etags
 .PHONY: tags
+if %?SUBDIRS%
+AM_RECURSIVE_TARGETS += tags TAGS
+endif %?SUBDIRS%
 tags: TAGS
 
 TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% $(TAGS_DEPENDENCIES) \
@@ -96,6 +99,9 @@ TAGS: %TAGSDIRS% $(HEADERS) $(SOURCES) %CONFIG% 
$(TAGS_DEPENDENCIES) \
 
 CTAGS = ctags
 .PHONY: CTAGS ctags
+if %?SUBDIRS%
+AM_RECURSIVE_TARGETS += ctags CTAGS
+endif %?SUBDIRS%
 ctags: CTAGS
 
 ## We have a dummy name here because `tags' has already been in use
diff --git a/lib/am/texinfos.am b/lib/am/texinfos.am
index 382a7c8..e9a8483 100644
--- a/lib/am/texinfos.am
+++ b/lib/am/texinfos.am
@@ -1,7 +1,7 @@
 ## automake - create Makefile.in from Makefile.am
 
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2005, 2006, 2007, 2008 Free Software Foundation, Inc.
+## 2003, 2004, 2005, 2006, 2007, 2008, 2009  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
@@ -144,7 +144,8 @@ include inst-vars.am
 install-dvi-am: $(DVIS)
        @$(NORMAL_INSTALL)
        test -z "$(dvidir)" || $(MKDIR_P) "$(DESTDIR)$(dvidir)"
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -156,7 +157,8 @@ install-dvi-am: $(DVIS)
 install-html-am: $(HTMLS)
        @$(NORMAL_INSTALL)
        test -z "$(htmldir)" || $(MKDIR_P) "$(DESTDIR)$(htmldir)"
-       @list='$(HTMLS)'; list2=; for p in $$list; do \
+       @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \
          $(am__strip_dir) \
          if test -d "$$d$$p"; then \
@@ -178,7 +180,7 @@ install-info-am: $(INFO_DEPS)
        @$(NORMAL_INSTALL)
        test -z "$(infodir)" || $(MKDIR_P) "$(DESTDIR)$(infodir)"
        @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \
-       list='$(INFO_DEPS)'; \
+       list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
        for file in $$list; do \
 ## Strip possible $(srcdir) prefix.
          case $$file in \
@@ -218,7 +220,7 @@ install-info-am: $(INFO_DEPS)
 ## therefore the code will be triggered although install-info is missing.
        @if (install-info --version && \
             install-info --version 2>&1 | sed 1q | grep -i -v debian) 
>/dev/null 2>&1; then \
-         list='$(INFO_DEPS)'; \
+         list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \
          for file in $$list; do \
 ## Strip directory
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
@@ -237,7 +239,8 @@ install-info-am: $(INFO_DEPS)
 install-pdf-am: $(PDFS)
        @$(NORMAL_INSTALL)
        test -z "$(pdfdir)" || $(MKDIR_P) "$(DESTDIR)$(pdfdir)"
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -248,7 +251,8 @@ install-pdf-am: $(PDFS)
 install-ps-am: $(PSS)
        @$(NORMAL_INSTALL)
        test -z "$(psdir)" || $(MKDIR_P) "$(DESTDIR)$(psdir)"
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -279,7 +283,8 @@ if %?LOCAL-TEXIS%
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(DVIS)'; for p in $$list; do \
+       @list='$(DVIS)'; test -n "$(dvidir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \
          rm -f "$(DESTDIR)$(dvidir)/$$f"; \
@@ -287,7 +292,8 @@ uninstall-dvi-am:
 
 uninstall-html-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(HTMLS)'; for p in $$list; do \
+       @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
 ## $f can be a directory, hence the -r.
          echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \
@@ -327,7 +333,8 @@ uninstall-info-am:
 
 uninstall-pdf-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PDFS)'; for p in $$list; do \
+       @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \
          rm -f "$(DESTDIR)$(pdfdir)/$$f"; \
@@ -335,7 +342,8 @@ uninstall-pdf-am:
 
 uninstall-ps-am:
        @$(NORMAL_UNINSTALL)
-       @list='$(PSS)'; for p in $$list; do \
+       @list='$(PSS)'; test -n "$(psdir)" || list=; \
+       for p in $$list; do \
          $(am__strip_dir) \
          echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \
          rm -f "$(DESTDIR)$(psdir)/$$f"; \
diff --git a/lib/config.guess b/lib/config.guess
index f0f0d36..e5716ee 100755
--- a/lib/config.guess
+++ b/lib/config.guess
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-09-28'
+timestamp='2009-02-03'
 
 # This file is free software; you can redistribute it and/or modify it
 # under the terms of the GNU General Public License as published by
@@ -331,7 +331,20 @@ case 
"${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
        echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*)
-       echo i386-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
+       eval $set_cc_for_build
+       SUN_ARCH="i386"
+       # If there is a compiler, see if it is configured for 64-bit objects.
+       # Note that the Sun cc does not turn __LP64__ into 1 like gcc does.
+       # This test works for both compilers.
+       if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then
+           if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \
+               (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \
+               grep IS_64BIT_ARCH >/dev/null
+           then
+               SUN_ARCH="x86_64"
+           fi
+       fi
+       echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'`
        exit ;;
     sun4*:SunOS:6*:*)
        # According to config.sub, this is the proper way to canonicalize
@@ -1141,6 +1154,16 @@ EOF
     3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*)
         /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
           && { echo i486-ncr-sysv4; exit; } ;;
+    NCR*:*:4.2:* | MPRAS*:*:4.2:*)
+       OS_REL='.3'
+       test -r /etc/.relid \
+           && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < 
/etc/.relid`
+       /bin/uname -p 2>/dev/null | grep 86 >/dev/null \
+           && { echo i486-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; }
+       /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \
+           && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;;
     m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*)
        echo m68k-unknown-lynxos${UNAME_RELEASE}
        exit ;;
@@ -1327,6 +1350,9 @@ EOF
     i*86:rdos:*:*)
        echo ${UNAME_MACHINE}-pc-rdos
        exit ;;
+    i*86:AROS:*:*)
+       echo ${UNAME_MACHINE}-pc-aros
+       exit ;;
 esac
 
 #echo '(No uname command or uname output not recognized.)' 1>&2
diff --git a/lib/config.sub b/lib/config.sub
index 053e738..d546a94 100755
--- a/lib/config.sub
+++ b/lib/config.sub
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008
 #   Free Software Foundation, Inc.
 
-timestamp='2008-09-08'
+timestamp='2009-02-03'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -122,6 +122,7 @@ maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'`
 case $maybe_os in
   nto-qnx* | linux-gnu* | linux-dietlibc | linux-newlib* | linux-uclibc* | \
   uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | knetbsd*-gnu* | 
netbsd*-gnu* | \
+  kopensolaris*-gnu* | \
   storm-chaos* | os2-emx* | rtmk-nova*)
     os=-$maybe_os
     basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`
@@ -249,6 +250,7 @@ case $basic_machine in
        | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \
        | i370 | i860 | i960 | ia64 \
        | ip2k | iq2000 \
+       | lm32 \
        | m32c | m32r | m32rle | m68000 | m68k | m88k \
        | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
@@ -279,7 +281,7 @@ case $basic_machine in
        | powerpc | powerpc64 | powerpc64le | powerpcle | ppcbe \
        | pyramid \
        | score \
-       | sh | sh[1234] | sh[24]a | sh[23]e | sh[34]eb | sheb | shbe | shle | 
sh[1234]le | sh3ele \
+       | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | 
shbe | shle | sh[1234]le | sh3ele \
        | sh64 | sh64le \
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | 
sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
@@ -331,6 +333,7 @@ case $basic_machine in
        | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \
        | i*86-* | i860-* | i960-* | ia64-* \
        | ip2k-* | iq2000-* \
+       | lm32-* \
        | m32c-* | m32r-* | m32rle-* \
        | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \
        | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
@@ -362,7 +365,7 @@ case $basic_machine in
        | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* | ppcbe-* \
        | pyramid-* \
        | romp-* | rs6000-* \
-       | sh-* | sh[1234]-* | sh[24]a-* | sh[23]e-* | sh[34]eb-* | sheb-* | 
shbe-* \
+       | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* 
| sheb-* | shbe-* \
        | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \
        | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | 
sparclet-* \
        | sparclite-* \
@@ -443,6 +446,10 @@ case $basic_machine in
                basic_machine=m68k-apollo
                os=-bsd
                ;;
+       aros)
+               basic_machine=i386-pc
+               os=-aros
+               ;;
        aux)
                basic_machine=m68k-apple
                os=-aux
@@ -1182,7 +1189,7 @@ case $basic_machine in
        we32k)
                basic_machine=we32k-att
                ;;
-       sh[1234] | sh[24]a | sh[34]eb | sh[1234]le | sh[23]ele)
+       sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele)
                basic_machine=sh-unknown
                ;;
        sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v)
@@ -1254,8 +1261,9 @@ case $os in
        -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
              | -*vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]*\
              | -hpux* | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
+             | -kopensolaris* \
              | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \
-             | -aos* \
+             | -aos* | -aros* \
              | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
              | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
              | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index fb83ce5..960ab3c 100644
--- a/lib/texinfo.tex
+++ b/lib/texinfo.tex
@@ -3,11 +3,11 @@
 % Load plain if necessary, i.e., if running under initex.
 \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi
 %
-\def\texinfoversion{2008-11-09.14}
+\def\texinfoversion{2009-03-22.17}
 %
-% Copyright (C) 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
+% Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008 Free Software Foundation, Inc.
+% 2007, 2008, 2009 Free Software Foundation, Inc.
 %
 % This texinfo.tex file is free software: you can redistribute it and/or
 % modify it under the terms of the GNU General Public License as
@@ -98,6 +98,9 @@
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
+{\catcode`\'=\active
+\global\let\ptexquoteright'}% Math-mode def from plain.tex.
+\let\ptexraggedright=\raggedright
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
@@ -355,7 +358,7 @@
                % We don't want .vr (or whatever) entries like this:
                % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}}
                % "\acronym" won't work when it's read back in;
-               % it needs to be 
+               % it needs to be
                % {\code {{\tt \backslashcurfont }acronym}
     \shipout\vbox{%
       % Do this early so pdf references go to the beginning of the page.
@@ -706,7 +709,7 @@
 \def\?{?\spacefactor=\endofsentencespacefactor\space}
 
 % @frenchspacing on|off  says whether to put extra space after punctuation.
-% 
+%
 \def\onword{on}
 \def\offword{off}
 %
@@ -945,6 +948,8 @@ where each line of input produces a line of output.}
   \catcode`>=\other
   \catcode`+=\other
   \catcode`-=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
 }
 
 \def\pushthisfilestack{%
@@ -1143,11 +1148,13 @@ where each line of input produces a line of output.}
   \catcode`< = \active
   \catcode`> = \active
   \catcode`+ = \active
+  \catcode`' = \active
   \gdef\mathactive{%
     \let^ = \ptexhat
     \let< = \ptexless
     \let> = \ptexgtr
     \let+ = \ptexplus
+    \let' = \ptexquoteright
   }
 }
 
@@ -1278,7 +1285,7 @@ where each line of input produces a line of output.}
 % that's what we do).
 
 % double active backslashes.
-% 
+%
 address@hidden \catcode`\\=\active
  @address@hidden
    @address@hidden@active
@@ -1290,11 +1297,11 @@ where each line of input produces a line of output.}
 % us) handles it with this amazing macro to replace tokens, with minor
 % changes for Texinfo.  It is included here under the GPL by permission
 % from the author, Heiko Oberdiek.
-% 
+%
 % #1 is the tokens to replace.
 % #2 is the replacement.
 % #3 is the control sequence with the string.
-% 
+%
 \def\HyPsdSubst#1#2#3{%
   \def\HyPsdReplace##1#1##2\END{%
     ##1%
@@ -1329,7 +1336,10 @@ output) for that.)}
   \def\cmykDarkRed{0.28 1 1 0.35}
   \def\cmykBlack{0 0 0 1}
   %
-  \def\pdfsetcolor#1{\pdfliteral{#1 k}}
+  % k sets the color for filling (usual text, etc.);
+  % K sets the color for stroking (thin rules, e.g., normal _'s).
+  \def\pdfsetcolor#1{\pdfliteral{#1 k  #1 K}}
+  %
   % Set color, and create a mark which defines \thiscolor accordingly,
   % so that \makeheadline knows which color to restore.
   \def\setcolor#1{%
@@ -1563,11 +1573,15 @@ output) for that.)}
       % tried to figure out what each command should do in the context
       % of @url.  for now, just make @/ a no-op, that's the only one
       % people have actually reported a problem with.
-      % 
+      %
       \normalturnoffactive
       address@hidden@}%
       \let\/=\empty
       \makevalueexpandable
+      % do we want to go so far as to use \indexnofonts instead of just
+      % special-casing \var here?
+      \def\var##1{##1}%
+      %
       \leavevmode\setcolor{\urlcolor}%
       \startlink attr{/Border [0 0 0]}%
         user{/Subtype /Link /A << /S /URI /URI (#1) >>}%
@@ -1598,6 +1612,7 @@ output) for that.)}
     \setcolor{\linkcolor}#1\endlink}
   \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st}
 \else
+  % non-pdf mode
   \let\pdfmkdest = \gobble
   \let\pdfurl = \gobble
   \let\endlink = \relax
@@ -1966,7 +1981,7 @@ end
 
 % Definitions for a main text size of 11pt.  This is the default in
 % Texinfo.
-% 
+%
 \def\definetextfontsizexi{%
 % Text fonts (11.2pt, magstep1).
 \def\textnominalsize{11pt}
@@ -2097,7 +2112,7 @@ end
 % section, chapter, etc., sizes following suit.  This is for the GNU
 % Press printing of the Emacs 22 manual.  Maybe other manuals in the
 % future.  Used with @smallbook, which sets the leading to 12pt.
-% 
+%
 \def\definetextfontsizex{%
 % Text fonts (10pt).
 \def\textnominalsize{10pt}
@@ -2186,7 +2201,7 @@ end
 \setfont\secsf\sfbshape{12}{1000}{OT1}
 \let\secbf\secrm
 \setfont\secsc\scbshape{10}{\magstep1}{OT1}
-\font\seci=cmmi12 
+\font\seci=cmmi12
 \font\secsy=cmsy10 scaled \magstep1
 \def\sececsize{1200}
 
@@ -2230,7 +2245,7 @@ end
 % We provide the user-level command
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
-% 
+%
 \def\xword{10}
 \def\xiword{11}
 %
@@ -2240,7 +2255,7 @@ end
   %
   % Set \globaldefs so that documents can use this inside @tex, since
   % makeinfo 4.8 does not support it, but we need it nonetheless.
-  % 
+  %
  \begingroup \globaldefs=1
   \ifx\textsizearg\xword \definetextfontsizex
   \else \ifx\textsizearg\xiword \definetextfontsizexi
@@ -2342,6 +2357,16 @@ end
   \def\lsize{smaller}\def\lllsize{smaller}%
   \resetmathfonts \setleading{9.5pt}}
 
+% Fonts for short table of contents.
+\setfont\shortcontrm\rmshape{12}{1000}{OT1}
+\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
+\setfont\shortcontsl\slshape{12}{1000}{OT1}
+\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
+
+% Define these just so they can be easily changed for other fonts.
+\def\angleleft{$\langle$}
+\def\angleright{$\rangle$}
+
 % Set the fonts to use with the @small... environments.
 \let\smallexamplefonts = \smallfonts
 
@@ -2355,28 +2380,128 @@ end
 %
 % By the way, for comparison, here's what fits with @example (10pt):
 %   8.5x11=71  smallbook=60  a4=75  a5=58
-%
-% I wish the USA used A4 paper.
 % --karl, 24jan03.
 
-
 % Set up the default fonts, so we can use them for creating boxes.
 %
 \definetextfontsizexi
 
-% Define these so they can be easily changed for other fonts.
-\def\angleleft{$\langle$}
-\def\angleright{$\rangle$}
+
+\message{markup,}
+
+% Check if we are currently using a typewriter font.  Since all the
+% Computer Modern typewriter fonts have zero interword stretch (and
+% shrink), and it is reasonable to expect all typewriter fonts to have
+% this property, we can check that font parameter.
+%
+\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
+
+% Markup style infrastructure.  \defmarkupstylesetup\INITMACRO will
+% define and register \INITMACRO to be called on markup style changes.
+% \INITMACRO can check \currentmarkupstyle for the innermost
+% style and the set of \ifmarkupSTYLE switches for all styles
+% currently in effect.
+\newif\ifmarkupvar
+\newif\ifmarkupsamp
+\newif\ifmarkupkey
+%\newif\ifmarkupfile % @file == @samp.
+%\newif\ifmarkupoption % @option == @samp.
+\newif\ifmarkupcode
+\newif\ifmarkupkbd
+%\newif\ifmarkupenv % @env == @code.
+%\newif\ifmarkupcommand % @command == @code.
+\newif\ifmarkuptex % @tex (and part of @math, for now).
+\newif\ifmarkupexample
+\newif\ifmarkupverb
+\newif\ifmarkupverbatim
+
+\let\currentmarkupstyle\empty
+
+\def\setupmarkupstyle#1{%
+  \csname markup#1true\endcsname
+  \def\currentmarkupstyle{#1}%
+  \markupstylesetup
+}
+
+\let\markupstylesetup\empty
+
+\def\defmarkupstylesetup#1{%
+  \expandafter\def\expandafter\markupstylesetup
+    \expandafter{\markupstylesetup #1}%
+  \def#1%
+}
+
+% Markup style setup for left and right quotes.
+\defmarkupstylesetup\markupsetuplq{%
+  \expandafter\let\expandafter \temp \csname 
markupsetuplq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuplqdefault \else \temp \fi
+}
+
+\defmarkupstylesetup\markupsetuprq{%
+  \expandafter\let\expandafter \temp \csname 
markupsetuprq\currentmarkupstyle\endcsname
+  \ifx\temp\relax \markupsetuprqdefault \else \temp \fi
+}
+
+{
+\catcode`\'=\active
+\catcode`\`=\active
+
+\gdef\markupsetuplqdefault{\let`\lq}
+\gdef\markupsetuprqdefault{\let'\rq}
+
+\gdef\markupsetcodequoteleft{\let`\codequoteleft}
+\gdef\markupsetcodequoteright{\let'\codequoteright}
+
+\gdef\markupsetnoligaturesquoteleft{\let`\noligaturesquoteleft}
+}
+
+\let\markupsetuplqcode \markupsetcodequoteleft
+\let\markupsetuprqcode \markupsetcodequoteright
+\let\markupsetuplqexample \markupsetcodequoteleft
+\let\markupsetuprqexample \markupsetcodequoteright
+\let\markupsetuplqverb \markupsetcodequoteleft
+\let\markupsetuprqverb \markupsetcodequoteright
+\let\markupsetuplqverbatim \markupsetcodequoteleft
+\let\markupsetuprqverbatim \markupsetcodequoteright
+
+\let\markupsetuplqsamp \markupsetnoligaturesquoteleft
+\let\markupsetuplqkbd \markupsetnoligaturesquoteleft
+
+% Allow an option to not replace quotes with a regular directed right
+% quote/apostrophe (char 0x27), but instead use the undirected quote
+% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
+% the default, but it works for pasting with more pdf viewers (at least
+% evince), the lilypond developers report.  xpdf does work with the
+% regular 0x27.
+%
+\def\codequoteright{%
+  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
+    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
+      '%
+    \else \char'15 \fi
+  \else \char'15 \fi
+}
+%
+% and a similar option for the left quote char vs. a grave accent.
+% Modern fonts display ASCII 0x60 as a grave accent, so some people like
+% the code environments to do likewise.
+%
+\def\codequoteleft{%
+  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
+    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
+      % [Knuth] pp. 380,381,391
+      % \relax disables Spanish ligatures ?` and !` of \tt font.
+      \relax`%
+    \else \char'22 \fi
+  \else \char'22 \fi
+}
+
+% [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font.
+\def\noligaturesquoteleft{\relax\lq}
 
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-% Fonts for short table of contents.
-\setfont\shortcontrm\rmshape{12}{1000}{OT1}
-\setfont\shortcontbf\bfshape{10}{\magstep1}{OT1}  % no cmb12
-\setfont\shortcontsl\slshape{12}{1000}{OT1}
-\setfont\shortconttt\ttshape{12}{1000}{OT1TT}
-
 %% Add scribe-like font environments, plus @l for inline lisp (usually sans
 %% serif) and @ii for TeX italic
 
@@ -2391,17 +2516,22 @@ end
 % @var is set to this for defun arguments.
 \def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
 
-% like \smartslanted except unconditionally use \sl.  We never want
+% @cite is like \smartslanted except unconditionally use \sl.  We never want
 % ttsl for book titles, do we?
 \def\cite#1{{\sl #1}\futurelet\next\smartitalicx}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\let\var=\smartslanted
+\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
-% @b, explicit bold.
+% Explicit font changes: @r, @sc, undocumented @ii.
+\def\r#1{{\rm #1}}              % roman font
+\def\sc#1{{\smallcaps#1}}       % smallcaps font
+\def\ii#1{{\it #1}}             % italic font
+
+% @b, explicit bold.  Also @strong.
 \def\b#1{{\bf #1}}
 \let\strong=\b
 
@@ -2433,22 +2563,35 @@ end
 address@hidden
 \def\endofsentencespacefactor{3000}% default
 
+% @t, explicit typewriter.
 \def\t#1{%
   {\tt \rawbackslash \plainfrenchspacing #1}%
   \null
 }
-\def\samp#1{`\tclose{#1}'\null}
-\setfont\keyrm\rmshape{8}{1000}{OT1}
-\font\keysy=cmsy9
-\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
-  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
-    \vbox{\hrule\kern-0.4pt
-     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
-    \kern-0.4pt\hrule}%
-  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
-\def\key #1{{\nohyphenation \uppercase{#1}}\null}
-% The old definition, with no lozenge:
-%\def\key #1{{\ttsl \nohyphenation \uppercase{#1}}\null}
+
+% @samp.
+\def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}}
+
+% definition of @key that produces a lozenge.  Doesn't adjust to text size.
+%\setfont\keyrm\rmshape{8}{1000}{OT1}
+%\font\keysy=cmsy9
+%\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{%
+%  \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{%
+%    \vbox{\hrule\kern-0.4pt
+%     \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}%
+%    \kern-0.4pt\hrule}%
+%  \kern-.06em\raise0.4pt\hbox{\angleright}}}}
+
+% definition of @key with no lozenge.  If the current font is already
+% monospace, don't change it; that way, we respect @kbdinputstyle.  But
+% if it isn't monospace, then use \tt.
+%
+\def\key#1{{\setupmarkupstyle{key}%
+  \nohyphenation
+  \ifmonospace\else\tt\fi
+  #1}\null}
+
+% ctrl is no longer a Texinfo command.
 \def\ctrl #1{{\tt \rawbackslash \hat}#1}
 
 % @file, @option are the same as @samp.
@@ -2493,9 +2636,8 @@ end
   \global\let'=\rq \global\let`=\lq  % default definitions
   %
   \global\def\code{\begingroup
-    \catcode\rquoteChar=\active \catcode\lquoteChar=\active
-    \let'\codequoteright \let`\codequoteleft
-    %
+    \setupmarkupstyle{code}%
+    % The following should really be moved into \setupmarkupstyle handlers.
     \catcode\dashChar=\active  \catcode\underChar=\active
     \ifallowcodebreaks
      \let-\codedash
@@ -2527,7 +2669,7 @@ end
 % each of the four underscores in __typeof__.  This is undesirable in
 % some manuals, especially if they don't have long identifiers in
 % general.  @allowcodebreaks provides a way to control this.
-% 
+%
 \newif\ifallowcodebreaks  \allowcodebreakstrue
 
 \def\keywordtrue{true}
@@ -2547,6 +2689,7 @@ end
 
 % @kbd is like @code, except that if the argument is just one @key command,
 % then @kbd has no effect.
+\def\kbd#1{{\setupmarkupstyle{kbd}\def\look{#1}\expandafter\kbdfoo\look??\par}}
 
 % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always),
 %   `example' (@kbd uses ttsl only inside of @example and friends),
@@ -2568,14 +2711,14 @@ end
 \def\wordexample{example}
 \def\wordcode{code}
 
-% Default is `distinct.'
+% Default is `distinct'.
 \kbdinputstyle distinct
 
 \def\xkey{\key}
 \def\kbdfoo#1#2#3\par{\def\one{#1}\def\three{#3}\def\threex{??}%
 \ifx\one\xkey\ifx\threex\three \key{#2}%
-\else{\tclose{\kbdfont\look}}\fi
-\else{\tclose{\kbdfont\look}}\fi}
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi
+\else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi}
 
 % For @indicateurl, @env, @command quotes seem unnecessary, so use \code.
 \let\indicateurl=\code
@@ -2638,34 +2781,20 @@ end
   \let\email=\uref
 \fi
 
-% Check if we are currently using a typewriter font.  Since all the
-% Computer Modern typewriter fonts have zero interword stretch (and
-% shrink), and it is reasonable to expect all typewriter fonts to have
-% this property, we can check that font parameter.
-%
-\def\ifmonospace{\ifdim\fontdimen3\font=0pt }
-
 % Typeset a dimension, e.g., `in' or `pt'.  The only reason for the
 % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt.
 %
 \def\dmn#1{\thinspace #1}
 
-\def\kbd#1{\def\look{#1}\expandafter\kbdfoo\look??\par}
-
 % @l was never documented to mean ``switch to the Lisp font'',
 % and it is not used as such in any manual I can find.  We need it for
 % Polish suppressed-l.  --karl, 22sep96.
 %\def\l#1{{\li #1}\null}
 
-% Explicit font changes: @r, @sc, undocumented @ii.
-\def\r#1{{\rm #1}}              % roman font
-\def\sc#1{{\smallcaps#1}}       % smallcaps font
-\def\ii#1{{\it #1}}             % italic font
-
 % @acronym for "FBI", "NATO", and the like.
 % We print this one point size smaller, since it's intended for
 % all-uppercase.
-% 
+%
 \def\acronym#1{\doacronym #1,,\finish}
 \def\doacronym#1,#2,#3\finish{%
   {\selectfonts\lsize #1}%
@@ -2677,7 +2806,7 @@ end
 
 % @abbr for "Comput. J." and the like.
 % No font change, but don't do end-of-sentence spacing.
-% 
+%
 \def\abbr#1{\doabbr #1,,\finish}
 \def\doabbr#1,#2,#3\finish{%
   {\plainfrenchspacing #1}%
@@ -2687,6 +2816,44 @@ end
   \fi
 }
 
+
+\message{glyphs,}
+
+% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
+%
+% Since these characters are used in examples, they should be an even number of
+% \tt widths. Each \tt character is 1en, so two makes it 1em.
+%
+\def\point{$\star$}
+\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
+\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
+\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
+\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
+\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
+
+% The @error{} command.
+% Adapted from the TeXbook's \boxit.
+%
+\newbox\errorbox
+%
+{\tentt \global\dimen0 = 3em}% Width of the box.
+\dimen2 = .55pt % Thickness of rules
+% The text. (`r' is open on the right, `e' somewhat less so on the left.)
+\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
+%
+\setbox\errorbox=\hbox to \dimen0{\hfil
+   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
+   \advance\hsize by -2\dimen2 % Rules.
+   \vbox{%
+      \hrule height\dimen2
+      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
+         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
+         \kern3pt\vrule width\dimen2}% Space to right.
+      \hrule height\dimen2}
+    \hfil}
+%
+\def\error{\leavevmode\lower.7ex\copy\errorbox}
+
 % @pounds{} is a sterling sign, which Knuth put in the CM italic font.
 %
 \def\pounds{{\it\$}}
@@ -2696,52 +2863,59 @@ end
 % Theiling, which support regular, slanted, bold and bold slanted (and
 % "outlined" (blackboard board, sort of) versions, which we don't need).
 % It is available from http://www.ctan.org/tex-archive/fonts/eurosym.
-% 
+%
 % Although only regular is the truly official Euro symbol, we ignore
 % that.  The Euro is designed to be slightly taller than the regular
 % font height.
-% 
+%
 % feymr - regular
 % feymo - slanted
 % feybr - bold
 % feybo - bold slanted
-% 
+%
 % There is no good (free) typewriter version, to my knowledge.
 % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide.
 % Hmm.
-% 
+%
 % Also doesn't work in math.  Do we need to do math with euro symbols?
 % Hope not.
-% 
-% 
+%
+%
 \def\euro{{\eurofont e}}
 \def\eurofont{%
   % We set the font at each command, rather than predefining it in
   % \textfonts and the other font-switching commands, so that
   % installations which never need the symbol don't have to have the
   % font installed.
-  % 
+  %
   % There is only one designed size (nominal 10pt), so we always scale
   % that to the current nominal size.
-  % 
+  %
   % By the way, simply using "at 1em" works for cmr10 and the like, but
   % does not work for cmbx10 and other extended/shrunken fonts.
-  % 
+  %
   \def\eurosize{\csname\curfontsize nominalsize\endcsname}%
   %
-  \ifx\curfontstyle\bfstylename 
+  \ifx\curfontstyle\bfstylename
     % bold:
     \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize
-  \else 
+  \else
     % regular:
     \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize
   \fi
   \thiseurofont
 }
 
-% Hacks for glyphs from the EC fonts similar to \euro.  We don't
-% use \let for the aliases, because sometimes we redefine the original
-% macro, and the alias should reflect the redefinition.
+% Glyphs from the EC fonts.  We don't use \let for the aliases, because
+% sometimes we redefine the original macro, and the alias should reflect
+% the redefinition.
+%
+% Use LaTeX names for the Icelandic letters.
+\def\DH{{\ecfont \char"D0}} % Eth
+\def\dh{{\ecfont \char"F0}} % eth
+\def\TH{{\ecfont \char"DE}} % Thorn
+\def\th{{\ecfont \char"FE}} % thorn
+%
 \def\guillemetleft{{\ecfont \char"13}}
 \def\guillemotleft{\guillemetleft}
 \def\guillemetright{{\ecfont \char"14}}
@@ -2755,7 +2929,7 @@ end
 % we have the precomposed glyphs for the most common cases.  We put the
 % tests to use those glyphs in the single \ogonek macro so we have fewer
 % dummy definitions to worry about for index entries, etc.
-% 
+%
 % ogonek is also used with other letters in Lithuanian (IOU), but using
 % the precomposed glyphs for those is not so easy since they aren't in
 % the same EC font.
@@ -2778,6 +2952,7 @@ end
 \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E}
 \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e}
 %
+% Use the ec* fonts (cm-super in outline format) for non-CM glyphs.
 \def\ecfont{%
   % We can't distinguish serif/sans and italic/slanted, but this
   % is used for crude hacks anyway (like adding French and German
@@ -2812,7 +2987,7 @@ end
 % Laurent Siebenmann reports \Orb undefined with:
 %  Textures 1.7.7 (preloaded format=plain 93.10.14)  (68K)  16 APR 2004 02:38
 % so we'll define it if necessary.
-% 
+%
 \ifx\Orb\undefined
 \def\Orb{\mathhexbox20D}
 \fi
@@ -3158,7 +3333,7 @@ end
     % cause the example and the item to crash together.  So we use this
     % bizarre value of 10001 as a signal to \aboveenvbreak to insert
     % \parskip glue after all.  Section titles are handled this way also.
-    % 
+    %
     \penalty 10001
     \endgroup
     \itemxneedsnegativevskipfalse
@@ -3252,9 +3427,18 @@ end
   \parindent=0pt
   \parskip=\smallskipamount
   \ifdim\parskip=0pt \parskip=2pt \fi
+  %
+  % Try typesetting the item mark that if the document erroneously says
+  % something like @itemize @samp (intending @table), there's an error
+  % right away at the @itemize.  It's not the best error message in the
+  % world, but it's better than leaving it to the @item.  This means if
+  % the user wants an empty mark, they have to say @w{} not just @w.
   \def\itemcontents{#1}%
+  \setbox0 = \hbox{\itemcontents}%
+  %
   % @itemize with no arg is equivalent to @itemize @bullet.
   \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi
+  %
   \let\item=\itemizeitem
 }
 
@@ -3275,6 +3459,7 @@ end
    \ifnum\lastpenalty<10000 \parskip=0in \fi
    \noindent
    \hbox to 0pt{\hss \itemcontents \kern\itemmargin}%
+   %
    \vadjust{\penalty 1200}}% not good to break after first line of item.
   \flushcr
 }
@@ -3496,12 +3681,19 @@ end
 %
 % @headitem starts a heading row, which we typeset in bold.
 % Assignments have to be global since we are inside the implicit group
-% of an alignment entry.  Note that \everycr resets \everytab.
-\def\headitem{\checkenv\multitable \crcr \global\everytab={\bf}\the\everytab}%
+% of an alignment entry.  \everycr resets \everytab so we don't have to
+% undo it ourselves.
+\def\headitemfont{\b}% for people to use in the template row; not changeable
+\def\headitem{%
+  \checkenv\multitable
+  \crcr
+  \global\everytab={\bf}% can't use \headitemfont since the parsing differs
+  \the\everytab % for the first item
+}%
 %
 % A \tab used to include \hskip1sp.  But then the space in a template
 % line is not enough.  That is bad.  So let's go back to just `&' until
-% we encounter the problem it was intended to solve again.
+% we again encounter the problem the 1sp was intended to solve.
 %                                      --karl, address@hidden, 20apr99.
 \def\tab{\checkenv\multitable &\the\everytab}%
 
@@ -3954,7 +4146,7 @@ end
   % processing continues to some further point.  On the other hand, it
   % seems \endinput does not hurt in the printed index arg, since that
   % is still getting written without apparent harm.
-  % 
+  %
   % Sample source (mac-idx3.tex, reported by Graham Percival to
   % help-texinfo, 22may06):
   % @macro funindex {WORD}
@@ -3962,12 +4154,12 @@ end
   % @end macro
   % ...
   % @funindex commtest
-  % 
+  %
   % The above is not enough to reproduce the bug, but it gives the flavor.
-  % 
+  %
   % Sample whatsit resulting:
   % address@hidden@folio address@hidden address@hidden }}}
-  % 
+  %
   % So:
   \let\endinput = \empty
   %
@@ -4019,19 +4211,23 @@ end
   % Non-English letters.
   \definedummyword\AA
   \definedummyword\AE
+  \definedummyword\DH
   \definedummyword\L
-  \definedummyword\OE
   \definedummyword\O
+  \definedummyword\OE
+  \definedummyword\TH
   \definedummyword\aa
   \definedummyword\ae
+  \definedummyword\dh
+  \definedummyword\exclamdown
   \definedummyword\l
-  \definedummyword\oe
   \definedummyword\o
-  \definedummyword\ss
-  \definedummyword\exclamdown
-  \definedummyword\questiondown
+  \definedummyword\oe
   \definedummyword\ordf
   \definedummyword\ordm
+  \definedummyword\questiondown
+  \definedummyword\ss
+  \definedummyword\th
   %
   % Although these internal commands shouldn't show up, sometimes they do.
   \definedummyword\bf
@@ -4174,19 +4370,23 @@ end
   % Non-English letters.
   \def\AA{AA}%
   \def\AE{AE}%
+  \def\DH{DZZ}%
   \def\L{L}%
   \def\OE{OE}%
   \def\O{O}%
+  \def\TH{ZZZ}%
   \def\aa{aa}%
   \def\ae{ae}%
+  \def\dh{dzz}%
+  \def\exclamdown{!}%
   \def\l{l}%
   \def\oe{oe}%
-  \def\o{o}%
-  \def\ss{ss}%
-  \def\exclamdown{!}%
-  \def\questiondown{?}%
   \def\ordf{a}%
   \def\ordm{o}%
+  \def\o{o}%
+  \def\questiondown{?}%
+  \def\ss{ss}%
+  \def\th{zzz}%
   %
   \def\LaTeX{LaTeX}%
   \def\TeX{TeX}%
@@ -4225,11 +4425,11 @@ end
   % makeinfo does not expand macros in the argument to @deffn, which ends up
   % writing an index entry, and texindex isn't prepared for an index sort entry
   % that starts with \.
-  % 
+  %
   % Since macro invocations are followed by braces, we can just redefine them
   % to take a single TeX argument.  The case of a macro invocation that
   % goes to end-of-line is not handled.
-  % 
+  %
   \macrolist
 }
 
@@ -4357,7 +4557,7 @@ end
     % to re-insert the same penalty (values >10000 are used for various
     % signals); since we just inserted a non-discardable item, any
     % following glue (such as a \parskip) would be a breakpoint.  For example:
-    % 
+    %
     %   @deffn deffn-whatever
     %   @vindex index-whatever
     %   Description.
@@ -4938,7 +5138,9 @@ end
   \gdef\chaplevelprefix{\the\chapno.}%
   \resetallfloatnos
   %
-  \message{\putwordChapter\space \the\chapno}%
+  % \putwordChapter can contain complex things in translations.
+  \toks0=\expandafter{\putwordChapter}%
+  \message{\the\toks0 \space \the\chapno}%
   %
   % Write the actual heading.
   \chapmacro{#1}{Ynumbered}{\the\chapno}%
@@ -4949,15 +5151,17 @@ end
   \global\let\subsubsection = \numberedsubsubsec
 }
 
-\outer\parseargdef\appendix{\apphead0{#1}} % normally apphead0 calls 
appendixzzz
+\outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz
+%
 \def\appendixzzz#1{%
   \global\secno=0 \global\subsecno=0 \global\subsubsecno=0
     \global\advance\appendixno by 1
   \gdef\chaplevelprefix{\appendixletter.}%
   \resetallfloatnos
   %
-  \def\appendixnum{\putwordAppendix\space \appendixletter}%
-  \message{\appendixnum}%
+  % \putwordAppendix can contain complex things in translations.
+  \toks0=\expandafter{\putwordAppendix}%
+  \message{\the\toks0 \space \appendixletter}%
   %
   \chapmacro{#1}{Yappendix}{\appendixletter}%
   %
@@ -5097,7 +5301,7 @@ end
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
   {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\raggedright
+                    \parindent=0pt\ptexraggedright
                     \rmisbold #1\hfill}}%
   \bigskip \par\penalty 200\relax
   \suppressfirstparagraphindent
@@ -5190,7 +5394,10 @@ end
     \xdef\lastchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\appendixletter}%
-      \gdef\noexpand\thischapter{\putwordAppendix{} \noexpand\thischapternum:
+      % \noexpand\putwordAppendix avoids expanding indigestible
+      % commands in some of the translations.
+      \gdef\noexpand\thischapter{\noexpand\putwordAppendix{}
+                                 \noexpand\thischapternum:
                                  \noexpand\thischaptername}%
     }%
   \else
@@ -5198,7 +5405,10 @@ end
     \xdef\lastchapterdefs{%
       \gdef\noexpand\thischaptername{\the\toks0}%
       \gdef\noexpand\thischapternum{\the\chapno}%
-      \gdef\noexpand\thischapter{\putwordChapter{} \noexpand\thischapternum:
+      % \noexpand\putwordChapter avoids expanding indigestible
+      % commands in some of the translations.
+      \gdef\noexpand\thischapter{\noexpand\putwordChapter{}
+                                 \noexpand\thischapternum:
                                  \noexpand\thischaptername}%
     }%
   \fi\fi\fi
@@ -5254,7 +5464,7 @@ end
     %
     % Typeset the actual heading.
     \nobreak % Avoid page breaks at the interline glue.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
           \hangindent=\wd0 \centerparametersmaybe
           \unhbox0 #1\par}%
   }%
@@ -5278,7 +5488,7 @@ end
 %
 \def\unnchfopen #1{%
 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\raggedright
+                       \parindent=0pt\ptexraggedright
                        \rmisbold #1\hfill}}\bigskip \par\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
@@ -5341,7 +5551,10 @@ end
         \xdef\lastsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          \gdef\noexpand\thissection{\putwordSection{} 
\noexpand\thissectionnum:
+          % \noexpand\putwordSection avoids expanding indigestible
+          % commands in some of the translations.
+          \gdef\noexpand\thissection{\noexpand\putwordSection{}
+                                     \noexpand\thissectionnum:
                                      \noexpand\thissectionname}%
         }%
       \fi
@@ -5351,12 +5564,20 @@ end
         \xdef\lastsectiondefs{%
           \gdef\noexpand\thissectionname{\the\toks0}%
           \gdef\noexpand\thissectionnum{#4}%
-          \gdef\noexpand\thissection{\putwordSection{} 
\noexpand\thissectionnum:
+          % \noexpand\putwordSection avoids expanding indigestible
+          % commands in some of the translations.
+          \gdef\noexpand\thissection{\noexpand\putwordSection{}
+                                     \noexpand\thissectionnum:
                                      \noexpand\thissectionname}%
         }%
       \fi
     \fi\fi\fi
     %
+    % Go into vertical mode.  Usually we'll already be there, but we
+    % don't want the following whatsit to end up in a preceding paragraph
+    % if the document didn't happen to have a blank line.
+    \par
+    %
     % Output the mark.  Pass it through \safewhatsit, to take care of
     % the preceding space.
     \safewhatsit\domark
@@ -5406,7 +5627,7 @@ end
     \nobreak
     %
     % Output the actual section heading.
-    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \raggedright
+    \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright
           \hangindent=\wd0  % zero if no section number
           \unhbox0 #1}%
   }%
@@ -5422,11 +5643,11 @@ end
   % glue accumulate.  (Not a breakpoint because it's preceded by a
   % discardable item.)
   \vskip-\parskip
-  % 
+  %
   % This is purely so the last item on the list is a known \penalty >
   % 10000.  This is so \startdefun can avoid allowing breakpoints after
   % section headings.  Otherwise, it would insert a valid breakpoint between:
-  % 
+  %
   %   @section sec-whatever
   %   @deffn def-whatever
   \penalty 10001
@@ -5484,7 +5705,7 @@ end
 % These characters do not print properly in the Computer Modern roman
 % fonts, so we must take special care.  This is more or less redundant
 % with the Texinfo input format setup at the end of this file.
-% 
+%
 \def\activecatcodes{%
   \catcode`\"=\active
   \catcode`\$=\active
@@ -5534,7 +5755,7 @@ end
 
 % redefined for the two-volume lispref.  We always output on
 % \jobname.toc even if this is redefined.
-% 
+%
 \def\tocreadfilename{\jobname.toc}
 
 % Normal (long) toc.
@@ -5704,46 +5925,12 @@ end
 \message{environments,}
 % @foo ... @end foo.
 
-% @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
-%
-% Since these characters are used in examples, they should be an even number of
-% \tt widths. Each \tt character is 1en, so two makes it 1em.
-%
-\def\point{$\star$}
-\def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}}
-\def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}}
-\def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}}
-\def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}}
-\def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}}
-
-% The @error{} command.
-% Adapted from the TeXbook's \boxit.
-%
-\newbox\errorbox
-%
-{\tentt \global\dimen0 = 3em}% Width of the box.
-\dimen2 = .55pt % Thickness of rules
-% The text. (`r' is open on the right, `e' somewhat less so on the left.)
-\setbox0 = \hbox{\kern-.75pt \reducedsf error\kern-1.5pt}
-%
-\setbox\errorbox=\hbox to \dimen0{\hfil
-   \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right.
-   \advance\hsize by -2\dimen2 % Rules.
-   \vbox{%
-      \hrule height\dimen2
-      \hbox{\vrule width\dimen2 \kern3pt          % Space to left of text.
-         \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below.
-         \kern3pt\vrule width\dimen2}% Space to right.
-      \hrule height\dimen2}
-    \hfil}
-%
-\def\error{\leavevmode\lower.7ex\copy\errorbox}
-
 % @tex ... @end tex    escapes into raw Tex temporarily.
 % One exception: @ is still an escape character, so that @end tex works.
 % But \@ or @@ will get a plain tex @ character.
 
 \envdef\tex{%
+  \setupmarkupstyle{tex}%
   \catcode `\\=0 \catcode `\{=1 \catcode `\}=2
   \catcode `\$=3 \catcode `\&=4 \catcode `\#=6
   \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie
@@ -5753,6 +5940,8 @@ end
   \catcode `\|=\other
   \catcode `\<=\other
   \catcode `\>=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
   \escapechar=`\\
   %
   \let\b=\ptexb
@@ -5888,6 +6077,7 @@ end
 
 % This macro is called at the beginning of all the @example variants,
 % inside a group.
+\newdimen\nonfillparindent
 \def\nonfillstart{%
   \aboveenvbreak
   \hfuzz = 12pt % Don't be fussy
@@ -5895,7 +6085,12 @@ end
   \let\par = \lisppar % don't ignore blank lines
   \obeylines % each line of input is a line of output
   \parskip = 0pt
+  % Turn off paragraph indentation but redefine \indent to emulate
+  % the normal \indent.
+  \nonfillparindent=\parindent
   \parindent = 0pt
+  \let\indent\nonfillindent
+  %
   \emergencystretch = 0pt % don't try to avoid overfull boxes
   \ifx\nonarrowing\relax
     \advance \leftskip by \lispnarrowing
@@ -5906,6 +6101,24 @@ end
   \let\exdent=\nofillexdent
 }
 
+\begingroup
+\obeyspaces
+% We want to swallow spaces (but not other tokens) after the fake
+% @indent in our nonfill-environments, where spaces are normally
+% active and set to @tie, resulting in them not being ignored after
+% @indent.
+\gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}%
+\gdef\nonfillindentcheck{%
+\ifx\temp %
+\expandafter\nonfillindentgobble%
+\else%
+\leavevmode\nonfillindentbox%
+\fi%
+}%
+\endgroup
+\def\nonfillindentgobble#1{\nonfillindent}
+\def\nonfillindentbox{\hbox to \nonfillparindent{\hss}}
+
 % If you want all examples etc. small: @set dispenvsize small.
 % If you want even small examples the full size: @set dispenvsize nosmall.
 % This affects the following displayed environments:
@@ -5954,7 +6167,7 @@ end
 %
 \maketwodispenvs {lisp}{example}{%
   \nonfillstart
-  \tt\quoteexpand
+  \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
   \gobble       % eat return
 }
@@ -5992,6 +6205,30 @@ end
 \let\Eflushright = \afterenvbreak
 
 
+% @raggedright does more-or-less normal line breaking but no right
+% justification.  From plain.tex.
+\envdef\raggedright{%
+  \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax
+}
+\let\Eraggedright\par
+
+\envdef\raggedleft{%
+  \parindent=0pt \leftskip0pt plus2em
+  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+  \hbadness=10000 % Last line will usually be underfull, so turn off
+                  % badness reporting.
+}
+\let\Eraggedleft\par
+
+\envdef\raggedcenter{%
+  \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em
+  \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt
+  \hbadness=10000 % Last line will usually be underfull, so turn off
+                  % badness reporting.
+}
+\let\Eraggedcenter\par
+
+
 % @quotation does normal linebreaking (hence we can't use \nonfillstart)
 % and narrows the margins.  We keep \parskip nonzero in general, since
 % we're doing normal filling.  So, when using \aboveenvbreak and
@@ -6058,6 +6295,10 @@ end
   \do\ \do\\\do\{\do\}\do\$\do\&%
   \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~%
   \do\<\do\>\do\|address@hidden"%
+  % Don't do the quotes -- if we do, @set txicodequoteundirected and
+  % @set txicodequotebacktick will not have effect on @verb and
+  % @verbatim, and ?` and !` ligatures won't get disabled.
+  %\do\`\do\'%
 }
 %
 % [Knuth] p. 380
@@ -6075,7 +6316,7 @@ end
 \def\setupverb{%
   \tt  % easiest (and conventionally used) font for verbatim
   \def\par{\leavevmode\endgraf}%
-  \catcode`\`=\active
+  \setupmarkupstyle{verb}%
   \tabeightspaces
   % Respect line breaks,
   % print special symbols as themselves, and
@@ -6090,33 +6331,6 @@ end
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
 \def\starttabbox{\setbox0=\hbox\bgroup}
-
-% Allow an option to not replace quotes with a regular directed right
-% quote/apostrophe (char 0x27), but instead use the undirected quote
-% from cmtt (char 0x0d).  The undirected quote is ugly, so don't make it
-% the default, but it works for pasting with more pdf viewers (at least
-% evince), the lilypond developers report.  xpdf does work with the
-% regular 0x27.  
-% 
-\def\codequoteright{%
-  \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax
-    \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax
-      '%
-    \else \char'15 \fi
-  \else \char'15 \fi
-}
-%
-% and a similar option for the left quote char vs. a grave accent.
-% Modern fonts display ASCII 0x60 as a grave accent, so some people like
-% the code environments to do likewise.
-% 
-\def\codequoteleft{%
-  \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax
-    \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax
-      \relax`% the \relax disables the `! and `? ligatures
-    \else \char'22 \fi
-  \else \char'22 \fi
-}
 %
 \begingroup
   \catcode`\^^I=\active
@@ -6130,13 +6344,6 @@ end
       \wd0=\dimen0 \box0 \starttabbox
     }%
   }
-  \catcode`\'=\active
-  \gdef\rquoteexpand{\catcode\rquoteChar=\active \def'{\codequoteright}}%
-  %
-  \catcode`\`=\active
-  \gdef\lquoteexpand{\catcode\lquoteChar=\active \def`{\codequoteleft}}%
-  %
-  \gdef\quoteexpand{\rquoteexpand \lquoteexpand}%
 \endgroup
 
 % start the verbatim environment.
@@ -6146,9 +6353,8 @@ end
   % Easiest (and conventionally used) font for verbatim
   \tt
   \def\par{\leavevmode\egroup\box0\endgraf}%
-  \catcode`\`=\active
   \tabexpand
-  \quoteexpand
+  \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
   % make each space count
@@ -6487,7 +6693,7 @@ end
   %
   % On the other hand, if an argument has two dashes (for instance), we
   % want a way to get ttsl.  Let's try @var for that.
-  \let\var=\ttslanted
+  \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}%
   #1%
   \sl\hyphenchar\font=45
 }
@@ -6641,7 +6847,7 @@ end
 % This does \let #1 = #2, with \csnames; that is,
 %   \let \csname#1\endcsname = \csname#2\endcsname
 % (except of course we have to play expansion games).
-% 
+%
 \def\cslet#1#2{%
   \expandafter\let
   \csname#1\expandafter\endcsname
@@ -7801,21 +8007,22 @@ end
     \closein 1
   \endgroup % end raw TeX
 \endgroup}
-}
 %
 % If they passed de_DE, and txi-de_DE.tex doesn't exist,
 % try txi-de.tex.
-% 
-\def\documentlanguagetrywithoutunderscore#1_#2\finish{%
+%
+\gdef\documentlanguagetrywithoutunderscore#1_#2\finish{%
   \openin 1 txi-#1.tex
   \ifeof 1
     \errhelp = \nolanghelp
     \errmessage{Cannot read language file txi-#1.tex}%
   \else
+    \globaldefs = 1  % everything in the txi-LL files needs to persist
     \input txi-#1.tex
   \fi
   \closein 1
 }
+}% end of special _ catcode
 %
 \newhelp\nolanghelp{The given language definition file cannot be found or
 is empty.  Maybe you need to install it?  Putting it in the current
@@ -7824,16 +8031,16 @@ directory should work if nowhere else does.}
 % This macro is called from txi-??.tex files; the first argument is the
 % \language name to set (without the "\lang@" prefix), the second and
 % third args are \{left,right}hyphenmin.
-% 
+%
 % The language names to pass are determined when the format is built.
 % See the etex.log file created at that time, e.g.,
 % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log.
-% 
+%
 % With TeX Live 2008, etex now includes hyphenation patterns for all
 % available languages.  This means we can support hyphenation in
 % Texinfo, at least to some extent.  (This still doesn't solve the
 % accented characters problem.)
-% 
+%
 address@hidden
 \def\txisetlanguage#1#2#3{%
   % do not set the language if the name is undefined in the current TeX.
@@ -7888,7 +8095,7 @@ directory should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \lattwochardefs
   %
-  \else \ifx \declaredencoding \latone 
+  \else \ifx \declaredencoding \latone
      \setnonasciicharscatcode\active
      \latonechardefs
   %
@@ -7900,7 +8107,7 @@ directory should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \utfeightchardefs
   %
-  \else 
+  \else
     \message{Unknown document encoding #1, ignoring.}%
   %
   \fi % utfeight
@@ -7912,7 +8119,7 @@ directory should work if nowhere else does.}
 
 % A message to be logged when using a character that isn't available
 % the default font encoding (OT1).
-% 
+%
 \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}}
 
 % Take account of \c (plain) vs. \, (Texinfo) difference.
@@ -7925,21 +8132,21 @@ directory should work if nowhere else does.}
 %
 % Latin1 (ISO-8859-1) character definitions.
 \def\latonechardefs{%
-  \gdef^^a0{~} 
+  \gdef^^a0{~}
   \gdef^^a1{\exclamdown}
-  \gdef^^a2{\missingcharmsg{CENT SIGN}} 
+  \gdef^^a2{\missingcharmsg{CENT SIGN}}
   \gdef^^a3{{\pounds}}
   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
   \gdef^^a5{\missingcharmsg{YEN SIGN}}
-  \gdef^^a6{\missingcharmsg{BROKEN BAR}} 
+  \gdef^^a6{\missingcharmsg{BROKEN BAR}}
   \gdef^^a7{\S}
-  \gdef^^a8{\"{}} 
-  \gdef^^a9{\copyright} 
+  \gdef^^a8{\"{}}
+  \gdef^^a9{\copyright}
   \gdef^^aa{\ordf}
   \gdef^^ab{\guillemetleft}
   \gdef^^ac{$\lnot$}
-  \gdef^^ad{\-} 
-  \gdef^^ae{\registeredsymbol} 
+  \gdef^^ad{\-}
+  \gdef^^ae{\registeredsymbol}
   \gdef^^af{\={}}
   %
   \gdef^^b0{\textdegree}
@@ -7966,7 +8173,7 @@ directory should work if nowhere else does.}
   \gdef^^c2{\^A}
   \gdef^^c3{\~A}
   \gdef^^c4{\"A}
-  \gdef^^c5{\ringaccent A} 
+  \gdef^^c5{\ringaccent A}
   \gdef^^c6{\AE}
   \gdef^^c7{\cedilla C}
   \gdef^^c8{\`E}
@@ -7978,7 +8185,7 @@ directory should work if nowhere else does.}
   \gdef^^ce{\^I}
   \gdef^^cf{\"I}
   %
-  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER ETH}}
+  \gdef^^d0{\DH}
   \gdef^^d1{\~N}
   \gdef^^d2{\`O}
   \gdef^^d3{\'O}
@@ -7992,7 +8199,7 @@ directory should work if nowhere else does.}
   \gdef^^db{\^U}
   \gdef^^dc{\"U}
   \gdef^^dd{\'Y}
-  \gdef^^de{\missingcharmsg{LATIN CAPITAL LETTER THORN}}
+  \gdef^^de{\TH}
   \gdef^^df{\ss}
   %
   \gdef^^e0{\`a}
@@ -8012,7 +8219,7 @@ directory should work if nowhere else does.}
   \gdef^^ee{\^{\dotless i}}
   \gdef^^ef{\"{\dotless i}}
   %
-  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER ETH}}
+  \gdef^^f0{\dh}
   \gdef^^f1{\~n}
   \gdef^^f2{\`o}
   \gdef^^f3{\'o}
@@ -8026,7 +8233,7 @@ directory should work if nowhere else does.}
   \gdef^^fb{\^u}
   \gdef^^fc{\"u}
   \gdef^^fd{\'y}
-  \gdef^^fe{\missingcharmsg{LATIN SMALL LETTER THORN}}
+  \gdef^^fe{\th}
   \gdef^^ff{\"y}
 }
 
@@ -8098,7 +8305,7 @@ directory should work if nowhere else does.}
   \gdef^^ce{\^I}
   \gdef^^cf{\v D}
   %
-  \gdef^^d0{\missingcharmsg{LATIN CAPITAL LETTER D WITH STROKE}}
+  \gdef^^d0{\DH}
   \gdef^^d1{\'N}
   \gdef^^d2{\v N}
   \gdef^^d3{\'O}
@@ -8107,7 +8314,7 @@ directory should work if nowhere else does.}
   \gdef^^d6{\"O}
   \gdef^^d7{$\times$}
   \gdef^^d8{\v R}
-  \gdef^^d9{\ringaccent U} 
+  \gdef^^d9{\ringaccent U}
   \gdef^^da{\'U}
   \gdef^^db{\H U}
   \gdef^^dc{\"U}
@@ -8132,7 +8339,7 @@ directory should work if nowhere else does.}
   \gdef^^ee{\^\i}
   \gdef^^ef{\v d}
   %
-  \gdef^^f0{\missingcharmsg{LATIN SMALL LETTER D WITH STROKE}}
+  \gdef^^f0{\dh}
   \gdef^^f1{\'n}
   \gdef^^f2{\v n}
   \gdef^^f3{\'o}
@@ -8151,11 +8358,11 @@ directory should work if nowhere else does.}
 }
 
 % UTF-8 character definitions.
-% 
+%
 % This code to support UTF-8 is based on LaTeX's utf8.def, with some
 % changes for Texinfo conventions.  It is included here under the GPL by
 % permission from Frank Mittelbach and the LaTeX team.
-% 
+%
 \newcount\countUTFx
 \newcount\countUTFy
 \newcount\countUTFz
@@ -8305,6 +8512,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00CE}{\^I}
   \DeclareUnicodeCharacter{00CF}{\"I}
 
+  \DeclareUnicodeCharacter{00D0}{\DH}
   \DeclareUnicodeCharacter{00D1}{\~N}
   \DeclareUnicodeCharacter{00D2}{\`O}
   \DeclareUnicodeCharacter{00D3}{\'O}
@@ -8317,6 +8525,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00DB}{\^U}
   \DeclareUnicodeCharacter{00DC}{\"U}
   \DeclareUnicodeCharacter{00DD}{\'Y}
+  \DeclareUnicodeCharacter{00DE}{\TH}
   \DeclareUnicodeCharacter{00DF}{\ss}
 
   \DeclareUnicodeCharacter{00E0}{\`a}
@@ -8336,6 +8545,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}}
   \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}}
 
+  \DeclareUnicodeCharacter{00F0}{\dh}
   \DeclareUnicodeCharacter{00F1}{\~n}
   \DeclareUnicodeCharacter{00F2}{\`o}
   \DeclareUnicodeCharacter{00F3}{\'o}
@@ -8348,6 +8558,7 @@ directory should work if nowhere else does.}
   \DeclareUnicodeCharacter{00FB}{\^u}
   \DeclareUnicodeCharacter{00FC}{\"u}
   \DeclareUnicodeCharacter{00FD}{\'y}
+  \DeclareUnicodeCharacter{00FE}{\th}
   \DeclareUnicodeCharacter{00FF}{\"y}
 
   \DeclareUnicodeCharacter{0100}{\=A}
@@ -8892,6 +9103,9 @@ directory should work if nowhere else does.}
 
 \message{and turning on texinfo input format.}
 
+% DEL is a comment character, in case @c does not suffice.
+\catcode`\^^? = 14
+
 % Define macros to output various characters with catcode for normal text.
 \catcode`\"=\other
 \catcode`\~=\other
@@ -9001,7 +9215,7 @@ directory should work if nowhere else does.}
 
 % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of
 % the literal character `\'.
-% 
+%
 @address@hidden
   @address@hidden
   @let"address@hidden
@@ -9013,6 +9227,8 @@ directory should work if nowhere else does.}
   @let>address@hidden
   @address@hidden
   @address@hidden %$ font-lock fix
+  @markupsetuplqdefault
+  @markupsetuprqdefault
   @unsepspaces
 }
 
@@ -9051,12 +9267,16 @@ directory should work if nowhere else does.}
 @c txicodequotebacktick work right in, e.g., @address@hidden'}}.  If we
 @c don't make ` and ' active, @code will not get them as active chars.
 @c Do this last of all since we use ` in the previous @catcode assignments.
address@hidden (not ready yet, sigh)
address@hidden atcode`@'address@hidden @let'@rq
address@hidden address@hidden@active @address@hidden
- 
address@hidden@'address@hidden
address@hidden@address@hidden
address@hidden
address@hidden
+
address@hidden Gnulib now utterly and painfully insists on no trailing 
whitespace.
address@hidden So nuke it.
+
 @c Local variables:
address@hidden eval: (add-hook 'write-file-hooks 'time-stamp)
address@hidden eval: (add-hook 'write-file-hooks 'time-stamp 
'nuke-trailing-whitespace)
 @c page-delimiter: "^\\\\message"
 @c time-stamp-start: "def\\\\texinfoversion{"
 @c time-stamp-format: "%:y-%02m-%02d.%02H"
diff --git a/m4/Makefile.in b/m4/Makefile.in
index 808c253..d160594 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -239,7 +239,8 @@ $(am__aclocal_m4_deps):
 install-dist_m4dataDATA: $(dist_m4data_DATA)
        @$(NORMAL_INSTALL)
        test -z "$(m4datadir)" || $(MKDIR_P) "$(DESTDIR)$(m4datadir)"
-       @list='$(dist_m4data_DATA)'; for p in $$list; do \
+       @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
+       for p in $$list; do \
          if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
          echo "$$d$$p"; \
        done | $(am__base_list) | \
@@ -250,7 +251,7 @@ install-dist_m4dataDATA: $(dist_m4data_DATA)
 
 uninstall-dist_m4dataDATA:
        @$(NORMAL_UNINSTALL)
-       @list='$(dist_m4data_DATA)'; \
+       @list='$(dist_m4data_DATA)'; test -n "$(m4datadir)" || list=; \
        files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
        test -n "$$files" || exit 0; \
        echo " ( cd '$(DESTDIR)$(m4datadir)' && rm -f" $$files ")"; \
@@ -278,10 +279,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 69ac2d5..a7ce706 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,5 +1,4 @@
 ## Process this file with automake to create Makefile.in
-AUTOMAKE_OPTIONS = parallel-tests
 
 XFAIL_TESTS =                                  \
 all.test                                       \
@@ -329,6 +328,14 @@ instsh2.test \
 instsh3.test \
 instdat.test \
 instdat2.test \
+instdir.test \
+instdir2.test \
+instdir-java.test \
+instdir-lisp.test \
+instdir-ltlib.test \
+instdir-prog.test \
+instdir-python.test \
+instdir-texi.test \
 instexec.test \
 instfail.test \
 instfail-info.test \
@@ -489,6 +496,9 @@ parallel-tests3.test \
 parallel-tests4.test \
 parallel-tests5.test \
 parallel-tests6.test \
+parallel-tests7.test \
+parallel-tests8.test \
+parallel-tests9.test \
 parse.test \
 percent.test \
 percent2.test \
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 69847c5..e49cd07 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -92,13 +92,15 @@ am__base_list = \
 am__rst_title = sed 's/.*/   &   /;h;s/./=/g;p;x;p;g;p;s/.*//'
 am__rst_section = sed 'p;s/./=/g;p;g'
 # Put stdin (possibly several lines separated by ".  ") in a box.
-am__text_box = { nlinit=`echo 'nl="'; echo '"'`; eval "$$nlinit"; \
-  sed "s/\\.  /\\$$nl/g"; } | sed '/^$$/d' |                   \
-$(AWK) '{ if (final) final = final "\n" $$0; else final = $$0; }\
-max < length($$0) { max = length($$0); }                       \
-END {                                                          \
-  for (i = 0; i < max; ++i) line = line "=";                   \
-  print line; print final; print line;                         \
+am__text_box = $(AWK) '{                               \
+  n = split($$0, lines, "\\.  "); max = 0;             \
+  for (i = 1; i <= n; ++i)                             \
+    if (max < length(lines[i]))                                \
+      max = length(lines[i]);                          \
+  for (i = 0; i < max; ++i) line = line "=";           \
+  print line;                                          \
+  for (i = 1; i <= n; ++i) if (lines[i]) print lines[i];\
+  print line;                                          \
 }'
 # Solaris 10 'make', and several other traditional 'make' implementations,
 # pass "-e" to $(SHELL).  This contradicts POSIX.  Work around the problem
@@ -123,11 +125,15 @@ elif test -f "$$f"; then dir=;                            
\
 else dir="$(srcdir)/"; fi;                             \
 tst=$$dir$$f; log='$@'; __SAVED_TERM=$$TERM;           \
 $(TESTS_ENVIRONMENT)
+RECHECK_LOGS = $(TEST_LOGS)
+AM_RECURSIVE_TARGETS = check recheck check-html recheck-html
 TEST_SUITE_LOG = test-suite.log
 TEST_SUITE_HTML = $(TEST_SUITE_LOG:.log=.html)
 TEST_EXTENSIONS = .test
 am__test_logs1 = $(TESTS:=.log)
 TEST_LOGS = $(am__test_logs1:.test.log=.log)
+TEST_LOG_COMPILE = $(TEST_LOG_COMPILER) $(AM_TEST_LOG_FLAGS) \
+       $(TEST_LOG_FLAGS)
 TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
@@ -218,7 +224,6 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-AUTOMAKE_OPTIONS = parallel-tests
 XFAIL_TESTS = \
 all.test                                       \
 auxdir2.test                                   \
@@ -555,6 +560,14 @@ instsh2.test \
 instsh3.test \
 instdat.test \
 instdat2.test \
+instdir.test \
+instdir2.test \
+instdir-java.test \
+instdir-lisp.test \
+instdir-ltlib.test \
+instdir-prog.test \
+instdir-python.test \
+instdir-texi.test \
 instexec.test \
 instfail.test \
 instfail-info.test \
@@ -715,6 +728,9 @@ parallel-tests3.test \
 parallel-tests4.test \
 parallel-tests5.test \
 parallel-tests6.test \
+parallel-tests7.test \
+parallel-tests8.test \
+parallel-tests9.test \
 parse.test \
 percent.test \
 percent2.test \
@@ -1073,15 +1089,12 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
          for f in $$list; do                                           \
            read line < $$f;                                            \
            case $$line in                                              \
-             SKIP:*|PASS:*|XFAIL:*);;                                  \
+             PASS:*|XFAIL:*);;                                         \
              *) echo; cat $$f;;                                        \
            esac;                                                       \
          done;                                                         \
        } >$(TEST_SUITE_LOG).tmp;                                       \
        mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG);                     \
-       if test -n '$(LAZY_TEST_SUITE)'; then                           \
-         msg="$${msg}(tests were rerun lazily).  ";                    \
-       fi;                                                             \
        if test "$$failures" -ne 0; then                                \
          msg="$${msg}See $(subdir)/$(TEST_SUITE_LOG).  ";              \
          if test -n "$(PACKAGE_BUGREPORT)"; then                       \
@@ -1101,15 +1114,23 @@ $(TEST_SUITE_LOG): $(TEST_LOGS)
 
 # Run all the tests.
 check-TESTS:
-       @list='$(TEST_LOGS)'; if test -z '$(LAZY_TEST_SUITE)'           \
-         && test -n "$$list"; then                                     \
-         rm -f $$list;                                                 \
-       fi
+       @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list
        @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG)
        @set_logs=; if test "X$(TEST_LOGS)" = X.log; then               \
          set_logs=TEST_LOGS=;                                          \
        fi;                                                             \
        $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) $$set_logs
+recheck-TESTS:
+       @list='$(TEST_LOGS)';                                           \
+       logs=`for f in $$list; do                                       \
+               if read line < $$f; then                                \
+                 case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
+               else echo $$f; fi;                                      \
+             done | tr '\012\015' '  '`;                               \
+       $(MAKE) $(AM_MAKEFLAGS) check-TESTS RECHECK_LOGS="$$logs"
+
+recheck-am: recheck-TESTS
+recheck: recheck-am
 
 .log.html:
        @list='$(RST2HTML) $$RST2HTML rst2html rst2html.py';            \
@@ -1127,14 +1148,15 @@ check-TESTS:
 
 # Be sure to run check-TESTS first, and then to convert the result.
 # Beware of concurrent executions.  And expect check-TESTS to fail.
-check-html:
-       @if $(MAKE) $(AM_MAKEFLAGS) check-TESTS; then :; else   \
-         rv=$$?;                                               \
-         $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML);           \
-         exit $$rv;                                            \
-       fi
+check-html recheck-html:
+       @target=`echo $@ | sed 's/-html$$//'`;                  \
+       if $(MAKE) $(AM_MAKEFLAGS) $$target-TESTS; then         \
+         rv=0; else rv=$$?;                                    \
+       fi;                                                     \
+       $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_HTML) || exit 4;   \
+       exit $$rv
 .test.log:
-       @p='$<'; $(am__check_pre) "$$tst" $(am__check_post)
+       @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -1152,10 +1174,14 @@ distdir: $(DISTFILES)
          if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
          if test -d $$d/$$file; then \
            dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
+           if test -d "$(distdir)/$$file"; then \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
+           fi; \
            if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
-             cp -pR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
+             find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx 
{} \;; \
            fi; \
-           cp -pR $$d/$$file "$(distdir)$$dir" || exit 1; \
+           cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
          else \
            test -f "$(distdir)/$$file" \
            || cp -p $$d/$$file "$(distdir)/$$file" \
@@ -1264,7 +1290,8 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: check-TESTS check-am check-html install-am install-strip
+.MAKE: check-am check-html install-am install-strip recheck-am \
+       recheck-html
 
 .PHONY: all all-am check check-TESTS check-am check-html clean \
        clean-generic clean-local distclean distclean-generic distdir \
@@ -1275,7 +1302,8 @@ uninstall-am:
        install-pdf-am install-ps install-ps-am install-strip \
        installcheck installcheck-am installdirs maintainer-clean \
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am uninstall uninstall-am
+       pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
+       uninstall uninstall-am
 
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
diff --git a/tests/defs.in b/tests/defs.in
index f7f68b4..aee5dfa 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -301,7 +301,7 @@ unset V
 # need to control (and test for) in some of the tests to ensure
 # backward-compatible behavior.
 unset DISABLE_HARD_ERRORS
-unset LAZY_TEST_SUITE
+unset RECHECK_LOGS
 unset VERBOSE
 
 echo "=== Running test $0"
diff --git a/tests/distdir.test b/tests/distdir.test
index 641a307..4c861bf 100755
--- a/tests/distdir.test
+++ b/tests/distdir.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007  Free Software Foundation, 
Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2006, 2007, 2009  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
@@ -18,6 +19,8 @@
 # sure *srcdir is properly handled.  Note that using `./', as in
 #   EXTRA_DIST = ./joe
 # does not work portably: it fails with HP-UX and Tru64 make.
+# Also test DISTFILES containing a directory and a file in it,
+# and repeated directories.
 
 . ./defs || Exit 1
 
@@ -26,20 +29,36 @@ set -e
 echo AC_OUTPUT >>configure.in
 
 cat > Makefile.am << 'END'
-EXTRA_DIST = foo/bar joe $(top_srcdir)/woo/doo $(srcdir)/dada
+include_HEADERS = some/file another/sub/subsub/file2 yet/another/file3
+EXTRA_DIST = foo/bar joe $(top_srcdir)/woo/doo $(srcdir)/dada \
+            some another/sub yet \
+            some another/sub yet
+
+
+all-local:
+       $(MKDIR_P) another/sub/subsub
+       touch another/sub/subsub/file2
+
+CLEANFILES = another/sub/subsub/file2
+
 check-local:
        test -f $(srcdir)/foo/bar
        test -f $(srcdir)/woo/doo
        test -f $(srcdir)/joe
        test -f $(srcdir)/dada
+       test -f $(srcdir)/some/file
+       test -f $(srcdir)/another/sub/subsub/file2 \
+       || test -f /another/sub/subsub/file2
+       test -f $(srcdir)/yet/another/file3
 END
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
 
-mkdir foo woo
-touch foo/bar joe woo/doo dada
+mkdir foo woo some another another/sub another/sub/subsub yet yet/another
+touch foo/bar joe woo/doo dada some/file another/sub/subsub/file2
+touch yet/another/file3
 
 mkdir build
 cd build
diff --git a/tests/fort5.test b/tests/fort5.test
index d39bb21..4390711 100755
--- a/tests/fort5.test
+++ b/tests/fort5.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2009  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
@@ -84,6 +84,9 @@ $AUTOCONF
 # skip in this case:
 grep LT_PREREQ configure && Exit 77
 
+# Ensure we use --tag for f90, too.
+grep " --tag=FC" Makefile.in
+
 # configure may Exit 77 if no compiler is found,
 # or if the compiler cannot compile Fortran 90 files).
 ./configure
diff --git a/tests/txinfo32.test b/tests/instdir-java.test
similarity index 59%
copy from tests/txinfo32.test
copy to tests/instdir-java.test
index 267c0e9..54826c8 100755
--- a/tests/txinfo32.test
+++ b/tests/instdir-java.test
@@ -14,29 +14,46 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure the documentation targets work as required with BSD make,
-# even in the presence of subdirs (requires presence of default *-am rules).
+# If $(javadir) is the empty string, then nothing should be installed there.
 
+required=gcj
 . ./defs || Exit 1
 
 set -e
 
-mkdir sub
 cat >>configure.in <<'END'
-AC_CONFIG_FILES([sub/Makefile])
 AC_OUTPUT
 END
+
 cat >Makefile.am <<'END'
-SUBDIRS = sub
+java_JAVA = foo.java
+END
+
+cat >foo.java <<'END'
+class foo {
+}
 END
-: >sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
-./configure "--prefix=`pwd`/inst"
-$MAKE html dvi ps pdf info \
-      install-html install-dvi install-ps install-pdf install-info \
-      install-man install-data install-exec install uninstall
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
 
-Exit 0
+javadir=
+export javadir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/txinfo32.test b/tests/instdir-lisp.test
similarity index 60%
copy from tests/txinfo32.test
copy to tests/instdir-lisp.test
index 267c0e9..849b86a 100755
--- a/tests/txinfo32.test
+++ b/tests/instdir-lisp.test
@@ -14,29 +14,45 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure the documentation targets work as required with BSD make,
-# even in the presence of subdirs (requires presence of default *-am rules).
+# If $(lispdir) is the empty string, then nothing should be installed there.
 
+required=emacs
 . ./defs || Exit 1
 
 set -e
 
-mkdir sub
 cat >>configure.in <<'END'
-AC_CONFIG_FILES([sub/Makefile])
+AM_PATH_LISPDIR
 AC_OUTPUT
 END
+
 cat >Makefile.am <<'END'
-SUBDIRS = sub
+lisp_LISP = l.el
 END
-: >sub/Makefile.am
+
+: >l.el
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
-./configure "--prefix=`pwd`/inst"
-$MAKE html dvi ps pdf info \
-      install-html install-dvi install-ps install-pdf install-info \
-      install-man install-data install-exec install uninstall
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+lispdir=
+export lispdir
 
-Exit 0
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-ltlib.test b/tests/instdir-ltlib.test
new file mode 100755
index 0000000..315d2a0
--- /dev/null
+++ b/tests/instdir-ltlib.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# If $(libdir) is the empty string, then nothing should be installed there.
+# This test exercises the libtool code paths.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LTIBRARIES = libfoo.la
+nobase_lib_LTLIBRARIES = libnfoo.la sub/libnfoo.la
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-prog.test b/tests/instdir-prog.test
new file mode 100755
index 0000000..14a910b
--- /dev/null
+++ b/tests/instdir-prog.test
@@ -0,0 +1,72 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# If $(bindir) is the empty string, then nothing should be installed there.
+# This test exercises the prog and libs code paths.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = p
+nobase_bin_PROGRAMS = np sub/np
+lib_LIBRARIES = libfoo.a
+nobase_lib_LIBRARIES = libnfoo.a sub/libnfoo.a
+END
+
+cat >p.c <<'END'
+int main () { return 0; }
+END
+cp p.c np.c
+cp p.c sub/np.c
+cp p.c libfoo.c
+cp p.c libnfoo.c
+cp p.c sub/libnfoo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= libdir=
+export bindir libdir
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/txinfo32.test b/tests/instdir-python.test
similarity index 58%
copy from tests/txinfo32.test
copy to tests/instdir-python.test
index 267c0e9..d2cc586 100755
--- a/tests/txinfo32.test
+++ b/tests/instdir-python.test
@@ -14,29 +14,49 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Make sure the documentation targets work as required with BSD make,
-# even in the presence of subdirs (requires presence of default *-am rules).
+# If $(pythondir) is the empty string, then nothing should be installed there.
 
+required=python
 . ./defs || Exit 1
 
 set -e
 
-mkdir sub
 cat >>configure.in <<'END'
-AC_CONFIG_FILES([sub/Makefile])
+AM_PATH_PYTHON
 AC_OUTPUT
 END
+
+mkdir sub
+
 cat >Makefile.am <<'END'
-SUBDIRS = sub
+python_PYTHON = one.py
+END
+
+cat >one.py <<'END'
+def one(): return 1
 END
-: >sub/Makefile.am
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE
-./configure "--prefix=`pwd`/inst"
-$MAKE html dvi ps pdf info \
-      install-html install-dvi install-ps install-pdf install-info \
-      install-man install-data install-exec install uninstall
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+pythondir=
+export pythondir
 
-Exit 0
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir-texi.test b/tests/instdir-texi.test
new file mode 100755
index 0000000..747dd31
--- /dev/null
+++ b/tests/instdir-texi.test
@@ -0,0 +1,70 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# If $(infodir) is the empty string, then nothing should be installed there.
+# Likewise for the other install-* targets used for texinfo files.
+
+required='makeinfo-html tex texi2dvi'
+. ./defs || Exit 1
+
+(dvips --help 2>/dev/null >/dev/null) || Exit 77
+(pdfetex --help 2>/dev/null >/dev/null) ||
+  (pdftex --help 2>/dev/null >/dev/null) || Exit 77
+
+set -e
+
+cat >>configure.in <<'END'
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+info_TEXINFOS = foo.texi
+END
+
+cat >foo.texi << 'END'
+\input texinfo
address@hidden foo.info
address@hidden foo
address@hidden Top
+Hello walls.
address@hidden version.texi
address@hidden
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE all dvi ps pdf html
+
+infodir= htmldir= dvidir= psdir= pdfdir=
+export infodir htmldir dvidir psdir pdfdir
+
+$MAKE -e install install-html install-dvi install-ps install-pdf
+test ! -d "$instdir"
+$MAKE -e install install-html install-dvi install-ps install-pdf 
DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir.test b/tests/instdir.test
new file mode 100755
index 0000000..ceed66c
--- /dev/null
+++ b/tests/instdir.test
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# If $(foodir) is the empty string, then nothing should be installed there.
+# This test only ensures this if $(foo_PRIMARY) is also empty, see
+# instdir2.test and siblings instdir-*.test for nonempty contents.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_SUBST([foodir], ['${datadir}'/foo])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS =
+nobase_bin_SCRIPTS =
+data_DATA =
+nobase_data_DATA =
+include_HEADERS =
+nobase_include_HEADERS =
+foo_DATA =
+nobase_foo_DATA =
+bardir = $(datadir)/bar
+bar_DATA =
+nobase_bar_DATA =
+man1_MANS =
+man_MANS =
+notrans_man1_MANS =
+notrans_man_MANS =
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
+export bindir datadir includedir foodir bardir man1dir man2dir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/instdir2.test b/tests/instdir2.test
new file mode 100755
index 0000000..df22574
--- /dev/null
+++ b/tests/instdir2.test
@@ -0,0 +1,93 @@
+#! /bin/sh
+# Copyright (C) 2009  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3, 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/>.
+
+# If $(foodir) is the empty string, then nothing should be installed there.
+# This test ensures this also if $(foo_PRIMARY) is nonempty, see
+# instdir.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_SUBST([foodir], ['${datadir}'/foo])
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+bin_SCRIPTS = s
+nobase_bin_SCRIPTS = ns sub/ns
+data_DATA = d
+nobase_data_DATA = nd sub/nd
+include_HEADERS = h
+nobase_include_HEADERS = nh sub/nh
+foo_DATA = f
+nobase_foo_DATA = nf sub/nf
+bardir = $(datadir)/bar
+bar_DATA = b
+nobase_bar_DATA = nb sub/nb
+man1_MANS = m1.1
+man_MANS = m.2
+notrans_man1_MANS = nm1.1
+notrans_man_MANS = nm.2
+END
+
+: >s
+: >ns
+: >sub/ns
+: >d
+: >nd
+: >sub/nd
+: >h
+: >nh
+: >sub/nh
+: >f
+: >nf
+: >sub/nf
+: >b
+: >nb
+: >sub/nb
+: >m1.1
+: >m.2
+: >nm1.1
+: >nm.2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+bindir= datadir= includedir= foodir= bardir= man1dir= man2dir=
+export bindir datadir includedir foodir bardir man1dir man2dir
+
+$MAKE -e install
+test ! -d "$instdir"
+$MAKE -e install DESTDIR="$destdir"
+test ! -d "$instdir"
+test ! -d "$destdir"
+$MAKE -e uninstall > stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'rm -f' stdout && Exit 1
+$MAKE -e uninstall DESTDIR="$destdir"
+:
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
index e7ebd3d..056ab2f 100755
--- a/tests/parallel-tests.test
+++ b/tests/parallel-tests.test
@@ -20,7 +20,7 @@
 # - TEST_SUITE_LOG
 # - dependencies between tests
 # - DISABLE_HARD_ERRORS
-# - LAZY_TEST_SUITE
+# - RECHECK_LOGS
 
 . ./defs-p || Exit 1
 
@@ -108,24 +108,31 @@ test -f mylog.log
 # Note that the previous test and this one taken together expose the timing
 # issue that requires the check-TESTS rule to always remove TEST_SUITE_LOG
 # before running the tests lazily.
-env LAZY_TEST_SUITE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
 cat stdout
 test -f foo.log
 grep foo.test stdout
 grep bar.test stdout && Exit 1
 grep baz.test stdout && Exit 1
 grep '2.*tests.*failed' stdout
-grep 'lazily' stdout
 
 # Now, explicitly retry with all test logs already updated, and ensure
 # that the summary is still displayed.
-env LAZY_TEST_SUITE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
+env RECHECK_LOGS= $MAKE -e check > stdout && { cat stdout; Exit 1; }
 cat stdout
 grep foo.test stdout && Exit 1
 grep bar.test stdout && Exit 1
 grep baz.test stdout && Exit 1
 grep '2.*tests.*failed' stdout
 
+# Lazily rerunning only foo should only rerun this one test.
+env RECHECK_LOGS=foo.log $MAKE -e check > stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout
+grep bar.test stdout && Exit 1
+grep baz.test stdout && Exit 1
+grep '2.*tests.*failed' stdout
+
 # Test VERBOSE.
 env VERBOSE=yes $MAKE -e check > stdout && { cat stdout; Exit 1; }
 cat stdout
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
index 17a5108..f9e2a3c 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests2.test
@@ -16,6 +16,7 @@
 
 # Check parallel-tests features:
 # - check-html
+# - recheck-html
 
 required=rst2html
 . ./defs-p || Exit 1
@@ -56,4 +57,16 @@ $AUTOMAKE -a
 $MAKE check-html >stdout && { cat stdout; Exit 1; }
 cat stdout
 test -f mylog.html
+
+# Always create the HTML output, even if there were no failures.
+rm -f mylog.html
+env TESTS=foo.test $MAKE -e check-html >stdout || { cat stdout; Exit 1; }
+cat stdout
+test -f mylog.html
+
+# Create HTML output also with recheck-html
+rm -f mylog.html
+env TESTS=foo.test $MAKE -e recheck-html >stdout || { cat stdout; Exit 1; }
+cat stdout
+test -f mylog.html
 :
diff --git a/tests/parallel-tests4.test b/tests/parallel-tests7.test
similarity index 73%
copy from tests/parallel-tests4.test
copy to tests/parallel-tests7.test
index ca3e18b..6bdaaff 100755
--- a/tests/parallel-tests4.test
+++ b/tests/parallel-tests7.test
@@ -15,7 +15,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests features:
-# - suffix rules
+# - per-extension test drivers
 
 . ./defs-p || Exit 1
 set -e
@@ -31,10 +31,27 @@ cat > Makefile.am << 'END'
 TESTS = foo.chk bar.test $(check_PROGRAMS) sub/test
 check_PROGRAMS = baz bla.test bli.suff
 TEST_EXTENSIONS = .chk .test
+CHK_LOG_COMPILER = ./chk-driver
+TEST_LOG_COMPILER = ./test-driver
+AM_CHK_LOG_FLAGS = 1
+CHK_LOG_FLAGS = 2
+AM_TEST_LOG_FLAGS = 3
+TEST_LOG_FLAGS = 4
 END
 
 mkdir sub
 
+cat >chk-driver <<'END'
+#! /bin/sh
+echo $0 "$@"
+shift
+shift
+exec "$@"
+exit 127
+END
+chmod a+x chk-driver
+cp chk-driver test-driver
+
 cat >foo.chk << 'END'
 #! /bin/sh
 exit 0
@@ -61,10 +78,13 @@ unset TESTS || :
 ./configure
 $MAKE
 $MAKE check
-test -f foo.log
-test -f bar.log
+grep 'chk-driver  *1  *2' foo.log
+grep 'test-driver  *3  *4' bar.log
 test -f baz.log
-test -f bla.log
+grep driver baz.log && Exit 1
+grep 'test-driver  *3  *4' bla.log
 test -f bli.suff.log
+grep driver bli.suff.log && Exit 1
 test -f sub/test.log
+grep driver sub/test.log && Exit 1
 :
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests8.test
similarity index 52%
copy from tests/parallel-tests5.test
copy to tests/parallel-tests8.test
index f109cc2..309a2cf 100755
--- a/tests/parallel-tests5.test
+++ b/tests/parallel-tests8.test
@@ -15,54 +15,61 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests features:
-# - concurrent program compilation and testing (with EXTRA_PROGRAMS)
-#
-# Actually, this test doesn't ensure that things happen concurrently.
-# It merely serves as demonstration.  :-)
+# - generated distributed tests.
+# - listing $(srcdir)/ or $(top_srcdir)/ in TESTS doesn't work ATM,
+#   and is thus diagnosed.
+
+# TODO: this test should also ensure that the `make' implementation
+#       properly adheres to rules in all cases.  See the Autoconf
+#       manual for the ugliness in this area, when VPATH comes into
+#       play.  :-/
 
-required=GNUmake
 . ./defs-p || Exit 1
 
 set -e
 
 cat >> configure.in << 'END'
-AC_PROG_CC
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
-TESTS = $(programs) $(scripts)
-EXTRA_PROGRAMS = $(programs)
-CLEANFILES = $(EXTRA_PROGRAMS)
-dist_noinst_SCRIPTS = $(scripts)
-programs =
-scripts =
+TESTS = foo.test
+## the next line will cause automake to error out:
+TESTS += $(srcdir)/bar.test $(top_srcdir)/baz.test
+.in.test:
+       cp $< $@
+       chmod +x $@
+check_SCRIPTS = $(TESTS)
+EXTRA_DIST = foo.in foo.test
+DISTCLEANFILES = foo.test
 END
 
-for i in 1 2 3 4 5 6 7 8; do
-  echo "scripts += foo$i.test" >> Makefile.am
-  echo "programs += foo$i.prog" >> Makefile.am
-  cat >foo$i.test <<'END'
+cat >>foo.in <<'END'
 #! /bin/sh
 echo "this is $0"
 exit 0
 END
-  cat >foo$i.c <<'END'
-int main()
-{
-  return 0;
-}
-END
-  chmod a+x foo$i.test
-done
 
 $ACLOCAL
 $AUTOCONF
-$AUTOMAKE -a
+AUTOMAKE_fails -a
+grep '(srcdir.*bar' stderr
+grep 'top_srcdir.*baz' stderr
 
-unset TESTS || :
+sed '/srcdir/d' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -a
 
 ./configure
-$MAKE -j4 check
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+mkdir build
+cd build
+../configure
+$MAKE check
+test ! -f ../foo.log
 $MAKE distcheck
+
 :
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests9.test
similarity index 75%
copy from tests/parallel-tests2.test
copy to tests/parallel-tests9.test
index 17a5108..7c935d9 100755
--- a/tests/parallel-tests2.test
+++ b/tests/parallel-tests9.test
@@ -15,9 +15,8 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Check parallel-tests features:
-# - check-html
+# - recheck
 
-required=rst2html
 . ./defs-p || Exit 1
 
 set -e
@@ -53,7 +52,19 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure
-$MAKE check-html >stdout && { cat stdout; Exit 1; }
+$MAKE check >stdout && { cat stdout; Exit 1; }
 cat stdout
-test -f mylog.html
+
+$MAKE recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout && Exit 1
+grep bar.test stdout || Exit 1
+grep baz.test stdout || Exit 1
+
+# If we cannot read the log file, then redo it as well.
+chmod a-r foo.log
+$MAKE recheck >stdout && { cat stdout; Exit 1; }
+cat stdout
+grep foo.test stdout || Exit 1
+
 :


hooks/post-receive
--
GNU Automake




reply via email to

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