automake-commit
[Top][All Lists]
Advanced

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

[Automake-commit] [SCM] GNU Automake branch, mh-vala-support, updated. v


From: Ralf Wildenhues
Subject: [Automake-commit] [SCM] GNU Automake branch, mh-vala-support, updated. v1.10b-14-g00db195
Date: Sun, 19 Apr 2009 06:25:26 +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=00db19509be4d4e7b64d912e09b740e2e15e02f8

The branch, mh-vala-support has been updated
       via  00db19509be4d4e7b64d912e09b740e2e15e02f8 (commit)
       via  62796cb90bf2c7db7326923e31b654a1ca0681a4 (commit)
       via  6c4b250d8697a342fd9897e86d92ca10f67bb1ed (commit)
       via  8085398209424be5a3c9e760d62d9c9f90aa06c1 (commit)
       via  d3dbeaf957214a5834a937bef9993bfd97bbc425 (commit)
       via  f4954f569194d0218ffa37fd5937b08bbd6db7d5 (commit)
       via  371b586076414c1cafce4c66ca80fa7fac313aa0 (commit)
       via  f5ddd3b0a9522ef9933fc04743e476c0c303e181 (commit)
       via  ffe14af2ac4103768fe8747c8d96200d6e82c200 (commit)
       via  8119e99b2171eec6b830c6cf278ec623a57424b6 (commit)
       via  72bae12c59bbb1669f9049c362aecd9b658705e0 (commit)
       via  dd363d928af3723f9817f578526b9120f2b74037 (commit)
       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)
       via  d4cc23b052fda663345c0ac634cc8f07bb6417bb (commit)
       via  8ec471e0dfd31d88e10622ceb8ecc074cc0fe8ab (commit)
       via  fae34eab88fa3cac62ee6d6f4de0e478754e98d7 (commit)
       via  4c7f26e8cdc0ced0f19e1453b94f101e3b66340d (commit)
       via  67f40eda2c2b460ad42e64f01166f74e015ab604 (commit)
       via  9e741eebc802e98de2e8d1c5cc67ced64732caed (commit)
       via  f6cc7d0fa6ce0a0bb64c42f79f2a840f39aab7d2 (commit)
       via  642699970e75580e0f11f5786302082e25d8f49c (commit)
       via  5a17fc032e187e001b81958c9db1a7020ab66a5f (commit)
       via  53fd62bced5f60a77fc2d6973912a4007fae9b06 (commit)
       via  c67ad4d3b9c0e902ea4025d31c96648f5b715875 (commit)
       via  099f454e9cb59c654fd3c5805af377290b9333c2 (commit)
       via  c33683f0f738bb418d1d8548075065fe943ffb71 (commit)
       via  9aa1e525a4e192916ffe27d8ac1699c2a694cf6e (commit)
       via  2391e51c1cdaa56ab03390ebb3754f100e6b021d (commit)
       via  26147eac793c51d14ec15d699c62c84b21b0f795 (commit)
       via  64942ddeb005bd7b8bce20ae42619b945d22b1c2 (commit)
       via  cae4a474fb343b28d3c8fa72f068f7dce8856693 (commit)
       via  c65e06621b259081fa79b900c2872c8df471f89f (commit)
       via  8050a6b4d7e2afd82a8e329180e0c035da3af3e7 (commit)
       via  bee1af31a3e62086b4476ad491aacfecb4e149d8 (commit)
       via  b09961790e7e4f5f4f58e5b48464cbc5ad9e624f (commit)
       via  19e0c0ae4b457c0c32f43ac4cbc26dc9965b02a5 (commit)
       via  86ff47524cc3dff391072e12249880bfa0d42e57 (commit)
       via  f04bfdf3e333e1ba15ab9ad02355aad503c28e48 (commit)
       via  a51f03728410166e827262b59f85f31f0419e69d (commit)
       via  e0bd4af16da88e4c2c61bde42675660eff7dff51 (commit)
       via  eb3d397f20a68410d4d25e372ae5f84500f2e506 (commit)
       via  a88a2a277a7b5f835a32c2120ce6afbbeabd4167 (commit)
       via  31a0b6b54782f24dd7ed84d257095078c1d6e937 (commit)
       via  f55440a1497d8653b01324d74a4418a1847146f6 (commit)
       via  eb3945795c35cfbdc02cacb6a1f45f7b0606a5b1 (commit)
       via  ab42654df7632fed09a2317389b1eb4935d432d7 (commit)
       via  b34573760e626b558a59ea30f8ab58b76b43082a (commit)
       via  32defaf039f2ee42cca07d079412f4e554f461b5 (commit)
       via  f39d517cd3eb197819dd6697f93798103b3c3dbe (commit)
       via  8c35801ec527743f9f154759d5a1c046df11d6e0 (commit)
       via  de7eb7f3e09cecce9d504ba8f90fb49a0003c77e (commit)
       via  63a87d99bcc7b60ebb250ba1ce57b5551af330fb (commit)
       via  e37a4760fc47564d61138a1c2daaf784c7186aaf (commit)
       via  f034a464d6e536eebfb37cc788558ad613564db8 (commit)
       via  7a98106d9c1ec6a25ea69708a9d21f487535023e (commit)
       via  d7fb4311ce271bf84fb44553b435036356720e5b (commit)
       via  34ac02d388e030eb8af06fd32068b560d976cd71 (commit)
       via  500f6ca793385bfa3bc6516d5a63fcd8f28e10df (commit)
       via  d22169ba7c9707dd8bed90f1f2abcaeb59107ef9 (commit)
       via  55b11a9376f95c4a4f7eb9e0fc0b6940e71e88a5 (commit)
       via  2a5d004671522477d177d1e9553c5a0a1954fd5c (commit)
       via  cd351b874f780586c7ca5201794ff17254f87b1c (commit)
       via  77316d54d4f279f82f4fae6d49336fa442ec1849 (commit)
       via  0a0bdb97abaec849db6e4dc6caa6a919faa2491f (commit)
       via  d87a073eafb273a497b92deb12d920f96861fc27 (commit)
       via  b74717c0cfbae739157df5238d6f9af1edb8a02a (commit)
       via  72d358a957c7c5368c5618910ad1a098e1620e5d (commit)
       via  0fb020fa6e1959f06f44427f4b6b0ca99e0a2745 (commit)
       via  08810c8aba0635190b8d6d230fec651c5b44698b (commit)
       via  d21e702200d11cf226d611733df5a1917422acbb (commit)
       via  243da1ec4a23bfe8f69d22ffbc037740cbfb683d (commit)
       via  af8a0d797d79fac53e2fe92c4974a9cdce5f4ad8 (commit)
       via  bbf39a2a6c9c09642349b6cf222fc2d42013ae3d (commit)
       via  bd537a3060688951e5e91b63a9ec92aae85583d6 (commit)
       via  e1d1a42ddfaf960e0af1fdcdcb803f02c8f79d2f (commit)
       via  87b665e53a60c8020a6a172b5f3e56c65cf7e417 (commit)
       via  b4cd2d51d8048fba8a6774df859e62275e8c1c84 (commit)
       via  7a349e3a10f6e868db1329f650d5db9de8133617 (commit)
       via  a880e0977638d40bb1bbfbef451ec7447022e0b5 (commit)
       via  e9a942a19485b83690596cc8ae375b86777eaf9e (commit)
       via  21072002ed61ffc230faab3fa3f0ef720b436965 (commit)
       via  f68545efba4da0bf3b0a003fad0fe1014381809e (commit)
       via  50597fd31af66550af556512414082b22b3eb45f (commit)
       via  b610c3149e7dfe2eb3a2446ec523eb593fe8652b (commit)
       via  3b5acbefe6307a0b04046ed56e902ae374b200b8 (commit)
       via  7e2cfbf051cfa093df2c562989d297485e4f161b (commit)
       via  4c23b9a9810d05b5ac4369a55c840b20fb77649b (commit)
       via  4feeccf9409951d0d7eea8e23a56afaed8b17175 (commit)
       via  c594f8317c63ea4ece4af326788602e2e29e3084 (commit)
       via  f51165dd1a6ca52d64ba73697e9ba4a24715b0ec (commit)
       via  454cbc4c4440beb4a7368248ff7859edc54c0aae (commit)
       via  9a2df59841c8906e230a6ebe4e9cafb90dc03d56 (commit)
       via  ba74efba1a408e89a87cfe34f2e939036954e7e4 (commit)
       via  bc41f1c27a24e1eab9a036356cf3c529c35882f6 (commit)
       via  bb9dfbde44523d07a840f02e966f299568ad07f3 (commit)
       via  d016ef1e5d42bce1775b7b39e3dab89f392f27d7 (commit)
       via  96cda9c82224e6609b7ddbde89b43a91eddf2fed (commit)
       via  370b583ea8bc23d9d805fb9ec5ea97526a23331d (commit)
       via  90ea138b4ca46dc988314d74bb0e1759821aea84 (commit)
       via  d20e982e3cd4966d727c36801e7fa329c7b32011 (commit)
       via  956cf31f30be90b613d7afb8082b44feb8d2750f (commit)
       via  3e155832be4fea62d84d244ba11f0d650127335c (commit)
       via  6a0dc321fa3d45e0deaf28ad82f3b5e3c8e8ea4a (commit)
       via  be6de492fc71c2249e6d080a3e5050a4e0ad4334 (commit)
       via  3fd0df9b84cdc9106907e4662103747838251f1c (commit)
       via  937775c8efa56c28891748aa75ab540a7a884315 (commit)
       via  2b85923e0b06f7f633b7f9f18bdec2b16ec5d958 (commit)
       via  fe385087e32ac8a30d15f14f4356424a89760daa (commit)
       via  bc00e3a554688222aeed8898ae6559087d4933b6 (commit)
       via  d5bec12a1fed7ccadec4885adea35c97e149e720 (commit)
       via  78ed77404a3f3a35b9f02a4902e61857be669386 (commit)
       via  3497cbc55268e2daf66bf179978883fc92183cc2 (commit)
       via  d8efaeb33f3e662005bfe504264c54ee72b45156 (commit)
       via  c15d9a8e130cd79e9d79a8ede5a8f431ead5216f (commit)
       via  b6af214094ead458695113c17d7a2cade7c54dbc (commit)
       via  b9cf117b19fb91b3931e9bad064be6beca19240a (commit)
       via  9c0bda6240dce5262fc4b4b28b26db8cd840cd57 (commit)
       via  e7af73ee9a7f85eb5c7672d6ee61ced6bdb10f95 (commit)
       via  8f126edc167f035c6f9b9fd7607e7dfa77f33e60 (commit)
      from  ae4ab510f17e57b6a4998c590df7566fb47d73a9 (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 -----------------------------------------------------------------
-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                              | 1348 +++++++++++++++++++++++++++++++-
 HACKING                                |   33 +-
 INSTALL                                |  107 ++-
 Makefile.am                            |  177 ++++-
 Makefile.in                            |  260 +++++--
 NEWS                                   |  130 +++-
 README                                 |    8 +-
 THANKS                                 |   19 +
 aclocal.in                             |    9 +-
 aclocal.m4                             |    4 +-
 automake.in                            |  742 +++++++++++++++---
 bootstrap                              |    7 +
 configure                              |  304 +++++---
 configure.ac                           |   37 +-
 doc/Makefile.in                        |   72 ++-
 doc/amhello/.gitignore                 |    8 +
 doc/automake.texi                      | 1167 +++++++++++++++++++---------
 doc/fdl.texi                           |   90 ++-
 lib/Automake/ChannelDefs.pm            |   24 +-
 lib/Automake/Channels.pm               |  130 +++-
 lib/Automake/Config.in                 |    5 +-
 lib/Automake/DisjConditions.pm         |   20 +
 lib/Automake/FileUtils.pm              |   17 +-
 lib/Automake/Location.pm               |   36 +-
 lib/Automake/Makefile.am               |    3 +-
 lib/Automake/Makefile.in               |   57 +-
 lib/Automake/Options.pm                |    8 +-
 lib/Automake/Variable.pm               |   22 +-
 lib/Automake/XFile.pm                  |    5 +-
 lib/Automake/tests/.gitignore          |    2 +
 lib/Automake/tests/Condition-t.pl      |  301 +++++++
 lib/Automake/tests/DisjConditions-t.pl |  436 +++++++++++
 lib/Automake/tests/Makefile.am         |    9 +-
 lib/Automake/tests/Makefile.in         |  365 +++++++---
 lib/INSTALL                            |  107 ++-
 lib/Makefile.in                        |   56 +-
 lib/am/Makefile.am                     |    3 +-
 lib/am/Makefile.in                     |   37 +-
 lib/am/ansi2knr.am                     |    3 +-
 lib/am/check.am                        |  278 +++++++-
 lib/am/check2.am                       |   20 +
 lib/am/configure.am                    |   12 +-
 lib/am/data.am                         |   11 +-
 lib/am/depend2.am                      |   35 +-
 lib/am/distdir.am                      |   75 ++-
 lib/am/install.am                      |    9 +-
 lib/am/java.am                         |    6 +-
 lib/am/lex.am                          |    6 +-
 lib/am/library.am                      |    9 +-
 lib/am/libs.am                         |   14 +-
 lib/am/libtool.am                      |    6 +-
 lib/am/lisp.am                         |    8 +-
 lib/am/ltlib.am                        |   12 +-
 lib/am/ltlibrary.am                    |    5 +-
 lib/am/mans.am                         |   38 +-
 lib/am/program.am                      |    2 +-
 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                     |   35 +-
 lib/am/vala.am                         |    2 +-
 lib/am/yacc.am                         |    5 +-
 lib/compile                            |   11 +-
 lib/config.guess                       |   38 +-
 lib/config.sub                         |   43 +-
 lib/depcomp                            |   72 ++-
 lib/gnupload                           |  350 +++++++--
 lib/missing                            |   42 +-
 lib/py-compile                         |   29 +-
 lib/texinfo.tex                        |  862 ++++++++++++++-------
 m4/Makefile.in                         |   36 +-
 m4/amversion.in                        |    2 +-
 m4/amversion.m4                        |    8 +-
 m4/depend.m4                           |   26 +-
 m4/depout.m4                           |   91 ++-
 m4/init.m4                             |    9 +-
 m4/install-sh.m4                       |   11 +-
 m4/missing.m4                          |   13 +-
 m4/python.m4                           |   27 +-
 m4/sanity.m4                           |   21 +-
 m4/substnot.m4                         |    9 +-
 m4/vala.m4                             |    2 +-
 tests/.gitignore                       |    5 +
 tests/Makefile.am                      |   81 ++-
 tests/Makefile.in                      |  467 +++++++++---
 tests/README                           |   37 +-
 tests/check10.test                     |   87 ++
 tests/check11.test                     |   53 ++
 tests/check8.test                      |    8 +-
 tests/compile2.test                    |   85 ++
 tests/defs.in                          |   48 +-
 tests/depend5.test                     |   71 ++
 tests/depend6.test                     |   47 ++
 tests/distcleancheck.test              |   68 ++
 tests/distdir.test                     |   27 +-
 tests/dollarvar.test                   |   72 ++
 tests/dollarvar2.test                  |   38 +
 tests/flavor.test                      |   61 ++
 tests/fort5.test                       |    5 +-
 tests/gen-parallel-tests               |   26 +
 tests/getopt.test                      |    4 +-
 tests/instdir-java.test                |   60 ++
 tests/instdir-lisp.test                |   58 ++
 tests/instdir-ltlib.test               |   74 ++
 tests/instdir-prog.test                |   72 ++
 tests/instdir-python.test              |   62 ++
 tests/instdir-texi.test                |   70 ++
 tests/instdir.test                     |   71 ++
 tests/instdir2.test                    |   93 +++
 tests/instmany-mans.test               |    2 +
 tests/instmany-python.test             |    2 +
 tests/instmany.test                    |    2 +
 tests/libtoo11.test                    |   38 +
 tests/license2.test                    |   41 +
 tests/lisp8.test                       |    6 +-
 tests/ltinstloc.test                   |   11 +-
 tests/maken.test                       |   61 ++
 tests/maken2.test                      |   63 ++
 tests/maken3.test                      |  167 ++++
 tests/maken4.test                      |  172 ++++
 tests/man4.test                        |  109 +++
 tests/man5.test                        |   67 ++
 tests/missing.test                     |   13 +-
 tests/mmodely.test                     |   14 +-
 tests/parallel-am.test                 |  104 +++
 tests/parallel-am2.test                |   78 ++
 tests/parallel-am3.test                |   75 ++
 tests/parallel-tests.test              |  142 ++++
 tests/parallel-tests2.test             |   72 ++
 tests/parallel-tests3.test             |   72 ++
 tests/parallel-tests4.test             |   70 ++
 tests/parallel-tests5.test             |   68 ++
 tests/parallel-tests6.test             |   43 +
 tests/parallel-tests7.test             |   91 +++
 tests/parallel-tests8.test             |   75 ++
 tests/parallel-tests9.test             |   70 ++
 tests/postproc.test                    |    4 +-
 tests/pr243.test                       |    4 +-
 tests/pr266.test                       |    4 +-
 tests/pr300-ltlib.test                 |    4 +-
 tests/sanity.test                      |   49 ++
 tests/silent.test                      |   92 +++
 tests/silent2.test                     |   94 +++
 tests/silent3.test                     |   95 +++
 tests/silent4.test                     |   98 +++
 tests/silent5.test                     |  162 ++++
 tests/silent6.test                     |   98 +++
 tests/silent7.test                     |   71 ++
 tests/specflg10.test                   |   88 +++
 tests/subst4.test                      |   46 ++
 tests/txinfo18.test                    |    4 +-
 tests/txinfo26.test                    |    5 +-
 tests/txinfo32.test                    |   42 +
 tests/vala.test                        |    7 +-
 tests/vala1.test                       |    7 +-
 tests/vala2.test                       |   55 +-
 tests/vala3.test                       |   63 ++-
 tests/vala4.test                       |    2 +-
 tests/vala5.test                       |   74 ++
 tests/xz.test                          |   41 +
 162 files changed, 11515 insertions(+), 1767 deletions(-)
 create mode 100644 doc/amhello/.gitignore
 create mode 100644 lib/Automake/tests/.gitignore
 create mode 100644 lib/Automake/tests/Condition-t.pl
 create mode 100644 lib/Automake/tests/DisjConditions-t.pl
 create mode 100644 lib/am/check2.am
 create mode 100755 tests/check10.test
 create mode 100755 tests/check11.test
 create mode 100755 tests/compile2.test
 create mode 100755 tests/depend5.test
 create mode 100755 tests/depend6.test
 create mode 100755 tests/distcleancheck.test
 create mode 100755 tests/dollarvar.test
 create mode 100755 tests/dollarvar2.test
 create mode 100755 tests/flavor.test
 create mode 100755 tests/gen-parallel-tests
 create mode 100755 tests/instdir-java.test
 create mode 100755 tests/instdir-lisp.test
 create mode 100755 tests/instdir-ltlib.test
 create mode 100755 tests/instdir-prog.test
 create mode 100755 tests/instdir-python.test
 create mode 100755 tests/instdir-texi.test
 create mode 100755 tests/instdir.test
 create mode 100755 tests/instdir2.test
 create mode 100755 tests/libtoo11.test
 create mode 100755 tests/license2.test
 create mode 100755 tests/maken.test
 create mode 100755 tests/maken2.test
 create mode 100755 tests/maken3.test
 create mode 100755 tests/maken4.test
 create mode 100755 tests/man4.test
 create mode 100755 tests/man5.test
 create mode 100755 tests/parallel-am.test
 create mode 100755 tests/parallel-am2.test
 create mode 100755 tests/parallel-am3.test
 create mode 100755 tests/parallel-tests.test
 create mode 100755 tests/parallel-tests2.test
 create mode 100755 tests/parallel-tests3.test
 create mode 100755 tests/parallel-tests4.test
 create mode 100755 tests/parallel-tests5.test
 create mode 100755 tests/parallel-tests6.test
 create mode 100755 tests/parallel-tests7.test
 create mode 100755 tests/parallel-tests8.test
 create mode 100755 tests/parallel-tests9.test
 create mode 100755 tests/sanity.test
 create mode 100755 tests/silent.test
 create mode 100755 tests/silent2.test
 create mode 100755 tests/silent3.test
 create mode 100755 tests/silent4.test
 create mode 100755 tests/silent5.test
 create mode 100755 tests/silent6.test
 create mode 100755 tests/silent7.test
 create mode 100755 tests/specflg10.test
 create mode 100755 tests/subst4.test
 create mode 100755 tests/txinfo32.test
 create mode 100755 tests/vala5.test
 create mode 100755 tests/xz.test

diff --git a/ChangeLog b/ChangeLog
index 161f64f..3fde2b6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,28 @@
+2009-04-19  Ralf Wildenhues  <address@hidden>
+
+       More minor fixups to vala support.
+       * automake.in (lang_vala_finish_target): Fix typo in comment.
+       * doc/automake.texi (Vala Support): Fix typo.  Declare vala
+       support as "initial".
+       * NEWS: Likewise, declare vala support as "initial".
+
+2009-04-05  Jürg Billeter  <address@hidden>
+
+       Improve Vala support.
+       * automake.in: Update to Vala 0.7.0 semantics, recover from removal
+       of built sources, support silent-rules, drop _PKGNAME variables
+       * doc/automake.texi, NEWS: Update.
+       * lib/am/vala.am: Bump copyright years.
+       * m4/vala.m4: Likewise.
+       * tests/vala.test: Remove obsolete grep tests.
+       * tests/vala1.test: Likewise.
+       * tests/vala2.test: Test full build, distcheck, and distclean.
+       * tests/vala3.test: Likewise, also test with subdir-objects.
+       * tests/vala4.test: Bump copyright years.
+       * tests/vala5.test: New test for per-target flags, expected to fail.
+       * tests/Makefile.am: Update.
+       * THANKS: Update.
+
 2008-10-10  Ralf Wildenhues  <address@hidden>
 
        Minor fixups for Vala support.
@@ -41,6 +66,1327 @@
        * tests/vala.test: Test Vala support.
        * tests/Makefile.am: Update.
 
+2009-04-04  Ralf Wildenhues  <address@hidden>
+
+       parallel-tests: LOG_COMPILER for tests without known extension.
+       * automake.in (handle_tests): If we don't match a known
+       extension, define `LOG_COMPILER' as `$(LOG_COMPILE)
+       $(AM_LOG_FLAGS) $(LOG_FLAGS)' and use it as %COMPILE% in check2.
+       * doc/automake.texi (Simple Tests using parallel-tests):
+       Document it.  In the examples, suggest using the AM_*LOG_FLAGS
+       flags in Makefile.am rather than the variables without `AM_'
+       prefix.
+       * lib/Automake/tests/Makefile.am (AM_PL_LOG_FLAGS): Renamed from
+       (PL_LOG_FLAGS): ... this variable, intended for the user.
+       * tests/parallel-tests7.test: Extend test.
+       * NEWS: Update.
+       Suggestion by Akim Demaille.
+
+       More node renaming in the manual.
+       * doc/automake.texi (Top): Adjust menu to ...
+       (API Versioning): ... this node being renamed from ...
+       (API versioning): ... this, and ...
+       (Wildcards): ... this being renamed from ...
+       (wildcards): ... this.
+       Report by Karl Berry.
+
+2009-04-03  Andreas Schwab  <address@hidden>
+
+       * tests/instdir-java.test: Don't require gcj.  Skip if javac is
+       not available.
+
+2009-04-01  Ralf Wildenhues  <address@hidden>
+
+       Fix testsuite failures due to nonexistent `dirlist' entries.
+       * tests/defs.in: When parsing `$aclocaldir/dirlist', only add
+       existing directories D to aclocal `-I D' flags, as aclocal
+       errors on nonexisting directories.
+       Report and analysis by Andreas Schwab.
+
+2009-03-31  Akim Demaille  <address@hidden>
+
+       Fix typo in manual.
+       * doc/automake.texi (Simple Tests using parallel-tests): Fix
+       typo.
+
+2009-03-31  Jim Meyering  <address@hidden>
+
+       Avoid test failure due to paranoid TAR_OPTIONS envvar setting.
+       * tests/txinfo18.test: Don't let a TAR_OPTIONS=--keep-old-files
+       environment variable setting cause test failure.  Fixed in
+       texi2dvi 4.13.
+
+       Use more common spelling in diagnostic: s/canonic/canonical/.
+       * automake.in (check_typos): s/canonic/canonical/.
+
+2009-03-31  Ralf Wildenhues  <address@hidden>
+
+       * configure.ac, NEWS: Bump version to 1.10c.
+
+2009-03-29  Ralf Wildenhues  <address@hidden>
+
+       * configure.ac, NEWS: Bump version to 1.10b.
+       * doc/automake.texi (Releases): Add statistics for 1.10b.
+
+       * 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.
+       * lib/am/check.am (check-TESTS): Expand `$(TEST_LOGS)' only once
+       in the rule command, for systems with low command line limits.
+       Remove $(TEST_SUITE_LOG) even in LAZY_TEST_SUITE mode.
+       ($(TEST_SUITE_LOG)): Always recreate $(TEST_SUITE_LOG).  Mention
+       lazy mode in the summary output.
+       * tests/parallel-tests.test: Test LAZY_TEST_SUITE semantics.
+
+2009-03-10  Ralf Wildenhues  <address@hidden>
+
+       Fix parallel-tests with empty $(TESTS) for BSD make.
+       * lib/am/check.am [PARALLEL_TESTS] ($(TEST_SUITE_LOG)): Ignore
+       empty line stemming from empty $(TEST_LOGS), to avoid counting
+       zero tests as one.
+       (check-TESTS): If `$(TESTS)' is empty, override TEST_LOGS to be
+       empty, rather than `.log', for BSD make.
+       * tests/parallel-tests6.test: New test.
+       * tests/Makefile.am: Update.
+
+       Mark check-html and check-TESTS as recursive for BSD make.
+       * lib/am/check.am [PARALLEL_TESTS] (.MAKE): Add check-TESTS
+       and check-html prerequisites.
+
+       Match XFAIL_TESTS correctly with Solaris make.
+       * lib/am/check.am [PARALLEL_TESTS]: VPATH rewriting may have
+       changed test names, so srcdir needs to be taken into account
+       explicitly when checking against the list of tests expected
+       to fail.  Fixes spurious FAILures from XFAIL_TESTS.
+
+       Use append mode to capture parallel test output.
+       * tests/lisp8.test: Use append mode for output from `make -j',
+       to avoid dropped lines.
+       * tests/parallel-tests3.test: Likewise.
+
+       parallel-tests: Fix summary output.
+       * lib/am/check.am (am__text_box): Fix unportable sed script,
+       replacing `\n' in the right hand side of an `s' command with
+       a literal newline.  Kudos to Bruno Haible for the newline idea.
+       * tests/parallel-tests.test: Update test to expose this.
+
+2009-03-08  Ralf Wildenhues  <address@hidden>
+
+       Overhaul of tests/README.
+       * tests/README: General overhaul.  Mention parallel test suite
+       execution, the test-suite.log file; document `Exit' vs. `exit',
+       `defs' vs. `defs-p', the naming of `parallel-tests' tests.
+       * README: Simplify, point to tests/README.
+
+       Documentation for the parallel-tests driver.
+       * doc/automake.texi (Tests, Options): Document the `parallel-tests'
+       option, including new features of the test driver.
+       * NEWS: Update.
+
+       New tests for `parallel-tests'.
+       * tests/parallel-tests.test: New file, to expose a bunch of
+       features of `parallel-tests': VERBOSE, clean, TEST_SUITE_LOG,
+       test dependencies, DISABLE_HARD_ERRORS.
+       * tests/parallel-tests2.test: New file, test check-html.
+       * tests/parallel-tests3.test: New file, test concurrency.
+       * tests/parallel-tests4.test: New file, test suffix rules.
+       * tests/parallel-tests5.test: New file, demonstrate compile/test
+       concurrency.
+       * tests/defs.in: Add a `required' check for rst2html.
+       * tests/Makefile.am: Update.
+
+       parallel-tests: Ensure backward-compatible semantics.
+       For each test in Automake's test suite that uses TESTS, generate
+       an identical one that uses the `parallel-tests' option, for
+       coverage of backward-compatible functionality.
+       * tests/gen-parallel-tests: New file, generates distributed
+       Makefile.am snippet tests/parallel-tests.am to list all tests
+       that use the TESTS interface but not yet the `parallel-tests'
+       option, with names mangled to use suffix `-p.test', in ...
+       (parallel_tests): ... this new make macro.
+       * tests/Makefile.am ($(srcdir)/parallel-tests.am)
+       ($(parallel_tests), defs-p): New rules.
+       (TESTS): Add check11.test and $(parallel_tests).
+       (check_SCRIPTS): Add defs-p, $(parallel_tests).
+       (check-clean-local): Remove `defs-p'.
+       (EXTRA_DIST): Distribute gen-parallel-tests.
+       (MAINTAINERCLEANFILES): New variable, remove $(parallel_tests).
+       * bootstrap: Generate parallel-tests.am.
+       * tests/check8.test: Check for circular dependencies in rules.
+       * tests/check11.test: New test, check that SKIPs are not counted
+       as passed tests.
+       * tests/defs.in: Unset DISABLE_HARD_ERRORS, LAZY_TEST_SUITE,
+       VERBOSE, so the tests are not influenced by the way our test
+       suite is invoked.
+
+2009-03-08  Akim Demaille  <address@hidden>
+           Jim Meyering  <address@hidden>
+           Benoit Sigoure  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Parallel test execution: new option `parallel-tests'.
+       * automake.in (handle_tests): Set new conditional PARALLEL_TESTS
+       when reading check.am.  Handle option `parallel-tests' and all
+       its new semantics.  Define macros TEST_SUFFIXES, TEST_SUITE_LOG,
+       TEST_SUITE_HTML, TEST_LOGS, TEST_LOGS_TMP, suffix rules if
+       applicable, and per-target rules for other tests.  Add all log
+       files to %clean_files at the `MOSTLY_CLEAN' level.
+       * lib/Automake/Options.pm (_process_option_list): Accept
+       `parallel-tests'.
+       * lib/am/check.am [!PARALLEL_TESTS] (check-TESTS): Move existing
+       testsuite driver under this new conditional.
+       [PARALLEL_TESTS]
+       (am__rst_title, am__rst_section, am__text_box am__sh_e_setup)
+       (am__check_pre, am__check_post): New internal macros.
+       ($(TEST_SUITE_LOG), check-TESTS, .log.html, check-html): New
+       rules.
+       * lib/am/check2.am: New file.
+       * lib/am/Makefile.am (dist_am_DATA): Add check2.am.
+       * tests/Makefile.am (AUTOMAKE_OPTIONS): Use `parallel-tests'.
+       (clean-local): Renamed from distclean-local.
+       * tests/defs.in: Drop VERBOSE handling, not needed here any more.
+
+2009-03-12  Ralf Wildenhues  <address@hidden>
+
+       Rename `silent' mode to `silent-rules' mode.
+       * automake.in (define_verbose_var, verbose_flag)
+       (define_verbose_tagvar, handle_options, handle_languages)
+       (handle_configure, parse_arguments): Rename the `silent' option
+       to `silent-rules', so it coincides with the `--silent-rules'
+       command line option; adjust all code and comments.
+       * lib/Automake/Options.pm (_process_option_list): Likewise.
+       * doc/automake.texi (Invoking Automake, Libtool Flags, Options):
+       Likewise.
+       * NEWS: Adjust.
+       * tests/dollarvar.test, tests/silent.test, tests/silent2.test,
+       tests/silent3.test, tests/silent4.test, tests/silent5.test,
+       tests/silent6.test, tests/silent7.test: Likewise.
+       Suggestion by Jan Engelhardt.
+
+2009-03-11  Ralf Wildenhues  <address@hidden>
+
+       `silent' mode unconditionally overrides portability-recursive.
+       * automake.in (parse_arguments): Don't handle a global `silent'
+       option here; instead, ...
+       (handle_options): ... handle the "normal" `silent' option here.
+       Override `portability-recursive' here, at the last point we deal
+       with options, instead ...
+       * lib/Automake/Options.pm (_process_option_list): ... of here.
+       * tests/silent6.test: Replace unportable make snippet, remove
+       FIXME note, add more test cases of options passed in the various
+       locations.
+
+       Drop extra line from compile rules when `silent' is not used.
+       * lib/am/depend2.am [!%FASTDEP%]: Only use the `%VERBOSE%
+       @AM_BACKSLASH@' extra line if ?VERBOSE?.
+       Report by Ralf Corsepius.
+
+2009-03-10  Ralf Wildenhues  <address@hidden>
+
+       Keep `--silent-rules' across triggered automake reruns.
+       * automake.in (usage): Reformat to be a bit clearer.
+       (handle_configure): Remove substitutions %STRICTNESS% and
+       %USE-DEPS% in favor of a new substitution %AUTOMAKE-OPTIONS%
+       that carries over all needed flags.
+       * lib/am/configure.am (%MAKEFILE-IN%): Adjust rule.
+       * tests/flavor.test: New test, to ensure --$flavor (gnu,
+       gnits, foreign, cygnus), --ignore-deps, and --silent-rules are
+       preserved across automake reruns.
+       * tests/Makefile.am: Update.
+
+2009-03-09  Ralf Wildenhues  <address@hidden>
+
+       Provide variables for silencing of user rules.
+       * automake.in (handle_languages): Always define `AM_V_GEN' and
+       `AM_V_at'.
+       * doc/automake.texi (Options): Document these flags.
+       * tests/silent7.test: New test.
+       * tests/Makefile.am: Update.
+
+       Redo variable naming for `silent' machinery.
+       The public variables are named `AM_V_' plus the compiler
+       short-hand now, e.g.: AM_V_CC, AM_V_CXXLD, AM_V_GEN.  The
+       dispatch variables are internal details and begin with
+       `am__v_'.
+       * automake.in (verbose_var): Update comment.
+       (verbose_private_var): New function.  Order functions so that
+       ones not needed outside this section are listed first.
+       (verbose_dispatch): Remove, no need to factor this.
+       (define_verbose_var, define_verbose_libtool): Use
+       verbose_private_var.
+       (define_verbose_tagvar): Likewise; and simplify.
+       Report by Jan Engelhardt.
+
+       Let -Wportability turn on/off the portability-recursive channel.
+       * lib/Automake/ChannelDefs.pm (switch_warning): switch
+       `portability-recursive' channel as well if changing the
+       `portability' channel.
+       * tests/dollarvar2.test: New test.
+       * tests/Makefile.am: Update.
+
+2009-03-07  Ralf Wildenhues  <address@hidden>
+
+       New automake command line option `--silent-rules'.
+       * automake.in (parse_arguments): Accept `--silent-rules; let it
+       override command line warning settings.
+       (usage): Document it.
+       * doc/automake.texi (Invoking Automake): Document it.
+       * NEWS: Update.
+       * tests/dollarvar.test: Also test `--silent-rules'.
+       * tests/pr300-ltlib.test: Use `$MAKE V=1' to enable verbose
+       output, which is matched later in the test.
+       * tests/silent6.test: New test.
+       * tests/Makefile.am: Update.
+
+       Documentation and tests for the `silent' option.
+       * NEWS: Update.
+       * doc/automake.texi (Invoking Automake): `silent' turns off some
+       portability warnings.
+       (Libtool Flags): `silent' silences libtool.
+       (Options): Document the `silent' flag.
+       * tests/dollarvar.test, tests/silent.test, tests/silent2.test,
+       tests/silent3.test, tests/silent4.test, tests/silent5.test: New
+       tests.
+       * tests/Makefile.am: Update.
+       * Makefile.am (maintainer-check): Ignore `DESTDIR' and `V' when
+       checking for make variables that should not be overridden from
+       the command line.
+
+2009-03-07  Jan Engelhardt  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Implement `silent' build rules.
+       * automake.in (ccer): New field in the language structure.
+       Initialize it for all registered languages.
+       (verbose_var, verbose_flag, verbose_dispatch)
+       (silent_flag, define_verbose_var, define_verbose_tagvar)
+       (define_verbose_libtool): New functions.
+       (handle_languages, handle_programs, handle_libraries)
+       (handle_ltlibraries, handle_configure)
+       (define_compiler_variable, define_linker_variable)
+       (define_per_target_linker_variable): Use them where appropriate
+       to define variables to implement the silent output machinery.
+       * lib/Automake/Options.pm (_process_option_list): Accept
+       `silent', turning off `portability-recursive'.
+       * lib/am/depend2.am: Add %VERBOSE% and %SILENT% prefixes where
+       appropriate.
+       * lib/am/lex.am: Likewise.
+       * lib/am/library.am: Likewise.
+       * lib/am/ltlibrary.am: Likewise.
+       * lib/am/program.am: Likewise.
+       * lib/am/yacc.am: Likewise.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Substitute, but do not define,
+       AM_BACKSLASH.
+       * tests/defs.in: Unset `V', to avoid influencing inner tests.
+
+2009-03-07  Ralf Wildenhues  <address@hidden>
+
+       New channel `portability-recursive'.
+       Add new channel for portability warnings about recursive make
+       variable expansions `$(var1$(var2))'.  Enable it alongside
+       `-Wportability'.
+       * lib/Automake/ChannelDefs.pm (Automake::ChannelDefs): Register
+       channel `portability-recursive'.
+       * lib/Automake/Variable.pm (_VARIABLE_CHARACTERS)
+       (_VARIABLE_RECURSIVE_PATTERN): New variables.
+       (check_variable_expansions): Diagnose recursive variable
+       expansions through the new channel.
+
+2009-03-14  Ralf Wildenhues  <address@hidden>
+
+       * NEWS: Update.
+
+2009-03-12  Ralf Wildenhues  <address@hidden>
+
+       Ignore warnings from autom4te about Libtool macros.
+       * tests/ltinstloc.test: When testing for presence of warnings,
+       filter out any that are not interesting for this test, e.g.,
+       warnings about installed files or about bogusly named cache
+       variables in libtool.m4, emitted by recent Autoconf when older
+       Libtool is used.
+
+2009-03-09  Ralf Wildenhues  <address@hidden>
+
+       Relax depcomp test for MSVC to not require minuso.
+       * m4/depend.m4 (_AM_DEPENDENCIES): When checking the msvisualcpp
+       and msvcmsys depmodes, do not require `-c -o' to work just yet.
+       It is not needed by the depcomp script for these depmodes, and
+       works around the ordering issue between the tests.
+       Report by Peter Rosin.
+
+2009-03-09  Peter Rosin  <address@hidden>
+
+       * tests/compile2.test: Fix typo.
+
+2009-03-07  Ralf Wildenhues  <address@hidden>
+
+       Improve NetBSD 'make -n' output for many standard targets.
+       * automake.in (handle_tags): Let .MAKE depend on
+       `tags-recursive' and `ctags-recursive' if appropriate.
+       (handle_all): Likewise for `all'.
+       (do_check_merge_target): Likewise for `check-am' and `check'.
+       * lib/am/ansi2knr.am (.MAKE): Depend on %ANSI2KNR-DIR%/ansi2knr.
+       * lib/am/install.am [%?maybe_BUILT_SOURCES%] (.MAKE): Depend on
+       `install'.
+       * tests/maken3.test, tests/maken4.test: New tests.
+       * tests/Makefile.am: Update.
+
+       Improve `make -n dist' and `make -n distcheck' for GNU make.
+       Ensure that `make -n dist' and `make -n distcheck' do not change
+       files, due to GNU make executing rules containing `$(MAKE)'.
+       * lib/am/distdir.am (distdir): Separate the creation of
+       `$(distdir)/$$subdir' for `$(DIST_SUBDIRS)' and the recursion
+       into the `$(DIST_SUBDIRS)' in two separate rule commands.
+       (distcheck): Exit recursive rule early when run with `make -n',
+       as detected by a witness file.
+       * tests/maken.test, tests/maken2.test: New tests.
+       * tests/Makefile.am: Update.
+       * NEWS: Update.
+
+2009-03-07  Ralf Wildenhues  <address@hidden>
+
+       Solaris make testsuite fixes.
+       * tests/check10.test: When a rule fails, Solaris make will
+       output the complete command that failed; in this case the test
+       suite driver.  Adjust the test to not bogusly match lines from
+       the driver, rather than its output.
+       * tests/distcleancheck.test: Avoid triggering VPATH rewriting,
+       not desirable in this test.
+       * tests/specflg10.test: Use BUILT_SOURCES to specify an
+       intermediate target, so Solaris make knows what to do.
+
+       testsuite: SKIP compile tests if configure found no compiler.
+       * tests/depend6.test: configure will exit 77 if AC_PROG_CC found
+       no working compiler.  Allow the test to be SKIPped in that case.
+       * tests/postproc.test: Likewise.
+       * tests/pr243.test: Likewise.
+       * tests/pr266.test: Likewise.
+
+       Fix maintainer-check fallout.
+       * tests/compile2.test: Use `Exit', not `exit'.
+
+2009-03-07  Peter Breitenlohner  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Extract correct man section from files in man_MANS.
+       * lib/am/mans.am: Extract correct man section in the presence of
+       multiple dots in the file base name and/or directory components.
+       * tests/man5.test: New test case.
+       * tests/Makefile.am: Update.
+
+2009-03-06  Ralf Wildenhues  <address@hidden>
+
+       * doc/automake.texi (maintainer-mode): Fix logic in
+       AM_MAINTAINER_MODE description.
+       * THANKS: Update.
+       Report by Daniel Kahn Gillmor.
+
+2009-03-05  Ralf Wildenhues  <address@hidden>
+
+       * lib/gnupload: Change conffile name to `.gnuploadrc'.
+
+2009-03-04  William Pursell  <address@hidden>
+
+       Replace bare `automake' with address@hidden' or `Automake'.
+       * doc/automake.texi: Avoid bare `automake' in the manual,
+       replacing occurrences with address@hidden' when the command
+       is meant, and `Automake' when speaking about the software
+       package in general.
+
+2009-03-04  Ralf Wildenhues  <address@hidden>
+
+       * lib/depcomp: Various portability and quoting nits.
+
+       reformat gnupload script.
+       * lib/gnupload: Reformat and reindent.
+
+       gnupload touchups.
+       * lib/gnupload (conffile): New variable.  Use throughout.
+       (dry_run): Use `false' and `:' values.  Show, don't execute,
+       gpg signing commands upon --dry-run.
+       (usage): Typo and formatting fixes.  Mention that commands are
+       applied in order.
+       (argument loop): Factorize a bit, fix quoting.
+       (dprint, mkdirective, mksymlink, upload): Formatting and
+       portability fixes.
+
+2009-03-04  Sergey Poznyakoff  <address@hidden>
+
+       Various gnupload improvements.
+       Add support for uploading to download.gnu.org.ua.
+       Add support for a .gnupload configuration file.
+       Support creating and removing symlinks.
+       Allow for several operations in a single invocation.
+       Add debugging features.
+       * lib/gnupload: New options --delete, --symlink, --rmsymlink,
+       --symlink-regex, --dry-run; support `--' to separate options and
+       commands from files.  New target download.gnu.org.ua.  Expand
+       `.gnupload' file contents before command line arguments.
+       (usage): Expand.
+       (dprint, mkdirective, mksymlink, upload): New functions.
+       * THANKS: Update.
+
+2009-03-03  Peter Rosin  <address@hidden>
+
+       Add depmode=msvcmsys for Microsoft Visual C++ on MSYS.
+       * lib/depcomp [msvisualcpp]: Fork fewer processes. Filter out
+       libtool in the preprocessor invocation (as is done in
+       depmode=cpp). Silence compiler stderr.
+       [msvcmsys]: New depmode as a derivative of depmode=msvisualcpp.
+       msvcmsys transforms any backslashes into forward slashes to
+       make the grep in depend.m4 match, instead of the "cygpath -u"
+       that is used in msvisualcpp.
+
+2009-03-03  Ralf Wildenhues  <address@hidden>
+           Peter Rosin  <address@hidden>
+
+       Fix w32 path handling in the `compile' script.
+       * lib/compile: Handle colons and backslashes in win32 paths.
+       * tests/compile2.test: New test.
+       * tests/Makefile.am: Update.
+       Report and initial patch by Peter Rosin.
+
+2009-03-03  Ralf Wildenhues  <address@hidden>
+
+       Fix `use constant' usage for MSYS Perl 5.6.0.
+       * automake.in (QUEUE_MESSAGE, QUEUE_CONF_FILE, QUEUE_LOCATION)
+       (QUEUE_STRING): Define using one `use constant' each; as perl
+       5.6.0 (on MSYS) does not understand `use constant { ... }'.
+       * THANKS: Update.
+       Report by Peter Rosin.
+
+2009-03-01  Ralf Wildenhues  <address@hidden>
+
+       Fix recursive html and install-* doc rules for BSD make.
+       * automake.in (%required_targets): Add html-am,
+       install-html-am, install-dvi-am, install-pdf-am, install-ps-am,
+       install-info-am.
+       * tests/txinfo32.test: New test.
+       * tests/Makefile.am: Update.
+
+       Fix comment typo.
+       * lib/am/distdir.am (distcheck): Fix typo in comment.
+
+       Ignore generated files below doc/amhello for git.
+       * doc/amhello/.gitignore: New file.
+
+2009-02-17  Ralf Wildenhues  <address@hidden>
+
+       * doc/automake.texi (Program variables): Add cross reference to
+       `Flag Variables Ordering' node.
+       Report by Karl Berry.
+
+2009-01-31  Ralf Wildenhues  <address@hidden>
+
+       Fix mmodely.test to work on Solaris 10.
+       * tests/mmodely.test: Define yylex, to satisfy needed symbol in
+       libfl.  Return from main instead of using exit, undeclared.
+       * THANKS: Update.
+       Report by Chris Hoogendyk.
+
+2009-01-30  Karl Berry  <address@hidden>
+
+       * lib/gnupload: Add download URL to --help output.
+
+2009-01-23  Eric Blake  <address@hidden>
+
+       Use no-arg macros via AC_REQUIRE for consistency.
+       * m4/init.m4 (AM_INIT_AUTOMAKE): Require, rather than directly
+       expand, AM_PROG_INSTALL_SH and AM_PROG_INSTALL_STRIP.
+       * configure: Regenerate.
+
+2009-01-20  Ralf Wildenhues  <address@hidden>
+
+       Bump copyright years.
+       * aclocal.in (write_aclocal, version): Bump copyright years.
+       * automake.in (gen_copyright, version): Likewise.
+       * doc/automake.texi: Likewise.
+
+2008-12-29  Chris Pickett  <address@hidden>  (tiny change)
+
+       * doc/automake.texi (LIBOBJS): Clarify overriding of
+       `*_DEPENDENCIES'.
+       * THANKS: Update.
+
+2008-12-21  Ralf Wildenhues  <address@hidden>
+
+       Revamp semantics for `missing help2man' and manpage distribution.
+       Previously, `missing help2man' would create a missing man page
+       containing an error message, and exit 1.  This does not play
+       well with `make': the next run will see this particular man page
+       as being up to date, and will only error out on the next
+       generated man page, if any; repeat until all pages are done.
+       This patch changes `missing' to exit successfully in this case,
+       but `make dist' will ensure that no such man pages are packaged.
+       * lib/missing: Exit successfully even if we create a replacement
+       page due to missing help2man.
+       * automake.in (make_paragraphs): Define %HAVE-MANS% to be true
+       if this makefile deals with man pages.
+       * lib/am/distdir.am (distdir): If %INSTALL-MAN% and %HAVE-MANS%,
+       check that no man page in $(MANS) contains the replacement text
+       from `missing'.
+       * tests/man4.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS: Reorder a bit, update.
+       * THANKS: Update.
+       Report by Werner Lemberg and Karl Berry.
+
+       Do not use 'global' for makefile-wide settings.
+       * doc/automake.texi (Linking, Libtool Flags)
+       (Program and Library Variables, Flag Variables Ordering):
+       Reword instances of `global variables' that really mean
+       makefile-wide ones.
+       * THANKS: Update.
+       Report by Andreas Bergmeier.
+
+       Fix config.status depfiles failure.
+       * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Commands are
+       again a single shell brace group, so they are correctly skipped
+       when dependencies are turned off.  The failure is noisy with
+       ksh only.
+       * tests/depend6.test: New test.
+       * tests/Makefile.am: Adjust.
+       * THANKS: Update.
+       Report and different suggested patch by Markus Duft.
+
+2008-12-21  Zoltan Rado  <address@hidden>  (tiny change)
+
+       * doc/automake.texi (DESTDIR): Fix a couple of typos.
+       * THANKS: Update.
+
+2008-12-13  Ralf Wildenhues  <address@hidden>
+
+       Fix nonportable sed script in 'missing'.
+       * lib/missing: In sed script, do not use ';' after 't' commands.
+
+2008-12-07  Ralf Wildenhues  <address@hidden>
+
+       PR automake/531:
+       * doc/automake.texi (amhello Explained)
+       (Mixing Fortran 77 With C and C++): Fix broken links to
+       Autoconf manual.
+       Report by Michael Ploujnikov.
+
+2008-12-07  Michael Ploujnikov  <address@hidden>  (tiny change)
+
+       * doc/automake.texi (Optional, Future of aclocal): Various
+       spelling and grammar fixes.
+       * THANKS: Update.
+
+2008-12-03  William Pursell  <address@hidden>
+
+       Simple typographical and grammar errors in automake.texi.
+       * doc/automake.texi: Fix object/article consistency (eg "an
+       flag" becomes "a flag"), correct minor punctuation errors, etc.
+
+       * doc/automake.texi (Auxiliary Programs, Python, Rebuilding):
+       Replace 'configure' with '@command{configure}' as appropriate.
+
+2008-11-29  Ralf Wildenhues  <address@hidden>
+
+       Fixup release rules.
+       * Makefile.am (cvs-diff): Remove.
+       (git-dist): Do not use clcommit any more.  Use new-style tag
+       name.  Pass $(AM_MAKEFLAGS) to $(MAKE).
+       (git-diff): Adjust.
+       (git-release): Do not upload to sources.redhat.com.
+
+2008-11-27  Ralf Wildenhues  <address@hidden>
+
+       Fix portability issues in distcleancheck_listfiles doc example.
+       * doc/automake.texi (Dist): In the `distcleancheck_listfiles'
+       code example, add `.' path, for Solaris `find', also rewrite so
+       `{}' appears only once and as separate argument, for Posix.
+       * tests/distcleancheck.test: New test.
+       * tests/Makefile.am: Update.
+       * THANKS: Update.
+       Report by Jan Engelhardt and Andreas Schwab.
+
+2008-11-27  Ralf Wildenhues  <address@hidden>
+           Jim Meyering  <address@hidden>
+
+       Cope with whitespace in $MISSING and $install_sh.
+       * configure.ac (am_AUTOHEADER): New substitution, save the value
+       of $AUTOHEADER before AM_INIT_AUTOMAKE may add $MISSING.
+       * tests/defs.in: Use am_AUTOHEADER.
+       * lib/am/install.am: Fix typo.
+       * m4/install-sh.m4 (AM_PROG_INSTALL_SH): Add suitable
+       single-quote quoting to install_sh, but only if needed.
+       * m4/missing.m4 (AM_MISSING_HAS_RUN): Add suitable double-quote
+       quoting to MISSING, but only if needed.
+       * m4/sanity.m4 (AM_SANITY_CHECK): Abort configure if `pwd` or
+       $srcdir contain shell meta-characters that cannot be handled;
+       space and tab are allowed in the former only.
+       * tests/sanity.test: New test.
+       * tests/Makefile.am: Adjust.
+       * NEWS: Update.
+       Reports by Jim Meyering and others.
+
+2008-11-24  Ralf Wildenhues  <address@hidden>
+
+       Let `missing' also work with versioned and prefixed programs.
+       * lib/missing: Ignore prefixes of `gnu-', `gnu', and `g' when
+       testing for known programs; also, ignore suffixes.
+       * tests/missing.test: Amend test.
+       * NEWS, THANKS: Update.
+       Report by Tim Rice.
+
+2008-11-23  William Pursell  <address@hidden>
+
+       * doc/automake.texi (Macro search path, Extending aclocal)
+       (Local Macros, Serials, Public macros, Directories)
+       (Conditional Subdirectories, Nesting Packages)
+       (Building a program, Libtool Modules)
+       (Program and Library Variables, Default _SOURCES, LIBOBJS):
+       Correct verb/object tense agreement, swap some words,
+       and general trivial cleanup.
+
+2008-11-22  William Pursell  <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       * doc/automake.texi (VPATH Builds, Nested Packages)
+       (Length limitations, Auxiliary Programs, Invoking Automake)
+       (Requirements, Optional): Fix typos and grammaros, correct URL
+       to 'config' source repository.  Rewrite description of AC_SUBST.
+       (true): Cross-reference to `Default _SOURCES' node.
+
+2008-11-22  William Pursell  <address@hidden>
+
+       * configure.ac: Quote APIVERSION.
+
+2008-11-22  Jim Meyering  <address@hidden>
+
+       * tests/xz.test: Fix typo introduced by Ralf in last patch.
+
+       Add xz compression support.
+       * NEWS: Mention xz as well as lzma (xz will displace lzma).
+       * automake.in (handle_dist): Recognize dist-xz.
+       (make_paragraphs): Map XZ to dist-xz.
+       * doc/automake.texi (Dist): Add dist-xz.
+       (Options): Likewise.
+       * lib/Automake/Options.pm (_process_option_list): Accept
+       dist-xz.
+       * lib/am/distdir.am (dist-xz): New rule.
+       (dist dist-all): Add command to create an xz-compressed tarball.
+       (distcheck): Handle xz-compressed tarballs just like the others.
+       * tests/xz.test: New file, based on nogzip.test.
+       * tests/Makefile.am (TESTS): Add xz.test.
+
+2008-11-22  Ralf Wildenhues  <address@hidden>
+
+       When installing COPYING, recommend adding the file to VCS.
+       * automake.in (require_file_internal): If installing `COPYING',
+       mention that we install the GPLv3 file and recommend adding the
+       file to version control.
+       * doc/automake.texi (Invoking Automake): Point to `Gnits' node
+       for `--add-missing'.
+       (Gnits): Clarify semantics: that for strictness gnu or higher,
+       INSTALL is installed, and that COPYING is installed as GPLv3
+       if no COPYING file exists.
+       * tests/license2.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS, THANKS: Update.
+       Report by Brian Cameron.
+
+2008-11-20  William Pursell  <address@hidden>
+
+       * doc/automake.texi (Timeline): Fix typos and grammaros.
+
+2008-11-12  Karl Berry  <address@hidden>
+
+       New gnupload option --delete to remove archive files.
+       * lib/gnupload: Accept --delete to remove files from
+       alpha.gnu.org or ftp.gnu.org.
+
+2008-11-12  Ralf Wildenhues  <address@hidden>
+
+       Testsuite fixes for ksh.
+       * tests/check10.test: Add ':' as last command in subshell, for
+       zero exit status of the subshell.
+       * tests/parallel-am.test: Do not let failing 'unset' of
+       nonexistent variable exit the test.
+       * tests/parallel-am2.test: Likewise.
+       * tests/parallel-am3.test: Likewise.
+
+2008-11-11 Charles Wilson  <address@hidden>  (tiny change)
+          Ralf Wildenhues  <address@hidden>
+
+       Cleanup config.lt in case LT_OUTPUT is in use.
+       * lib/am/libtool.am [TOPDIR_P] (distclean-libtool): clean up
+       config.lt as well as libtool.
+       * tests/libtoo11.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS: Update.
+
+2008-11-11  Ralf Wildenhues  <address@hidden>
+
+       * INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
+       lib/texinfo.tex: Sync from upstream.
+
+2008-11-10  Ralf Wildenhues  <address@hidden>
+
+       Update to GFDL 1.3.
+       * doc/fdl.texi: Update to GFDL 1.3.
+       * doc/automake.texi (GNU Free Documentation License): Adjust.
+       * NEWS: Update.
+
+       * NEWS: Fix typos.
+       * automake.in: Fix typos in comments.  Remove extraneous
+       whitespace.
+
+2008-11-06  Ralf Wildenhues  <address@hidden>
+
+       Cope with absent Perl modules threads and Thread::Queue.
+       * automake.in: Instead of `use threads', use `require threads;
+       import threads' inside a BEGIN section.  Likewise for
+       Thread::Queue.
+       * lib/Automake/ChannelDefs.pm (Automake::ChannelDefs): Likewise.
+       * lib/Automake/tests/Condition-t.pl: Likewise.
+       * lib/Automake/tests/DisjConditions-t.pl: Likewise.
+       * configure.ac: Likewise, use `require' and `import'.
+       Report by Eric Blake, fix suggested by Ben Pfaff.
+
+2008-11-04  Ralf Wildenhues  <address@hidden>
+
+       Multiple 'make uninstall' should not fail even for TEXINFOS.
+       * lib/am/texinfos.am (uninstall-info-am): Do not fail due to
+       install-info if the installed file does not exist (any more).
+       * tests/txinfo26.test: Issue multiple `make uninstall'.
+       * tests/instmany-mans.test: Likewise.
+       * tests/instmany-python.test: Likewise.
+       * tests/instmany.test: Likewise.
+       * tests/txinfo26.test: Likewise.
+       * NEWS: Update.
+
+2008-11-03  Ralf Wildenhues  <address@hidden>
+
+       New public macro AM_SUBST_NOTMAKE.
+       * m4/substnot.m4 (AM_SUBST_NOTMAKE): New public macro; invoke
+       _AM_SUBST_NOTMAKE with arguments.
+       * doc/automake.texi (Optional): Document it.
+       * NEWS: Update.
+       * tests/subst4.test: New test.
+       * tests/Makefile.am: Update.
+       Suggestion by Bruno Haible.
+
+       Fix regression introduced by AM_DEFAULT_SOURCE_EXT.
+       * automake.in (handle_source_transform): Use the right variable
+       when determining whether to apply the old rule for the libtool
+       library default source name.
+       Testsuite failure exposed by Bob Proulx' build daemon.
+
+2008-11-02  Ralf Wildenhues  <address@hidden>
+
+       New maintainer target release-stats.
+       * Makefile.am (release-stats): New target, to help computing the
+       entries in the statistics table in automake.texi.
+       * doc/automake.texi (Releases): Reformat a bit.  Add number of
+       generated files.  Add entry for 1.10.1.
+
+       Choose default source extension: AM_DEFAULT_SOURCE_EXT.
+       * automake.in (handle_source_transform): Accept unconditional
+       literal extension in AM_DEFAULT_SOURCE_EXT as override for the
+       default source extension `.c'.  If set, ignore the old default
+       source rule for libtool libraries.
+       * doc/automake.texi (Default _SOURCES): Document this.
+       * NEWS: Update.
+       * tests/specflg10.test: New test.
+       * tests/Makefile.am: Update.
+       Suggestion by Akim Demaille.
+
+       Fix maintainer-check failure.
+       * tests/parallel-am.test: Rename variable to not match pattern
+       used in maintainer-check.
+
+2008-10-27  Ralf Wildenhues  <address@hidden>
+
+       * NEWS: Fix typo.
+       Spotted by Jim Meyering.
+
+2008-10-26  Ralf Wildenhues  <address@hidden>
+
+       Parallel automake --add-missing: serialized file installs.
+       * automake.in (QUEUE_CONF_FILE, QUEUE_LOCATION, QUEUE_STRING):
+       New serialization keys.
+       ($required_conf_file_queue): New file global.
+       (queue_required_conf_file, require_queued_conf_file): New
+       functions, to queue and dequeue requirements for aux dir files.
+       (require_conf_file): Enqueue if needed.
+       (get_number_of_threads): Can do threads with --add-missing now.
+       (handle_makefiles_threaded): Let worker threads enqueue, let
+       master attend to queued requirements at the right time.
+       * tests/parallel-am.test: Explain the purpose of the include
+       chain used here.
+       * tests/parallel-am2.test: Also cope with --add-missing.
+       * tests/parallel-am3.test: New test, test absence of races with
+       concurrent same-file installs stemming from --add-missing.
+       * tests/Makefile.am: Adjust.
+
+       Implement serialization for Locations.
+       * lib/Automake/Location.pm (serialize, deserialize): New
+       functions.  They allows to serialize a Location in an array, and
+       to restore a Location from a thread queue.  The API is
+       unsymmetric (array vs. queue) because enqueuing data needs to
+       happen atomically.
+
+       Parallel automake: ordered output messages.
+       * lib/Automake/Channels.pm (%_default_options): New options
+       `ordered' default enabled, `queue', default zero (no queue),
+       `queue_key' default undefined.
+       (_merge_options): Ensure `ordered' channels cannot have fatal
+       messages or backtrace output.
+       (_enqueue, _dequeue): New functions, to push messages onto a
+       Thread::Queue, and output messages from such a queue, suitably
+       weeded for duplicates in the same manner as _print_message.
+       (_print_message): If the channel is ordered and has an
+       associated queue, then enqueue messages instead of printing
+       them.
+       (setup_channel_queue, pop_channel_queue): New functions,
+       to set a Thread::Queue for channels, and to flush a queue.
+       * lib/Automake/ChannelDefs.pm: Unset channel option `ordered'
+       for fatal, automake, and verb channels.
+       * automake.in (QUEUE_MESSAGE): New global constant, used as
+       serialization key.
+       (handle_makefiles_threaded): Create message queues for each
+       input file; workers queue messages, and the master outputs them
+       ordered, using the new Channels.pm functions.
+       * tests/parallel-am.test: Also check for ordered output (in the
+       absence of --add-missing races).
+       * tests/parallel-am2.test: New test; check for ordered output of
+       warning and (regular) error messages.
+       * tests/Makefile.am: Adjust.
+
+       Parallel automake execution: AUTOMAKE_JOBS.
+       * lib/Automake/Config.in (perl_threads): New global.
+       * automake.in: Use it.  If the perl supports interpreter-based
+       threading, then use `threads' and `Thread::Queue'.
+       (handle_makefile, handle_makefiles_serial): New functions,
+       factored out from main.
+       (get_number_of_threads): New function, compute number of threads
+       to use, based on environment variable `AUTOMAKE_JOBS' and number
+       of independent makefiles.
+       (handle_makefiles_threaded): New function.  Spawn threads, use
+       thread queue to distribute handling the different makefiles.
+       Collect $exit_code values from threads.
+       (main): Use new functions.
+       * aclocal.in: No threads here.
+       * configure.ac: Substitute PERL_THREADS; enabled with perl >=
+       5.7.2 and when ithreads are available.
+       * bootstrap (dosubst): Likewise.
+       * Makefile.am (do_subst): Likewise.
+       * lib/Automake/Makefile.am (do_subst): Likewise.
+       * lib/Automake/ChannelDefs.pm: Use `Automake::Config' and
+       `threads'.
+       (verb): Prepend thread ID (tid) to verbose messages.
+       * lib/Automake/Channels.pm (msg): Before exiting, flush stderr,
+       needed for worker threads.
+       * lib/Automake/tests/Makefile.am (TESTS_ENVIRONMENT): Also
+       include the build tree path, so Config.pm is found.
+       * tests/parallel-am.test: New test.
+       * tests/Makefile.am: Update.
+       * doc/automake.texi (Invoking Automake): Document AUTOMAKE_JOBS.
+       * NEWS, THANKS: Update.
+       Report about long execution times by Joakim Tjernlund and others.
+
+2008-10-26  Ralf Wildenhues  <address@hidden>
+
+       Minor file checking optimization: set_dir_cache_file.
+       * lib/Automake/FileUtils.pm (set_dir_cache_file): New function.
+       * automake.in (require_file_internal): Instead of resetting the
+       cache when a file has been installed, simply correct the cache
+       using set_dir_cache_file.
+
+       No uniquifying for fatal, prog_error, and verbose messages.
+       There is no point in dropping critical messages, even if they
+       are duplicates (unlikely to happen unless they have been sent
+       as non-critical messages before), and verbose messages should
+       enable to show progress, even using duplicate statements.
+       * lib/Automake/ChannelDefs.pm (fatal, automake, verb): Set
+       `uniq_part' to `UP_NONE' when registering these channels.
+
+       Fix 'config.status --file=... depfiles' with new Autoconf.
+       * m4/depout.m4 (_AM_OUTPUT_DEPENDENCY_COMMANDS): Eval
+       $CONFIG_STATUS contents if we detect the quoting used by
+       Autoconf 2.62 and newer for --file=.
+       * tests/depend5.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS, THANKS: Update.
+       Report by Sam Steingold against gnulib.
+
+2008-10-26  Johan Dahlin  <address@hidden>
+
+       Support for Python 3.0, drop support for pre-2.0.
+       * lib/py-compile: Do not import string; use sys.stdout.write
+       instead of print, files.split instead of string.split.
+       * m4/python.m4 (AM_PATH_PYTHON): Also look for python3 and
+       phython3.0; do not look for python1.5.  Use sys.stdout.write.
+       (AM_PYTHON_CHECK_VERSION): Do not use string; adjust to xrange
+       removal in Python 3.0, and changed semantics of map.
+       * doc/automake.texi (Python, Hard-Coded Install Paths): Update
+       Python versions mentioned in the manual, using 2.5 everywhere.
+       * NEWS, THANKS: Update.
+
+2008-10-22  Ralf Wildenhues  <address@hidden>
+
+       * lib/Automake/Channels.pm (@chain): Drop unused variable.
+
+       Cleanup of per-input global variables in automake.in.
+       * automake.in ($output_vars, $output_all, $output_header)
+       ($output_rules, $output_trailer): Fix comment, and sort
+       declarations in the order they will appear in the output.
+       ($all_target): Unused variable, remove.
+       (Variables not reset by &initialize_per_input.): New section,
+       clarify that %am_file_cache is not reset.
+       (initialize_per_input): Reset $am_file_name, $am_relative_dir,
+       $in_file_name, $relative_dir, and $topsrcdir to `undef' rather
+       than the empty string; $topsrcdir was not reset at all.  Sort
+       remaining variables in the same order as in the section
+       `Variables reset by &initialize_per_input'.
+
+       Let stderr output end up on fd 2 in testsuite.
+       * tests/defs.in (AUTOMAKE_run): Output recorded stderr on file
+       descriptor 2.
+       * tests/getopt.test: Fix erroneous multiple redirection,
+       uncovered by above change.
+
+2008-10-19  Ralf Wildenhues  <address@hidden>
+
+       Fix DisjConditions module to be thread-safe for perl >= 5.7.2.
+       Self-hashes of blessed references are not correctly transported
+       through thread creation.  This patch fixes that by recreating
+       the hashes upon thread creation with a CLONE special subroutine,
+       which is automatically invoked by new enough Perl versions.
+       * lib/Automake/DisjConditions.pm (CLONE): New special
+       subroutine to fix self hashes upon thread creation.
+       * lib/Automake/tests/Condition-t.pl: New, sister test to
+       Condition.pl, but spawns a new threads after each creation of a
+       new condition; skip test if perl is too old or ithreads are not
+       available.
+       * lib/Automake/tests/DisjConditions-t.pl: Likewise.
+       * lib/Automake/tests/Makefile.am (TESTS): Add them.
+
+2008-10-18  Ralf Wildenhues  <address@hidden>
+
+       Fix comment typos.
+       * automake.in (require_file_internal): Fix typos in comments.
+       * m4/amversion.in: Likewise.
+       * lib/Automake/Variable.pm: Likewise.
+       * lib/Automake/XFile.pm: Likewise.
+
+       Diagnose unsupported uses of `backname' helper function.
+       * automake.in (backname): Error out if the path points outside
+       the directory it started in.
+
+2008-10-12  Ralf Wildenhues  <address@hidden>
+
+       Nicer 'make dist' output.
+       * lib/am/distdir.am (distdir): Hide the complex script
+       used for computing the relative subdirs; echo the sub-make
+       command.
+
+2008-10-12  William Pursell <address@hidden>  (tiny patch)
+
+       * tests/defs.in: Fix comment typo.
+
+2008-10-12  William Pursell <address@hidden>
+           Ralf Wildenhues  <address@hidden>
+
+       Fix grammar w.r.t. plurals in test reports.
+       * lib/am/check.am: Fix singular/plural forms in test reports.
+       * tests/check10.test: New test.
+       * tests/Makefile.am: Update.
+
 2008-10-08  Ralf Wildenhues  <address@hidden>
 
        Require texi2dvi in tests, makeinfo may not be enough.
@@ -3313,7 +4659,7 @@
 
 -----
 
-Copyright (C) 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+Copyright (C) 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 
 Copying and distribution of this file, with or without modification, are
 permitted provided the copyright notice and this notice are preserved.
diff --git a/HACKING b/HACKING
index 5e7191f..f9a3c05 100644
--- a/HACKING
+++ b/HACKING
@@ -143,7 +143,8 @@
 
 * Run ./bootstrap, ./configure, make.
 
-* NOTE: the next step has not been tested yet with git, so be careful.
+* Run `make release-stats' if release statistics in doc/automake.texi
+  have not been updated yet.
 
 * Run `make git-release'.
   This will run distcheck to create the tarballs, commit the last
@@ -155,13 +156,39 @@
 * Update version number in configure.ac to next alpha number.
   Re-run ./bootstrap and commit.
 
+* Don't forget to `git push' your changes so they appear in the public
+  git tree.
+
+* Update the web pages at sources.redhat.com:
+  - bump version in index.rst,
+  - add entry to news.rst,
+  - run `make' to update .html files,
+  - create manuals:
+      cd doc
+      make pdf
+      make html MAKEINFOFLAGS=--no-split
+  - copy automake.html and automake.pdf to web cvs,
+  - add ChangeLog entry and commit.
+
+* Update the manuals at www.gnu.org:
+  - Generate manuals:
+    cd doc
+    wget 
"http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs.sh";
+    wget 
"http://savannah.gnu.org/cgi-bin/viewcvs/~checkout~/texinfo/texinfo/util/gendocs_template";
+    sh ./gendocs.sh automake  "GNU Automake"
+  - copy manuals recursively to web cvs,
+  - commit.
+  - Check for link errors, fix them, recheck until convergence:
+    <http://validator.w3.org/checklink>
+
 * Send announcement at least to address@hidden, and
   address@hidden  If not an alpha, announcement must also go to
-  address@hidden
+  address@hidden  Copy this announcement into the NEWS feed at
+  <https://savannah.gnu.org/projects/automake>.
 
 -----
 
-Copyright (C) 2003, 2007 Free Software Foundation, Inc.
+Copyright (C) 2003, 2007, 2008 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
diff --git a/INSTALL b/INSTALL
index d3c5b40..2550dab 100644
--- a/INSTALL
+++ b/INSTALL
@@ -2,15 +2,15 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-Briefly, the shell commands `./configure; make; make install' should
+   Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.
@@ -73,9 +73,9 @@ The simplest way to compile this package is:
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -88,7 +88,7 @@ is an example:
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
@@ -100,10 +100,24 @@ architecture at a time in the source code directory.  
After you have
 installed the package for one architecture, use `make distclean' before
 reconfiguring for another architecture.
 
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -126,7 +140,7 @@ option `--program-prefix=PREFIX' or 
`--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -138,14 +152,46 @@ find the X include and library files automatically, but 
if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+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
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -153,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
@@ -171,9 +218,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -182,7 +229,7 @@ A warning: not all `configure' scripts look for a site 
script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -201,11 +248,19 @@ an Autoconf bug.  Until the bug is fixed you can use this 
workaround:
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -232,6 +287,16 @@ an Autoconf bug.  Until the bug is fixed you can use this 
workaround:
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
diff --git a/Makefile.am b/Makefile.am
index 3924daa..af9147b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -3,7 +3,7 @@
 ## Makefile for Automake.
 
 ## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2002, 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
@@ -70,6 +70,7 @@ do_subst = sed \
   -e 's,address@hidden@],$(PACKAGE),g' \
   -e 's,address@hidden@],$(PATH_SEPARATOR),g' \
   -e 's,address@hidden@],$(PERL),g' \
+  -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e 's,address@hidden@],Generated from address@hidden; do not edit by 
hand.,g' \
@@ -105,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 ' | \
@@ -181,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 \
@@ -248,37 +331,49 @@ 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.
+## POSIX says it can't come from the environment.  V and DESTDIRS are 
exceptions,
+## 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; \
          exit 1; \
        fi
-       @if grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \
+       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' 
$(srcdir)/tests/*.test | \
+           grep '\$$MAKE .*=' ; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above 
lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
@@ -288,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; \
@@ -304,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; \
@@ -318,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; \
@@ -335,23 +444,18 @@ maintainer-check: automake aclocal
 
 
 git-dist: maintainer-check
-## Make sure clcommit exists (we use it at the end of git-dist).
-       @if (clcommit --version)>/dev/null 2>/dev/null; then :; else \
-         echo "Get clcommit from module cvs-utils on Savannah."; \
-         exit 1; \
-       fi
 ## Make sure the NEWS file is up-to-date.
        @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; 
else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
        fi
 ## Build the distribution
-       $(MAKE) distcheck
+       $(MAKE) $(AM_MAKEFLAGS) distcheck
 ## Finally, if anything was successful, commit the last changes and tag
 ## the release in the repository.  We don't use RCS keywords so it's OK
 ## to distribute the files before they were committed.
-       cd $(srcdir) && clcommit && \
-         git tag -s `echo "Release-$(VERSION)" | sed 's/\./-/g'`
+       cd $(srcdir) && git commit -a -s && \
+          git tag -s "v$(VERSION)" -m "Release $(VERSION)"
 
 git-release: git-dist
        case $(VERSION) in \
@@ -359,25 +463,15 @@ git-release: git-dist
          *)      dest=ftp;; \
        esac; \
        $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
-         --to sources.redhat.com:~ftp/pub/automake \
          --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
 
-cvs-diff:
-       thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
-       if test -z "$$OLDVERSION"; then \
-         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-       else prevno="$$OLDVERSION"; fi; \
-       prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-       cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
-           > $(PACKAGE)-$$prevno-$(VERSION).diff
-
 git-diff:
-       thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
+       thisver="v$(VERSION)"; \
        if test -z "$$OLDVERSION"; then \
          prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
        else prevno="$$OLDVERSION"; fi; \
-       prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-       git diff $$prevver $$thisver $(PACKAGE) \
+       prevver=v$$prevno; \
+       git diff $$prevver..$$thisver $(PACKAGE) \
            > $(PACKAGE)-$$prevno-$(VERSION).diff
 
 ## Check our path lengths.
@@ -434,3 +528,32 @@ fetch:
        test $$stat = 0 || \
          echo "See Fetchdir/update.patch for a log of the changes."; \
        exit $$stat
+
+## Generate release statistics, for the table in automake.texi.
+## This has to be run in an up to date build tree, but there must
+## be no temp files nor unused other files lying around!
+release-stats: ps
+       @am=`wc -l < automake` && \
+       acl=`wc -l < aclocal` && \
+       pmfiles="lib/Automake/*.pm" && \
+       if test . != '$(srcdir)'; then pmfiles="$$pmfiles 
$(srcdir)/lib/Automake/*.pm"; \
+       else :; fi && \
+       pm=`cat $$pmfiles | wc -l` && \
+       dot_am_files=`ls -1 $(srcdir)/lib/am/*.am | grep -v Makefile.am` && \
+       amf=`echo "$$dot_am_files" | wc -l` && \
+       aml=`cat $$dot_am_files | wc -l` && \
+       m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
+       m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
+       doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+       rm -f doc/unused.ps && \
+       doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) 
pages.*/\1/p'` && \
+       tests="tests/*.test"; \
+       if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
+       else :; fi && \
+       t=`ls -1 $$tests | wc -l` && \
+       tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+       today=`date +%Y-%m-%d` && \
+       echo "add this to the table in doc/automake.texi after verification:" 
&& \
+       printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
+                     $$today $(VERSION) $$am    $$acl    $$pm   $$aml 
"($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
+.PHONY: release-stats
diff --git a/Makefile.in b/Makefile.in
index c2f4870..34193e8 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -86,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)
@@ -161,6 +165,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -171,6 +176,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -231,11 +237,51 @@ do_subst = sed \
   -e 's,address@hidden@],$(PACKAGE),g' \
   -e 's,address@hidden@],$(PATH_SEPARATOR),g' \
   -e 's,address@hidden@],$(PERL),g' \
+  -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -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='
@@ -259,15 +305,15 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu '; \
-             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu  \
+             echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \
+             $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \
                && exit 0; \
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  Makefile
+         $(AUTOMAKE) --gnu Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -290,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; \
@@ -315,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; \
@@ -475,27 +521,37 @@ 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" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: distdir)"; \
            ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
@@ -530,6 +586,10 @@ dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
        $(am__remove_distdir)
 
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
        $(am__remove_distdir)
@@ -559,6 +619,8 @@ distcheck: dist
          bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
@@ -570,6 +632,7 @@ distcheck: dist
        mkdir $(distdir)/_build
        mkdir $(distdir)/_inst
        chmod a-w $(distdir)
+       test -d $(distdir)/_build || exit 0; \
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
          && $(am__cd) $(distdir)/_build \
@@ -666,6 +729,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -674,19 +739,29 @@ install-data-am:
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am: install-binSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) install-exec-hook
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -710,24 +785,26 @@ ps-am:
 uninstall-am: uninstall-binSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-exec-am install-strip uninstall-am
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-exec-am install-strip tags-recursive \
+       uninstall-am
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am am--refresh check check-am clean clean-generic \
        ctags ctags-recursive dist dist-all dist-bzip2 dist-gzip \
-       dist-hook dist-lzma dist-shar dist-tarZ dist-zip distcheck \
-       distclean distclean-generic distclean-tags distcleancheck \
-       distdir distuninstallcheck dvi dvi-am html html-am info \
-       info-am install install-am install-binSCRIPTS install-data \
-       install-data-am install-dvi install-dvi-am install-exec \
-       install-exec-am install-exec-hook 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 installdirs-am \
-       maintainer-clean maintainer-clean-generic mostlyclean \
-       mostlyclean-generic pdf pdf-am ps ps-am tags tags-recursive \
-       uninstall uninstall-am uninstall-binSCRIPTS uninstall-hook
+       dist-hook dist-lzma dist-shar dist-tarZ dist-xz dist-zip \
+       distcheck distclean distclean-generic distclean-tags \
+       distcleancheck distdir distuninstallcheck dvi dvi-am html \
+       html-am info info-am install install-am install-binSCRIPTS \
+       install-data install-data-am install-dvi install-dvi-am \
+       install-exec install-exec-am install-exec-hook 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 \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am uninstall-binSCRIPTS \
+       uninstall-hook
 
 
 install-exec-hook:
@@ -765,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 ' | \
@@ -826,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 \
@@ -879,30 +1000,41 @@ 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; \
          exit 1; \
        fi
-       @if grep -v SHELL $(srcdir)/tests/*.test | grep '\$$MAKE .*=' ; then \
+       @if sed 's/DESTDIR=[^ ]*//; s/SHELL=[^ ]*//; s/V=[^ ]*//' 
$(srcdir)/tests/*.test | \
+           grep '\$$MAKE .*=' ; then \
          echo 'Rewrite "$$MAKE foo=bar" as "foo=bar $$MAKE -e" in the above 
lines,' 1>&2; \
          echo 'it is more portable.' 1>&2; \
          exit 1; \
@@ -912,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; \
@@ -924,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; \
@@ -936,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; \
@@ -952,17 +1098,13 @@ maintainer-check: automake aclocal
        fi
 
 git-dist: maintainer-check
-       @if (clcommit --version)>/dev/null 2>/dev/null; then :; else \
-         echo "Get clcommit from module cvs-utils on Savannah."; \
-         exit 1; \
-       fi
        @if sed 1q $(srcdir)/NEWS | grep -e "$(VERSION)" > /dev/null; then :; 
else \
          echo "NEWS not updated; not releasing" 1>&2; \
          exit 1;                               \
        fi
-       $(MAKE) distcheck
-       cd $(srcdir) && clcommit && \
-         git tag -s `echo "Release-$(VERSION)" | sed 's/\./-/g'`
+       $(MAKE) $(AM_MAKEFLAGS) distcheck
+       cd $(srcdir) && git commit -a -s && \
+          git tag -s "v$(VERSION)" -m "Release $(VERSION)"
 
 git-release: git-dist
        case $(VERSION) in \
@@ -970,25 +1112,15 @@ git-release: git-dist
          *)      dest=ftp;; \
        esac; \
        $(srcdir)/lib/gnupload $(GNUPLOADFLAGS) \
-         --to sources.redhat.com:~ftp/pub/automake \
          --to $$dest.gnu.org:automake $(DIST_ARCHIVES)
 
-cvs-diff:
-       thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
-       if test -z "$$OLDVERSION"; then \
-         prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
-       else prevno="$$OLDVERSION"; fi; \
-       prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-       cvs -f rdiff -c -r $$prevver -r $$thisver $(PACKAGE) \
-           > $(PACKAGE)-$$prevno-$(VERSION).diff
-
 git-diff:
-       thisver=`echo "Release-$(VERSION)" | sed 's/\./-/g'`; \
+       thisver="v$(VERSION)"; \
        if test -z "$$OLDVERSION"; then \
          prevno=`echo "$(VERSION)" - 0.01 | bc | sed 's/^\./0./'`; \
        else prevno="$$OLDVERSION"; fi; \
-       prevver=Release-`echo $$prevno | sed 's/\./-/g'`; \
-       git diff $$prevver $$thisver $(PACKAGE) \
+       prevver=v$$prevno; \
+       git diff $$prevver..$$thisver $(PACKAGE) \
            > $(PACKAGE)-$$prevno-$(VERSION).diff
 
 path-check: distdir
@@ -1021,6 +1153,32 @@ fetch:
          echo "See Fetchdir/update.patch for a log of the changes."; \
        exit $$stat
 
+release-stats: ps
+       @am=`wc -l < automake` && \
+       acl=`wc -l < aclocal` && \
+       pmfiles="lib/Automake/*.pm" && \
+       if test . != '$(srcdir)'; then pmfiles="$$pmfiles 
$(srcdir)/lib/Automake/*.pm"; \
+       else :; fi && \
+       pm=`cat $$pmfiles | wc -l` && \
+       dot_am_files=`ls -1 $(srcdir)/lib/am/*.am | grep -v Makefile.am` && \
+       amf=`echo "$$dot_am_files" | wc -l` && \
+       aml=`cat $$dot_am_files | wc -l` && \
+       m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
+       m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
+       doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+       rm -f doc/unused.ps && \
+       doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) 
pages.*/\1/p'` && \
+       tests="tests/*.test"; \
+       if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
+       else :; fi && \
+       t=`ls -1 $$tests | wc -l` && \
+       tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+       today=`date +%Y-%m-%d` && \
+       echo "add this to the table in doc/automake.texi after verification:" 
&& \
+       printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s 
@tab %4d %-4s @tab %3d @tab %d %-4s\n' \
+                     $$today $(VERSION) $$am    $$acl    $$pm   $$aml 
"($$amf)" $$m4l "($$m4f)" $$doc $$t "($$tgen)"
+.PHONY: release-stats
+
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
 .NOEXPORT:
diff --git a/NEWS b/NEWS
index 7142c4a..b97dafe 100644
--- a/NEWS
+++ b/NEWS
@@ -1,4 +1,26 @@
-New in 1.10a:
+New in 1.10c:
+
+* Languages changes:
+
+  - There is initial support for the Vala programming language, when using
+    Vala 0.7.0 or later.
+
+* Miscellaneous Changes:
+
+  - In 1.10b, the `parallel-tests' driver introduced per-extension test
+    driver variables `<EXT>_LOG_COMPILER', defined as
+
+      $(<EXT>_LOG_COMPILE) $(AM_<EXT>_LOG_FLAGS) $(<EXT>_LOG_FLAGS)
+
+    for extensions `.ext' registered in `TEST_EXTENSIONS'.  Now, for tests
+    without a known extension, add `LOG_COMPILER', defined as
+
+      $(LOG_COMPILE) $(AM_LOG_FLAGS) $(LOG_FLAGS)
+
+    to the rules.
+
+
+New in 1.10b:
 
 * Version requirements:
 
@@ -10,11 +32,22 @@ New in 1.10a:
     (and new in Automake 1.10) is degraded to a warning.  This helps
     in the common case where the Autoconf versions used are compatible.
 
-* Change to Libtool support:
+* Changes to automake:
+
+  - The automake program can run multiple threads for creating most
+    Makefile.in files concurrently, if at least Perl 5.7.2 is available
+    with interpreter-based threads enabled.  Set the environment variable
+    AUTOMAKE_JOBS to the maximum number of threads to use, in order to
+    enable this experimental feature.
+
+* Changes to Libtool support:
 
   - Libtool generic flags are now passed to the install and uninstall
     modes as well.
 
+  - distcheck works with Libtool 2.x even when LT_OUTPUT is used, as
+    config.lt is removed correctly now.
+
 * Languages changes:
 
   - subdir-object mode works now with Fortran (F77, FC, preprocessed
@@ -25,7 +58,11 @@ New in 1.10a:
 
   - Files with extension .sx are also treated as preprocessed assembler.
 
-  - Vala source files are recognized now.
+  - Python 3.0 is supported now, Python releases prior to 2.0 are no
+    longer supported.
+
+  - The default source file extension (.c) can be overridden with
+    AM_DEFAULT_SOURCE_EXT now.
 
 * Miscellaneous changes:
 
@@ -38,20 +75,28 @@ New in 1.10a:
       cvs -d :pserver:address@hidden:/automake.git \
           checkout -d automake HEAD
 
-  - "make dist" can now create lzma-compressed tarballs.
+  - "make dist" can now create xz-compressed tarballs,
+    as well as (deprecated?) lzma-compressed tarballs.
 
   - Automake is licensed under GPLv3+.  `automake --add-missing' will
     by default install the GPLv3 file as COPYING if it is missing.
-    Note that Automake will never overwrite an existing COPYING file,
-    even when the `--force-missing' option is used.
+    It will also warn that the license file should be added to source
+    control.  Note that Automake will never overwrite an existing COPYING
+    file, even when the `--force-missing' option is used.
+
+  - The manual is now distributed under the terms of the GNU FDL 1.3.
 
-  - Automake ships and install man pages for automake and aclocal now.
+  - Automake ships and installs man pages for automake and aclocal now.
 
   - New shorthand `$(pkglibexecdir)' for `$(libexecdir)/@PACKAGE@'.
 
   - install-sh supports -C, which does not update the installed file
     (and its time stamps) if the contents did not change.
 
+  - The `gnupload' script has been revamped.
+
+  - The `depcomp' and `compile' scripts now work with MSVC under MSYS.
+
   - The targets `install' and `uninstall' are more efficient now, in that
     for example multiple files from one Automake variable such as
     `bin_SCRIPTS' are copied in one `install' (or `libtool --mode=install')
@@ -60,8 +105,12 @@ 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.
 
-    For builtin rules, `make install' now fails reliably if installation
-    of a file failed.
+    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.
 
     These changes may need some adjustments from users:  For example,
     some `install' programs refuse to install multiple copies of the
@@ -89,6 +138,19 @@ 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, 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
+    of recursive variable expansion, so do not use it if your package needs
+    to build with `make' implementations that do not support it.
+    Besides the normal option setting methods, it can also be enabled
+    globally by the new automake option `--silent-rules'.
+
   - New prefix `notrans_' for manpages which should not be transformed
     by --program-transform.
 
@@ -102,7 +164,21 @@ New in 1.10a:
   - AM_MAINTAINER_MODE now allows for an optional argument specifying
     the default setting.
 
-Bugs fixed in 1.10a:
+  - AM_SUBST_NOTMAKE may prevent substitution of AC_SUBSTed variables,
+    useful especially for multi-line values.
+
+  - Automake's early configure-time sanity check now diagnoses an
+    unsafe absolute source directory name and makes configure fail.
+
+  - The Automake macros and rules cope better with whitespace in the
+    current directory name, as long as the relative path to `configure'
+    does not contain whitespace.  To this end, the values of `$(MISSING)'
+    and `$(install_sh)' may contain suitable quoting, and their expansion
+    might need `eval'uation if used outside of a makefile.  These
+    undocumented variables may be used in several documented macros such
+    as $(AUTOCONF) or $(MAKEINFO).
+
+Bugs fixed in 1.10b:
 
 * Long standing bugs:
 
@@ -114,6 +190,40 @@ Bugs fixed in 1.10a:
   - For nobase_*_LTLIBRARIES with nonempty directory components, the
     correct `-rpath' argument is used now.
 
+  - `config.status --file=Makefile depfiles' now also works with the
+    extra quoting used internally by Autoconf 2.62 and newer
+    (it used to work only without the `--file=' bit).
+
+  - The `missing' script works better with versioned tool names.
+
+  - Semantics for `missing help2man' have been revamped:
+
+    Previously, if `help2man' was not present, `missing help2man' would have
+    the following semantics: if some man page was out of date but present, then
+    a warning would be printed, but the exit status was 0.  If the man page was
+    not present at all, then `missing' would create a replacement man page
+    containing an error message, and exit with a status of 2.  This does not 
play
+    well with `make': the next run will see this particular man page as being 
up
+    to date, and will only error out on the next generated man page, if any;
+    repeat until all pages are done.  This was not desirable.
+
+    These are the new semantics: if some man page is not present, and help2man
+    is not either, then `missing' will warn and generate the replacement page
+    containing the error message, but exit successfully.  However, `make dist'
+    will ensure that no such bogus man pages are packaged into a tarball.
+
+  - Targets provided by automake behave better with `make -n', in that they
+    take care not to create files.
+
+  - `config.status Makefile... depfiles' works fine again in the presence of
+    disabled dependency tracking.
+
+  - 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/README b/README
index bb42a7f..0e23237 100644
--- a/README
+++ b/README
@@ -24,13 +24,7 @@ Automake has a test suite.  Use
        make check
 
 to run it.  Capture its output in case of failing tests.  For more
-information, you can influence testing with the variables VERBOSE,
-MAKE, TESTS, keep_testdirs.  So for example, to run tests/check.test
-verbosely using gmake and to inspect the test directory afterwards,
-enter the tests directory and use
-
-       env VERBOSE=yes TESTS=check.test keep_testdirs=yes MAKE=gmake \
-         gmake -e check
+information, please see the file tests/README.
 
 Automake has a page on the web.  See:
 
diff --git a/THANKS b/THANKS
index 18a1ece..6235436 100644
--- a/THANKS
+++ b/THANKS
@@ -15,6 +15,7 @@ Alexander Turbov      address@hidden
 Alexandre Duret-Lutz   address@hidden
 Alexey Mahotkin                address@hidden
 Alfred M. Szmidt       address@hidden
+Andreas Bergmeier      address@hidden
 Andreas Buening                address@hidden
 Andreas Köhler                address@hidden
 Andreas Schwab         address@hidden
@@ -43,6 +44,7 @@ Bob Rossi             address@hidden
 Bobby Jack             address@hidden
 Braden N. McDaniel     address@hidden
 Brendan O'Dea          address@hidden
+Brian Cameron          address@hidden
 Brian Ford             address@hidden
 Brian Gough            address@hidden
 Brian Jones            address@hidden
@@ -50,6 +52,8 @@ Bruce Korb            address@hidden
 Bruno Haible           address@hidden
 Carsten Lohrke         address@hidden
 Charles Wilson         address@hidden
+Chris Hoogendyk                address@hidden
+Chris Pickett          address@hidden
 Chris Provenzano       address@hidden
 Christian Cornelssen   address@hidden
 Claudio Fontana                address@hidden
@@ -57,6 +61,7 @@ Clifford Wolf         address@hidden
 Dalibor Topic          address@hidden
 danbp                  address@hidden
 Daniel Jacobowitz      address@hidden
+Daniel Kahn Gillmor    address@hidden
 Dave Brolley           address@hidden
 Dave Morrison          address@hidden
 David A. Swierczek     address@hidden
@@ -124,6 +129,7 @@ James Amundson              address@hidden
 James Henstridge       address@hidden
 James R. Van Zandt     address@hidden
 James Youngman         address@hidden
+Jan Engelhardt         address@hidden
 Janos Farkas           address@hidden
 Jared Davis            address@hidden
 Jason Duell            address@hidden
@@ -139,14 +145,17 @@ Jerome Lovy               address@hidden
 Jerome Santini         address@hidden
 Jesse Chisholm         address@hidden
 Jim Meyering           address@hidden
+Joakim Tjernlund       address@hidden
 Jochen Kuepper         address@hidden
 Joel N. Weber II       address@hidden
 Joerg-Martin Schwarz   address@hidden
+Johan Dahlin           address@hidden
 Johan Danielsson       address@hidden
 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
@@ -155,6 +164,7 @@ Juergen A. Erhard   address@hidden
 Juergen Keil           address@hidden
 Juergen Leising                address@hidden
 Julien Sopena          address@hidden
+Jürg Billeter         address@hidden
 Karl Berry             address@hidden
 Karl Heuer             address@hidden
 Kelley Cook            address@hidden
@@ -186,12 +196,14 @@ Mark Galassi              address@hidden
 Mark Mitchell          address@hidden
 Mark Phillips          address@hidden
 Markku Rossi           address@hidden
+Markus Duft            address@hidden
 Markus F.X.J. Oberhumer        address@hidden
 Martin Bravenboer      address@hidden
 Martin Frydl           address@hidden
 Martin Waitz           address@hidden
 Mathias Doreille       address@hidden
 Mathias Froehlich      address@hidden
+Mathias Hasselmann     address@hidden
 Matt Leach             address@hidden
 Matthew D. Langston    address@hidden
 Matthias Andree                address@hidden
@@ -199,6 +211,7 @@ Matthias Clasen             address@hidden
 Maxim Sinev            address@hidden
 Merijn de Jonge                address@hidden
 Michael Brantley       address@hidden
+Michael Ploujnikov     address@hidden
 Michel de Ruiter       address@hidden
 Mike Castle            address@hidden
 Mike Frysinger         address@hidden
@@ -246,6 +259,7 @@ Peter Gavin         address@hidden
 Peter Mattis           address@hidden
 Peter Muir             address@hidden
 Peter O'Gorman         address@hidden
+Peter Rosin            address@hidden
 Peter Seiderer         address@hidden
 Petter Reinholdtsen    address@hidden
 Phil Edwards           address@hidden
@@ -279,9 +293,11 @@ Rusty Ballinger            address@hidden
 Ryan T. Sammartino     address@hidden
 Sam Hocevar            address@hidden
 Sam Sirlin             address@hidden
+Sam Steingold          address@hidden
 Sander Niemeijer       address@hidden
 Santiago Vila          address@hidden
 Scott James Remnant    address@hidden
+Sergey Poznyakoff      address@hidden
 Sergey Vlasov          address@hidden
 Seth Alves             address@hidden
 Shannon L. Brown       address@hidden
@@ -308,6 +324,7 @@ Thomas Tanner               address@hidden
 Toralf Förster                address@hidden
 Tim Goodwin            address@hidden
 Tim Mooney             address@hidden
+Tim Rice               address@hidden
 Tim Van Holder         address@hidden
 Toshio Kuratomi                address@hidden
 Tom Epperly            address@hidden
@@ -319,11 +336,13 @@ Vincent Lefevre           address@hidden
 Volker Boerchers       address@hidden
 Werner John            address@hidden
 Werner Koch            address@hidden
+Werner Lemberg         address@hidden
 William Pursell                address@hidden
 William S Fulton       address@hidden
 Yann Droneaud          address@hidden
 Younes Younes          address@hidden
 Zack Weinberg          address@hidden
+Zoltan Rado            address@hidden
 
 ;; Local Variables:
 ;; mode: text
diff --git a/aclocal.in b/aclocal.in
index 44d3d1e..cc52528 100644
--- a/aclocal.in
+++ b/aclocal.in
@@ -8,7 +8,7 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
 # aclocal - create aclocal.m4 by scanning configure.ac
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 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
@@ -47,6 +47,9 @@ use Cwd;
 
 # Some globals.
 
+# We do not operate in threaded mode.
+$perl_threads = 0;
+
 # Include paths for searching macros.  We search macros in this order:
 # user-supplied directories first, then the directory containing the
 # automake macros, and finally the system-wide directories for
@@ -815,7 +818,7 @@ $output";
   $output = "# generated automatically by aclocal $VERSION -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -904,7 +907,7 @@ sub version()
 {
   print <<EOF;
 aclocal (GNU $PACKAGE) $VERSION
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
diff --git a/aclocal.m4 b/aclocal.m4
index b275e43..d085be5 100644
--- a/aclocal.m4
+++ b/aclocal.m4
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10a -*- Autoconf -*-
+# generated automatically by aclocal 1.10c -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
diff --git a/automake.in b/automake.in
index a014bd0..67e51a4 100755
--- a/automake.in
+++ b/automake.in
@@ -7,7 +7,8 @@ eval 'case $# in 0) exec @PERL@ -S "$0";; *) exec @PERL@ -S 
"$0" "$@";; esac'
 
 # 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
@@ -87,6 +88,9 @@ struct (# Short name of the language (c, f77...).
        # Content of the linking variable.
        'link' => "\$",
 
+       # Name of the compiler variable (CC).
+       'ccer' => "\$",
+
        # Name of the linker variable (LD).
        'lder' => "\$",
        # Content of the linker variable ($(CC)).
@@ -128,6 +132,16 @@ package Automake;
 
 use strict;
 use Automake::Config;
+BEGIN
+{
+  if ($perl_threads)
+    {
+      require threads;
+      import threads;
+      require Thread::Queue;
+      import Thread::Queue;
+    }
+}
 use Automake::General;
 use Automake::XFile;
 use Automake::Channels;
@@ -244,7 +258,8 @@ my %standard_prefix =
 # Copyright on generated Makefile.ins.
 my $gen_copyright = "\
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -271,6 +286,12 @@ use constant COMPILE_ORDINARY => 2;
 # We can't always associate a location to a variable or a rule,
 # when it's defined by Automake.  We use INTERNAL in this case.
 use constant INTERNAL => new Automake::Location;
+
+# Serialization keys for message queues.
+use constant QUEUE_MESSAGE   => "msg";
+use constant QUEUE_CONF_FILE => "conf file";
+use constant QUEUE_LOCATION  => "location";
+use constant QUEUE_STRING    => "string";
 
 
 ## ---------------------------------- ##
@@ -438,19 +459,25 @@ my %required_targets =
    # FIXME: Not required, temporary hacks.
    # Well, actually they are sort of required: the -recursive
    # targets will run them anyway...
+   'html-am'         => 1,
    'dvi-am'          => 1,
    'pdf-am'          => 1,
    'ps-am'           => 1,
    'info-am'         => 1,
    'install-data-am' => 1,
    'install-exec-am' => 1,
+   'install-html-am' => 1,
+   'install-dvi-am'  => 1,
+   'install-pdf-am'  => 1,
+   'install-ps-am'   => 1,
+   'install-info-am' => 1,
    'installcheck-am' => 1,
    'uninstall-am' => 1,
 
    'install-man' => 1,
   );
 
-# Set to 1 if this run will create the Makefile.in that distribute
+# Set to 1 if this run will create the Makefile.in that distributes
 # the files in config_aux_dir.
 my $automake_will_process_aux_dir = 0;
 
@@ -479,13 +506,13 @@ my $topsrcdir;
 # configure's dependencies).
 my $output_deps_greatest_timestamp;
 
-# These two variables are used when generating each Makefile.in.
+# These variables are used when generating each Makefile.in.
 # They hold the Makefile.in until it is ready to be printed.
-my $output_rules;
 my $output_vars;
-my $output_trailer;
 my $output_all;
 my $output_header;
+my $output_rules;
+my $output_trailer;
 
 # This is the conditional stack, updated on if/else/endif, and
 # used to build Condition objects.
@@ -543,7 +570,7 @@ my %dep_files;
 my @dist_targets;
 
 # Keep track of all programs declared in this Makefile, without
-# $(EXEEXT).  @substitution@ are not listed.
+# $(EXEEXT).  @substitutions@ are not listed.
 my %known_programs;
 my %known_libraries;
 
@@ -553,9 +580,6 @@ my %known_libraries;
 # trailing `/'.
 my %de_ansi_files;
 
-# This is the name of the redirect `all' target to use.
-my $all_target;
-
 # This keeps track of which extensions we've seen (that we care
 # about).
 my %extension_seen;
@@ -585,6 +609,13 @@ my $get_object_extension_was_run;
 
 # Record each file processed by make_paragraphs.
 my %transformed_files;
+
+
+################################################################
+
+## ---------------------------------------------- ##
+## Variables not reset by &initialize_per_input.  ##
+## ---------------------------------------------- ##
 
 # Cache each file processed by make_paragraphs.
 # (This is different from %transformed_files because
@@ -626,19 +657,20 @@ sub initialize_per_input ()
 {
     reset_local_duplicates ();
 
-    $am_file_name = '';
-    $am_relative_dir = '';
+    $am_file_name = undef;
+    $am_relative_dir = undef;
 
-    $in_file_name = '';
-    $relative_dir = '';
+    $in_file_name = undef;
+    $relative_dir = undef;
+    $topsrcdir = undef;
 
     $output_deps_greatest_timestamp = 0;
 
-    $output_rules = '';
     $output_vars = '';
-    $output_trailer = '';
     $output_all = '';
     $output_header = '';
+    $output_rules = '';
+    $output_trailer = '';
 
     Automake::Options::reset;
     Automake::Variable::reset;
@@ -653,6 +685,10 @@ sub initialize_per_input ()
     @check_tests = ();
 
     %clean_files = ();
+    %compile_clean_files = ();
+
+    # We always include `.'.  This isn't strictly correct.
+    %libtool_clean_directories = ('.' => 1);
 
     @sources = ();
     @dist_sources = ();
@@ -671,8 +707,6 @@ sub initialize_per_input ()
 
     %de_ansi_files = ();
 
-    $all_target = '';
-
     %extension_seen = ();
 
     %language_scratch = ();
@@ -685,11 +719,6 @@ sub initialize_per_input ()
 
     $get_object_extension_was_run = 0;
 
-    %compile_clean_files = ();
-
-    # We always include `.'.  This isn't strictly correct.
-    %libtool_clean_directories = ('.' => 1);
-
     %transformed_files = ();
 }
 
@@ -705,6 +734,7 @@ register_language ('name' => 'c',
                   'ansi' => 1,
                   'autodep' => '',
                   'flags' => ['CFLAGS', 'CPPFLAGS'],
+                  'ccer' => 'CC',
                   'compiler' => 'COMPILE',
                   'compile' => '$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS)',
                   'lder' => 'CCLD',
@@ -725,6 +755,7 @@ register_language ('name' => 'cxx',
                   'autodep' => 'CXX',
                   'flags' => ['CXXFLAGS', 'CPPFLAGS'],
                   'compile' => '$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS)',
+                  'ccer' => 'CXX',
                   'compiler' => 'CXXCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -743,6 +774,7 @@ register_language ('name' => 'objc',
                   'autodep' => 'OBJC',
                   'flags' => ['OBJCFLAGS', 'CPPFLAGS'],
                   'compile' => '$(OBJC) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_OBJCFLAGS) $(OBJCFLAGS)',
+                  'ccer' => 'OBJC',
                   'compiler' => 'OBJCCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -760,6 +792,7 @@ register_language ('name' => 'upc',
                   'autodep' => 'UPC',
                   'flags' => ['UPCFLAGS', 'CPPFLAGS'],
                   'compile' => '$(UPC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_UPCFLAGS) $(UPCFLAGS)',
+                  'ccer' => 'UPC',
                   'compiler' => 'UPCCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -784,11 +817,11 @@ register_language ('name' => 'vala',
                   'config_vars' => ['VALAC'],
                   'flags' => ['VALAFLAGS'],
                   'compile' => '$(VALAC) $(AM_VALAFLAGS) $(VALAFLAGS)',
+                  'ccer' => 'VALAC',
                   'compiler' => 'VALACOMPILE',
                   'extensions' => ['.vala'],
-                  'output_extensions' => sub { (my $ext1 = $_[0]) =~ 
s/vala$/c/;
-                                               (my $ext2 = $_[0]) =~ 
s/vala$/h/;
-                                               return ($ext1, $ext2) },
+                  'output_extensions' => sub { (my $ext = $_[0]) =~ s/vala$/c/;
+                                               return ($ext,) },
                   'rule_file' => 'vala',
                   '_finish' => \&lang_vala_finish,
                   '_target_hook' => \&lang_vala_target_hook,
@@ -800,6 +833,7 @@ register_language ('name' => 'yacc',
                   'config_vars' => ['YACC'],
                   'flags' => ['YFLAGS'],
                   'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
+                  'ccer' => 'YACC',
                   'compiler' => 'YACCCOMPILE',
                   'extensions' => ['.y'],
                   'output_extensions' => sub { (my $ext = $_[0]) =~ tr/y/c/;
@@ -813,6 +847,7 @@ register_language ('name' => 'yaccxx',
                   'config_vars' => ['YACC'],
                   'rule_file' => 'yacc',
                   'flags' => ['YFLAGS'],
+                  'ccer' => 'YACC',
                   'compiler' => 'YACCCOMPILE',
                   'compile' => '$(YACC) $(YFLAGS) $(AM_YFLAGS)',
                   'extensions' => ['.y++', '.yy', '.yxx', '.ypp'],
@@ -829,6 +864,7 @@ register_language ('name' => 'lex',
                   'rule_file' => 'lex',
                   'flags' => ['LFLAGS'],
                   'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
+                  'ccer' => 'LEX',
                   'compiler' => 'LEXCOMPILE',
                   'extensions' => ['.l'],
                   'output_extensions' => sub { (my $ext = $_[0]) =~ tr/l/c/;
@@ -842,6 +878,7 @@ register_language ('name' => 'lexxx',
                   'rule_file' => 'lex',
                   'flags' => ['LFLAGS'],
                   'compile' => '$(LEX) $(LFLAGS) $(AM_LFLAGS)',
+                  'ccer' => 'LEX',
                   'compiler' => 'LEXCOMPILE',
                   'extensions' => ['.l++', '.ll', '.lxx', '.lpp'],
                   'output_extensions' => sub { (my $ext = $_[0]) =~ tr/l/c/;
@@ -860,6 +897,7 @@ register_language ('name' => 'asm',
                   # or anything else required.  They can also set CCAS.
                   # Or simply use Preprocessed Assembler.
                   'compile' => '$(CCAS) $(AM_CCASFLAGS) $(CCASFLAGS)',
+                  'ccer' => 'CCAS',
                   'compiler' => 'CCASCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -876,6 +914,7 @@ register_language ('name' => 'cppasm',
                   'autodep' => 'CCAS',
                   'flags' => ['CCASFLAGS', 'CPPFLAGS'],
                   'compile' => '$(CCAS) $(DEFS) $(DEFAULT_INCLUDES) 
$(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS)',
+                  'ccer' => 'CPPAS',
                   'compiler' => 'CPPASCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -892,6 +931,7 @@ register_language ('name' => 'f77',
                   'link' => '$(F77LD) $(AM_FFLAGS) $(FFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS) -o $@',
                   'flags' => ['FFLAGS'],
                   'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS)',
+                  'ccer' => 'F77',
                   'compiler' => 'F77COMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -909,9 +949,11 @@ register_language ('name' => 'fc',
                   'link' => '$(FCLD) $(AM_FCFLAGS) $(FCFLAGS) $(AM_LDFLAGS) 
$(LDFLAGS) -o $@',
                   'flags' => ['FCFLAGS'],
                   'compile' => '$(FC) $(AM_FCFLAGS) $(FCFLAGS)',
+                  'ccer' => 'FC',
                   'compiler' => 'FCCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
+                  'libtool_tag' => 'FC',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'pure' => 1,
@@ -926,6 +968,7 @@ register_language ('name' => 'ppfc',
                   'lder' => 'FCLD',
                   'ld' => '$(FC)',
                   'flags' => ['FCFLAGS', 'CPPFLAGS'],
+                  'ccer' => 'PPFC',
                   'compiler' => 'PPFCCOMPILE',
                   'compile' => '$(FC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FCFLAGS) $(FCFLAGS)',
                   'compile_flag' => '-c',
@@ -957,6 +1000,7 @@ register_language ('name' => 'ppf77',
                   'lder' => 'F77LD',
                   'ld' => '$(F77)',
                   'flags' => ['FFLAGS', 'CPPFLAGS'],
+                  'ccer' => 'PPF77',
                   'compiler' => 'PPF77COMPILE',
                   'compile' => '$(F77) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) 
$(AM_CPPFLAGS) $(CPPFLAGS) $(AM_FFLAGS) $(FFLAGS)',
                   'compile_flag' => '-c',
@@ -976,6 +1020,7 @@ register_language ('name' => 'ratfor',
                   'flags' => ['RFLAGS', 'FFLAGS'],
                   # FIXME also FFLAGS.
                   'compile' => '$(F77) $(AM_FFLAGS) $(FFLAGS) $(AM_RFLAGS) 
$(RFLAGS)',
+                  'ccer' => 'F77',
                   'compiler' => 'RCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -992,6 +1037,7 @@ register_language ('name' => 'java',
                   'autodep' => 'GCJ',
                   'flags' => ['GCJFLAGS'],
                   'compile' => '$(GCJ) $(AM_GCJFLAGS) $(GCJFLAGS)',
+                  'ccer' => 'GCJ',
                   'compiler' => 'GCJCOMPILE',
                   'compile_flag' => '-c',
                   'output_flag' => '-o',
@@ -1071,7 +1117,8 @@ sub backname ($)
        next if $_ eq '.' || $_ eq '';
        if ($_ eq '..')
        {
-           pop @res;
+           pop @res
+             or prog_error ("trying to reverse path `$file' pointing outside 
tree");
        }
        else
        {
@@ -1083,6 +1130,89 @@ sub backname ($)
 
 ################################################################
 
+# `silent-rules' mode handling functions.
+
+# verbose_var (NAME)
+# ------------------
+# The public variable stem used to implement `silent-rules'.
+sub verbose_var ($)
+{
+    my ($name) = @_;
+    return 'AM_V_' . $name;
+}
+
+# verbose_private_var (NAME)
+# --------------------------
+# The naming policy for the private variables for `silent-rules'.
+sub verbose_private_var ($)
+{
+    my ($name) = @_;
+    return 'am__v_' . $name;
+}
+
+# define_verbose_var (NAME, VAL)
+# ------------------------------
+# For `silent-rules' mode, setup VAR and dispatcher, to expand to VAL if 
silent.
+sub define_verbose_var ($$)
+{
+    my ($name, $val) = @_;
+    my $var = verbose_var ($name);
+    my $pvar = verbose_private_var ($name);
+    if (option 'silent-rules')
+      {
+       # Using `$V' instead of `$(V)' breaks IRIX make.
+       define_variable ($var, '$(' . $pvar . '_$(V))', INTERNAL);
+       define_variable ($pvar . '_', $val, INTERNAL);
+       define_variable ($pvar . '_0', $val, INTERNAL);
+      }
+}
+
+# Above should not be needed in the general automake code.
+
+# verbose_flag (NAME)
+# -------------------
+# Contents of %VERBOSE%: variable to expand before rule command.
+sub verbose_flag ($)
+{
+    my ($name) = @_;
+    return '$(' . verbose_var ($name) . ')'
+      if (option 'silent-rules');
+    return '';
+}
+
+# silent_flag
+# -----------
+# Contents of %SILENT%: variable to expand to `@' when silent.
+sub silent_flag ()
+{
+    return verbose_flag ('at');
+}
+
+# define_verbose_tagvar (NAME)
+# ----------------------------
+# Engage the needed `silent-rules' machinery for tag NAME.
+sub define_verbose_tagvar ($)
+{
+    my ($name) = @_;
+    if (option 'silent-rules')
+      {
+       define_verbose_var ($name, '@echo "  '. $name . ' ' x (6 - length 
($name)) . '" $@;');
+       define_verbose_var ('at', '@');
+      }
+}
+
+# define_verbose_libtool
+# ----------------------
+# Engage the needed `silent-rules' machinery for `libtool --silent'.
+sub define_verbose_libtool ()
+{
+    define_verbose_var ('lt', '--silent');
+    return verbose_flag ('lt');
+}
+
+
+################################################################
+
 
 # Handle AUTOMAKE_OPTIONS variable.  Return 1 on error, 0 otherwise.
 sub handle_options
@@ -1103,6 +1233,10 @@ sub handle_options
        }
     }
 
+  # Override portability-recursive warning.
+  switch_warning ('no-portability-recursive')
+    if option 'silent-rules';
+
   if ($strictness == GNITS)
     {
       set_option ('readme-alpha', INTERNAL);
@@ -1242,6 +1376,9 @@ sub handle_languages
          (option 'no-dependencies' || $lang->autodep eq 'no')
          ? ('FALSE', 'FALSE') : ('AMDEP', "am__fastdep$fpfx");
 
+       my $verbose = verbose_flag ($lang->ccer || 'GEN');
+       my $silent = silent_flag ();
+
        my %transform = ('EXT'     => $ext,
                         'PFX'     => $pfx,
                         'FPFX'    => $fpfx,
@@ -1253,6 +1390,8 @@ sub handle_languages
                         SUBDIROBJ     => 0,
                         'DERIVED-EXT' => 'BUG',
                         DIST_SOURCE   => 1,
+                        VERBOSE   => $verbose,
+                        SILENT    => $silent,
                        );
 
        # Generate the appropriate rules for this extension.
@@ -1350,8 +1489,9 @@ sub handle_languages
            my $ptltflags = "${derived}_LIBTOOLFLAGS";
            $ptltflags = 'AM_LIBTOOLFLAGS' unless set_seen $ptltflags;
 
+           my $ltverbose = define_verbose_libtool ();
            my $obj_ltcompile =
-             "\$(LIBTOOL) $libtool_tag\$($ptltflags) \$(LIBTOOLFLAGS) "
+             "\$(LIBTOOL) $ltverbose $libtool_tag\$($ptltflags) 
\$(LIBTOOLFLAGS) "
              . "--mode=compile $obj_compile";
 
            # We _need_ `-o' for per object rules.
@@ -1472,6 +1612,8 @@ sub handle_languages
                             OBJOBJ    => "$obj.obj",
                             LTOBJ     => "$obj.lo",
 
+                            VERBOSE   => $verbose,
+                            SILENT    => $silent,
                             COMPILE   => $obj_compile,
                             LTCOMPILE => $obj_ltcompile,
                             -o        => $output_flag,
@@ -1530,6 +1672,9 @@ sub handle_languages
          unless defined $done{$languages{'c'}};
        define_linker_variable ($languages{'c'});
       }
+
+    # Always provide the user with `AM_V_GEN' for `silent-rules' mode.
+    define_verbose_tagvar ('GEN');
 }
 
 
@@ -2060,10 +2205,16 @@ sub handle_source_transform ($$$$%)
     if (scalar @keys == 0)
     {
        # The default source for libfoo.la is libfoo.c, but for
-       # backward compatibility we first look at libfoo_la.c
+       # backward compatibility we first look at libfoo_la.c,
+       # if no default source suffix is given.
        my $old_default_source = "$one_file.c";
-       (my $default_source = $unxformed) =~ s,(\.[^./\\]*)?$,.c,;
+       my $ext_var = var ('AM_DEFAULT_SOURCE_EXT');
+       my $default_source_ext = $ext_var ? variable_value ($ext_var) : '.c';
+       msg_var ('unsupported', $ext_var, $ext_var->name . " can assume at most 
one value")
+         if $default_source_ext =~ /[\t ]/;
+       (my $default_source = $unxformed) =~ 
s,(\.[^./\\]*)?$,$default_source_ext,;
        if ($old_default_source ne $default_source
+           && !$ext_var
            && (rule $old_default_source
                || rule '$(srcdir)/' . $old_default_source
                || rule '${srcdir}/' . $old_default_source
@@ -2497,7 +2648,8 @@ sub handle_programs
       set_seen ($xname . '_LDFLAGS');
 
       # Determine program to use for link.
-      my $xlink = &define_per_target_linker_variable ($linker, $xname);
+      my($xlink, $vlink) = &define_per_target_linker_variable ($linker, 
$xname);
+      $vlink = verbose_flag ($vlink || 'GEN');
 
       # If the resulting program lies into a subdirectory,
       # make sure this directory will exist.
@@ -2510,6 +2662,7 @@ sub handle_programs
                                       PROGRAM  => $one_file,
                                       XPROGRAM => $xname,
                                       XLINK    => $xlink,
+                                      VERBOSE  => $vlink,
                                       DIRSTAMP => $dirstamp,
                                       EXEEXT   => '$(EXEEXT)');
 
@@ -2548,6 +2701,7 @@ sub handle_libraries
 
   &define_variable ('AR', 'ar', INTERNAL);
   &define_variable ('ARFLAGS', 'cru', INTERNAL);
+  &define_verbose_tagvar ('AR');
 
   foreach my $pair (@liblist)
     {
@@ -2609,9 +2763,13 @@ sub handle_libraries
       # If the resulting library lies into a subdirectory,
       # make sure this directory will exist.
       my $dirstamp = require_build_directory_maybe ($onelib);
+      my $verbose = verbose_flag ('AR');
+      my $silent = silent_flag ();
 
       $output_rules .= &file_contents ('library',
                                       $where,
+                                      VERBOSE  => $verbose,
+                                      SILENT   => $silent,
                                       LIBRARY  => $onelib,
                                       XLIBRARY => $xlib,
                                       DIRSTAMP => $dirstamp);
@@ -2800,7 +2958,8 @@ sub handle_ltlibraries
                                             NONLIBTOOL => 0, LIBTOOL => 1);
 
       # Determine program to use for link.
-      my $xlink = &define_per_target_linker_variable ($linker, $xlib);
+      my($xlink, $vlink) = &define_per_target_linker_variable ($linker, $xlib);
+      $vlink = verbose_flag ($vlink || 'GEN');
 
       my $rpathvar = "am_${xlib}_rpath";
       my $rpath = "\$($rpathvar)";
@@ -2850,6 +3009,7 @@ sub handle_ltlibraries
                                       XLTLIBRARY => $xlib,
                                       RPATH      => $rpath,
                                       XLINK      => $xlink,
+                                      VERBOSE    => $vlink,
                                       DIRSTAMP   => $dirstamp);
       if ($seen_libobjs)
        {
@@ -2879,7 +3039,7 @@ sub check_typos ()
            {
              $varname =~ /^(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
              msg_var ('syntax', $var, "variable `$varname' is defined but no"
-                      . " program or\nlibrary has `$1' as canonic name"
+                      . " program or\nlibrary has `$1' as canonical name"
                       . " (possible typo)")
                unless $var->rdef ($cond)->seen;
            }
@@ -3560,6 +3720,7 @@ sub handle_tags
                          . "\tdone\n");
        push (@tag_deps, 'tags-recursive');
        &depend ('.PHONY', 'tags-recursive');
+       &depend ('.MAKE', 'tags-recursive');
 
        $output_rules .= ("ctags-recursive:\n"
                          . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do 
\\\n"
@@ -3570,6 +3731,7 @@ sub handle_tags
                          . "\tdone\n");
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
+       &depend ('.MAKE', 'ctags-recursive');
     }
 
     if (&saw_sources_p (1)
@@ -3718,7 +3880,7 @@ sub handle_dist ()
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma);
+       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz);
       error (option 'no-dist-gzip',
             "no-dist-gzip specified but no dist-* specified, "
             . "at least one archive format must be enabled")
@@ -3807,7 +3969,7 @@ sub handle_dist ()
 
 # check_directory ($NAME, $WHERE)
 # -------------------------------
-# Ensure $NAME is a directory, and that it uses sane name.
+# Ensure $NAME is a directory, and that it uses a sane name.
 # Use $WHERE as a location in the diagnostic, if any.
 sub check_directory ($$)
 {
@@ -4039,6 +4201,10 @@ sub handle_configure ($$$@)
   define_pretty_variable ('am__configure_deps', TRUE, INTERNAL,
                          @configuredeps);
 
+  my $automake_options = '--' . (global_option 'cygnus' ? 'cygnus' : 
$strictness_name)
+                        . (global_option 'no-dependencies' ? ' --ignore-deps' 
: '')
+                        . (global_option 'silent-rules' ? ' --silent-rules' : 
'');
+
   $output_rules .= file_contents
     ('configure',
      new Automake::Location,
@@ -4048,12 +4214,10 @@ sub handle_configure ($$$@)
      'MAKEFILE-IN'         => $rel_makefile_in,
      'MAKEFILE-IN-DEPS'    => "@include_stack",
      'MAKEFILE-AM'         => $rel_makefile_am,
-     STRICTNESS            => global_option 'cygnus'
-                               ? 'cygnus' : $strictness_name,
-     'USE-DEPS'            => global_option 'no-dependencies'
-                               ? ' --ignore-deps' : '',
+     'AUTOMAKE-OPTIONS'    => $automake_options,
      'MAKEFILE-AM-SOURCES' => "$makefile$colon_infile",
-     'REGEN-ACLOCAL-M4'    => $regen_aclocal_m4);
+     'REGEN-ACLOCAL-M4'    => $regen_aclocal_m4,
+     VERBOSE               => verbose_flag ('GEN'));
 
   if ($relative_dir eq '.')
     {
@@ -4492,6 +4656,7 @@ sub handle_all ($)
                        . '$(MAKE) $(AM_MAKEFLAGS) '
                        . (var ('SUBDIRS') ? 'all-recursive' : 'all-am')
                        . "\n\n");
+        depend ('.MAKE', 'all');
       }
     else
       {
@@ -4522,13 +4687,19 @@ sub do_check_merge_target ()
       # `all', to ensure all the primary targets are built.  Then it
       # must build the local check rules.
       $output_rules .= "check-am: all-am\n";
+      if (@check)
+        {
+         pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
+                            @check);
+         depend ('.MAKE', 'check-am');
+       }
+    }
+  if (@check_tests)
+    {
       pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-                        @check)
-       if @check;
+                        @check_tests);
+      depend ('.MAKE', 'check-am');
     }
-  pretty_print_rule ("\t\$(MAKE) \$(AM_MAKEFLAGS)", "\t  ",
-                    @check_tests)
-    if @check_tests;
 
   depend '.PHONY', 'check', 'check-am';
   # Handle recursion.  We have to honor BUILT_SOURCES like for `all:'.
@@ -4538,6 +4709,8 @@ sub do_check_merge_target ()
                       : '')
                    . (var ('SUBDIRS') ? 'check-recursive' : 'check-am')
                    . "\n");
+  depend ('.MAKE', 'check')
+    if var ('BUILT_SOURCES');
 }
 
 # handle_clean ($MAKEFILE)
@@ -4729,13 +4902,115 @@ sub handle_tests
     {
       push (@check_tests, 'check-TESTS');
       $output_rules .= &file_contents ('check', new Automake::Location,
-                                      COLOR => !! option 'color-tests');
+                                      COLOR => !! option 'color-tests',
+                                      PARALLEL_TESTS => !! option 
'parallel-tests');
 
       # Tests that are known programs should have $(EXEEXT) appended.
       # For matching purposes, we need to adjust XFAIL_TESTS as well.
       append_exeext { exists $known_programs{$_[0]} } 'TESTS';
       append_exeext { exists $known_programs{$_[0]} } 'XFAIL_TESTS'
        if (var ('XFAIL_TESTS'));
+
+      if (option 'parallel-tests')
+        {
+         define_variable ('TEST_SUITE_LOG', 'test-suite.log', INTERNAL);
+         define_variable ('TEST_SUITE_HTML', '$(TEST_SUITE_LOG:.log=.html)', 
INTERNAL);
+         my $suff = '.test';
+         my $at_exeext = '';
+         if (exists $configure_vars{'EXEEXT'})
+           {
+             $at_exeext = subst ('EXEEXT');
+             $suff = $at_exeext  . ' ' . $suff;
+           }
+         define_variable ('TEST_EXTENSIONS', $suff, INTERNAL);
+         # FIXME: this mishandles conditions.
+         my @test_suffixes = (var 'TEST_EXTENSIONS')->value_as_list_recursive;
+         if (exists $configure_vars{'EXEEXT'})
+           {
+             unshift (@test_suffixes, $at_exeext)
+               unless $test_suffixes[0] eq $at_exeext;
+           }
+         unshift (@test_suffixes, '');
+
+         transform_variable_recursively
+           ('TESTS', 'TEST_LOGS', 'am__testlogs', 1, INTERNAL,
+             sub {
+               my ($subvar, $val, $cond, $full_cond) = @_;
+               my $obj = $val;
+               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
+                     if $test_suffix eq $at_exeext || $test_suffix eq '';
+                   return substr ($obj, 0, length ($obj) - length 
($test_suffix)) . '.log'
+                     if substr ($obj, - length ($test_suffix)) eq $test_suffix;
+                 }
+               $obj .= '.log';
+               my $compile = 'LOG_COMPILE';
+               define_variable ($compile,
+                                '$(LOG_COMPILER) $(AM_LOG_FLAGS) 
$(LOG_FLAGS)', INTERNAL);
+               $output_rules .= file_contents ('check2', new 
Automake::Location,
+                                               GENERIC => 0,
+                                               OBJ => $obj,
+                                               SOURCE => $val,
+                                               COMPILE =>'$(' . $compile . ')',
+                                               EXT => '');
+               return $obj;
+             });
+
+         my $nhelper=1;
+         my $prev = 'TESTS';
+         my $post = '';
+         my $last_suffix = $test_suffixes[$#test_suffixes];
+         my $cur = '';
+         foreach my $test_suffix (@test_suffixes)
+           {
+             if ($test_suffix eq $last_suffix)
+               {
+                 $cur = 'TEST_LOGS';
+               }
+             else
+               {
+                 $cur = 'am__test_logs' . $nhelper;
+               }
+             define_variable ($cur,
+               '$(' . $prev . ':' . $test_suffix . $post . '=.log)', INTERNAL);
+             $post = '.log';
+             $prev = $cur;
+             $nhelper++;
+             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);
+
+         $clean_files{'$(TEST_LOGS_TMP)'} = MOSTLY_CLEAN;
+         $clean_files{'$(TEST_LOGS)'} = MOSTLY_CLEAN;
+         $clean_files{'$(TEST_SUITE_LOG)'} = MOSTLY_CLEAN;
+         $clean_files{'$(TEST_SUITE_HTML)'} = MOSTLY_CLEAN;
+       }
     }
 }
 
@@ -5632,9 +5907,9 @@ sub lang_c_finish
     }
 }
 
-sub lang_vala_finish_target ($$$)
+sub lang_vala_finish_target ($$)
 {
-  my ($self, $name, $pkgname) = @_;
+  my ($self, $name) = @_;
 
   my $derived = canonicalize ($name);
   my $varname = $derived . '_SOURCES';
@@ -5644,22 +5919,17 @@ sub lang_vala_finish_target ($$$)
     {
       foreach my $file ($var->value_as_list_recursive)
         {
-          $output_rules .= "$file: ${derived}_vala.stamp\n"
-            if ($file =~ s/(.*)\.vala$/$1.c $1.h/);
+          $output_rules .= "$file: ${derived}_vala.stamp\n".
+            "address@hidden test -f \$@; then :; else \\\n".
+            "\t  rm -f ${derived}_vala.stamp; \\\n".
+            "\t  \$(MAKE) \$(AM_MAKEFLAGS) ${derived}_vala.stamp; \\\n".
+            "\tfi\n"
+            if $file =~ s/(.*)\.vala$/$1.c/;
         }
     }
 
   my $compile = $self->compile;
 
-  if (defined ($pkgname))
-    {
-      $varname = $derived . '_PKGNAME';
-      $var = var ($varname);
-
-      $pkgname = $var->variable_value if $var;
-      $compile =~s/\$\(AM_VALAFLAGS\)/--library=$pkgname $&/;
-    }
-
   # Rewrite each occurrence of `AM_$flag' in the compile
   # rule into `${derived}_$flag' if it exists.
   for my $flag (@{$self->flags})
@@ -5671,42 +5941,47 @@ sub lang_vala_finish_target ($$$)
 
   my $dirname = dirname ($name);
 
-  $compile .= " -d $dirname" if $dirname ne '.';
+  # Only generate C code, do not run C compiler
+  $compile .= " -C";
+
+  my $verbose = verbose_flag ('VALAC');
+  my $silent = silent_flag ();
 
   $output_rules .=
     "${derived}_vala.stamp: \$(${derived}_SOURCES)\n".
-    "\t${compile} \$^ && touch address@hidden";
+    "\t${verbose}${compile} \$(${derived}_SOURCES)\n".
+    "\t${silent}touch address@hidden";
+
+  push_dist_common ("${derived}_vala.stamp");
+
+  $clean_files{"${derived}_vala.stamp"} = MAINTAINER_CLEAN;
 }
 
-# This is a vala helper which is called after all source file
-# processing is done.
+# Add output rules to invoke valac and create stamp file as a witness
+# to handle multiple outputs. This function is called after all source
+# file processing is done.
 sub lang_vala_finish
 {
   my ($self) = @_;
 
   foreach my $prog (keys %known_programs)
     {
-      lang_vala_finish_target ($self, $prog, 0);
+      lang_vala_finish_target ($self, $prog);
     }
 
-  while (my ($name, $pkgname) = each %known_libraries)
+  while (my ($name) = each %known_libraries)
     {
-      lang_vala_finish_target ($self, $name, $pkgname);
+      lang_vala_finish_target ($self, $name);
     }
 }
 
-# This is a vala helper which is called whenever we have decided to
-# compile a vala file.
+# The built .c files should be cleaned only on maintainer-clean
+# as the .c files are distributed. This function is called for each
+# .vala source file.
 sub lang_vala_target_hook
 {
   my ($self, $aggregate, $output, $input, %transform) = @_;
 
-  (my $output_base = $output) =~ s/$KNOWN_EXTENSIONS_PATTERN$//;
-  my $header = $output_base . '.h';
-
-  &push_dist_common ($header);
-
-  $clean_files{$header} = MAINTAINER_CLEAN;
   $clean_files{$output} = MAINTAINER_CLEAN;
 }
 
@@ -6193,11 +6468,15 @@ sub define_compiler_variable ($)
     $libtool_tag = '--tag=' . $lang->libtool_tag . ' '
       if $lang->libtool_tag && exists $libtool_tags{$lang->libtool_tag};
     &define_variable ($var, $value, INTERNAL);
-    &define_variable ("LT$var",
-                     "\$(LIBTOOL) $libtool_tag\$(AM_LIBTOOLFLAGS) "
-                     . "\$(LIBTOOLFLAGS) --mode=compile $value",
-                     INTERNAL)
-      if var ('LIBTOOL');
+    if (var ('LIBTOOL'))
+      {
+       my $verbose = define_verbose_libtool ();
+       &define_variable ("LT$var",
+                         "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) 
"
+                         . "\$(LIBTOOLFLAGS) --mode=compile $value",
+                         INTERNAL);
+      }
+    define_verbose_tagvar ($lang->ccer || 'GEN');
 }
 
 
@@ -6214,12 +6493,16 @@ sub define_linker_variable ($)
     # CCLD = $(CC).
     &define_variable ($lang->lder, $lang->ld, INTERNAL);
     # CCLINK = $(CCLD) blah blah...
-    &define_variable ($lang->linker,
-                     ((var ('LIBTOOL') ?
-                       "\$(LIBTOOL) $libtool_tag\$(AM_LIBTOOLFLAGS) "
-                       . "\$(LIBTOOLFLAGS) --mode=link " : '')
-                      . $lang->link),
-                     INTERNAL);
+    my $link = '';
+    if (var ('LIBTOOL'))
+      {
+       my $verbose = define_verbose_libtool ();
+       $link = "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) "
+               . "\$(LIBTOOLFLAGS) --mode=link ";
+      }
+    &define_variable ($lang->linker, $link . $lang->link, INTERNAL);
+    &define_variable ($lang->compiler,  $lang);
+    &define_verbose_tagvar ($lang->lder || 'GEN');
 }
 
 sub define_per_target_linker_variable ($$)
@@ -6243,8 +6526,9 @@ sub define_per_target_linker_variable ($$)
       $libtool_tag = '--tag=' . $lang->libtool_tag . ' '
        if $lang->libtool_tag && exists $libtool_tags{$lang->libtool_tag};
 
+      my $verbose = define_verbose_libtool ();
       $link_command =
-       "\$(LIBTOOL) $libtool_tag\$(AM_LIBTOOLFLAGS) \$(LIBTOOLFLAGS) "
+       "\$(LIBTOOL) $verbose $libtool_tag\$(AM_LIBTOOLFLAGS) \$(LIBTOOLFLAGS) "
        . "--mode=link " . $link_command;
     }
 
@@ -6262,11 +6546,11 @@ sub define_per_target_linker_variable ($$)
 
   # If the computed command is the same as the generic command, use
   # the command linker variable.
-  return $lang->linker
+  return ($lang->linker, $lang->lder)
     if $link_command eq $orig_command;
 
   &define_variable ("${target}_LINK", $link_command, INTERNAL);
-  return "${target}_LINK";
+  return ("${target}_LINK", $lang->lder);
 }
 
 ################################################################
@@ -6713,6 +6997,7 @@ sub make_paragraphs ($%)
                 'MAINTAINER-MODE'
                 => $seen_maint_mode ? subst ('MAINTAINER_MODE_TRUE') : '',
 
+                'XZ'          => !! option 'dist-xz',
                 'LZMA'        => !! option 'dist-lzma',
                 'BZIP2'       => !! option 'dist-bzip2',
                 'COMPRESS'    => !! option 'dist-tarZ',
@@ -6722,6 +7007,7 @@ sub make_paragraphs ($%)
 
                 'INSTALL-INFO' =>  ! option 'no-installinfo',
                 'INSTALL-MAN'  =>  ! option 'no-installman',
+                'HAVE-MANS'    => !! var ('MANS'),
                 'CK-NEWS'      => !! option 'check-news',
 
                 'SUBDIRS'      => !! var ('SUBDIRS'),
@@ -6906,7 +7192,7 @@ sub file_contents_internal ($$$%)
          my $flat_deps = &flatten ($dependencies);
          my @deps = split (' ', $flat_deps);
 
-         foreach (split (' ' , $targets))
+         foreach (split (' ', $targets))
            {
              # FIXME: 1. We are not robust to people defining several targets
              # at once, only some of them being in %dependencies.  The
@@ -7462,6 +7748,7 @@ sub require_file_internal ($$$@)
                }
 
              my $trailer = '';
+             my $trailer2 = '';
              my $suppress = 0;
 
              # Only install missing files according to our desired
@@ -7477,6 +7764,17 @@ sub require_file_internal ($$$@)
                      # can, copy if we must.  Note: delete the file
                      # first, in case it is a dangling symlink.
                      $message = "installing `$fullfile'";
+
+                     # The license file should not be volatile.
+                     if ($file eq "COPYING")
+                       {
+                         $message .= " using GNU General Public License v3 
file";
+                         $trailer2 = "\n    Consider adding the COPYING file"
+                                   . " to the version control system"
+                                   . "\n    for your code, to avoid questions"
+                                   . " about which license your project uses.";
+                       }
+
                      # Windows Perl will hang if we try to delete a
                      # file that doesn't exist.
                      unlink ($fullfile) if -f $fullfile;
@@ -7493,7 +7791,7 @@ sub require_file_internal ($$$@)
                          $suppress = 0;
                          $trailer = "\n    error while copying";
                        }
-                     reset_dir_cache ($dir);
+                     set_dir_cache_file ($dir, $file);
                    }
 
                  if (! maybe_push_required_file (dirname ($fullfile),
@@ -7506,7 +7804,7 @@ sub require_file_internal ($$$@)
                          # an auxiliary file and we are not processing
                          # the top level Makefile.  Furthermore Automake
                          # hasn't been asked to create the Makefile.in
-                         # that distribute the aux dir files.
+                         # that distributes the aux dir files.
                          error ($where, 'Please make a full run of automake'
                                 . " so $fullfile gets distributed.");
                        }
@@ -7529,7 +7827,7 @@ sub require_file_internal ($$$@)
              next
                if !$suppress && rule $file;
 
-             msg ($suppress ? 'note' : 'error', $where, "$message$trailer");
+             msg ($suppress ? 'note' : 'error', $where, 
"$message$trailer$trailer2");
            }
        }
     }
@@ -7571,13 +7869,80 @@ sub require_libsource_with_macro ($$$@)
       }
 }
 
+# Queue to push require_conf_file requirements to.
+my $required_conf_file_queue;
+
+# &queue_required_conf_file ($QUEUE, $KEY, $DIR, $WHERE, $MYSTRICT, @FILES)
+# -------------------------------------------------------------------------
+sub queue_required_conf_file ($$$$@)
+{
+    my ($queue, $key, $dir, $where, $mystrict, @files) = @_;
+    my @serial_loc;
+    if (ref $where)
+      {
+        @serial_loc = (QUEUE_LOCATION, $where->serialize ());
+      }
+    else
+      {
+        @serial_loc = (QUEUE_STRING, $where);
+      }
+    $queue->enqueue ($key, $dir, @serial_loc, $mystrict, 0 + @files, @files);
+}
+
+# &require_queued_conf_file ($QUEUE)
+# ----------------------------------
+sub require_queued_conf_file ($)
+{
+    my ($queue) = @_;
+    my $where;
+    my $dir = $queue->dequeue ();
+    my $loc_key = $queue->dequeue ();
+    if ($loc_key eq QUEUE_LOCATION)
+      {
+       $where = Automake::Location::deserialize ($queue);
+      }
+    elsif ($loc_key eq QUEUE_STRING)
+      {
+       $where = $queue->dequeue ();
+      }
+    else
+      {
+       prog_error "unexpected key $loc_key";
+      }
+    my $mystrict = $queue->dequeue ();
+    my $nfiles = $queue->dequeue ();
+    my @files;
+    push @files, $queue->dequeue ()
+      foreach (1 .. $nfiles);
+
+    # Dequeuing happens outside of per-makefile context, so we have to
+    # set the variables used by require_file_internal and the functions
+    # it calls.  Gross!
+    $relative_dir = $dir;
+    require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+}
+
 # &require_conf_file ($WHERE, $MYSTRICT, @FILES)
 # ----------------------------------------------
-# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR.
+# Looks in configuration path, as specified by AC_CONFIG_AUX_DIR;
+# worker threads may queue up the action to be serialized by the master.
+#
+# FIXME: this seriously relies on the semantics of require_file_internal
+# and maybe_push_required_file, in that we exploit the fact that only the
+# contents of the last handled output file may be impacted (which in turn
+# is dealt with by the master thread).
 sub require_conf_file ($$@)
 {
     my ($where, $mystrict, @files) = @_;
-    require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+    if (defined $required_conf_file_queue)
+      {
+       queue_required_conf_file ($required_conf_file_queue, QUEUE_CONF_FILE,
+                                 $relative_dir, $where, $mystrict, @files);
+      }
+    else
+      {
+       require_file_internal ($where, $mystrict, $config_aux_dir, @files);
+      }
 }
 
 
@@ -7881,6 +8246,9 @@ Dependency tracking:
   -i, --ignore-deps      disable dependency tracking code
       --include-deps     enable dependency tracking code
 
+Verbosity of generated rules:
+      --silent-rules     enable silent build rules
+
 Flavors:
       --cygnus           assume program is part of Cygnus-style tree
       --foreign          set strictness to foreign
@@ -7956,7 +8324,7 @@ sub version ()
 {
   print <<EOF;
 automake (GNU $PACKAGE) $VERSION
-Copyright (C) 2008 Free Software Foundation, Inc.
+Copyright (C) 2009 Free Software Foundation, Inc.
 License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
 This is free software: you are free to change and redistribute it.
 There is NO WARRANTY, to the extent permitted by law.
@@ -7991,7 +8359,9 @@ sub parse_arguments ()
      'f|force-missing'  => \$force_missing,
      'o|output-dir=s'  => \$output_directory,
      'a|add-missing'   => \$add_missing,
-     'c|copy'          => \$copy_missing,
+     'c|copy'          => \$copy_missing,
+     'silent-rules'    => sub { set_global_option ('silent-rules',
+                                                   $cli_where); },
      'v|verbose'       => sub { setup_channel 'verb', silent => 0; },
      'W|warnings=s'     => \&parse_warnings,
      # These long options (--Werror and --Wno-error) for backward
@@ -8090,6 +8460,161 @@ sub parse_arguments ()
     if $errspec && ! @input_files;
 }
 
+
+# handle_makefile ($MAKEFILE_IN)
+# ------------------------------
+# Deal with $MAKEFILE_IN.
+sub handle_makefile ($)
+{
+  my ($file) =  @_;
+  ($am_file = $file) =~ s/\.in$//;
+  if (! -f ($am_file . '.am'))
+    {
+      error "`$am_file.am' does not exist";
+    }
+  else
+    {
+      # Any warning setting now local to this Makefile.am.
+      dup_channel_setup;
+
+      generate_makefile ($am_file . '.am', $file);
+
+      # Back out any warning setting.
+      drop_channel_setup;
+    }
+}
+
+# handle_makefiles_serial ()
+# --------------------------
+# Deal with all makefiles, without threads.
+sub handle_makefiles_serial ()
+{
+  foreach my $file (@input_files)
+    {
+      handle_makefile ($file);
+    }
+}
+
+# get_number_of_threads ()
+# ------------------------
+# Logic for deciding how many worker threads to use.
+sub get_number_of_threads
+{
+  my $nthreads = $ENV{'AUTOMAKE_JOBS'} || 0;
+
+  $nthreads = 0
+    unless $nthreads =~ /^[0-9]+$/;
+
+  # It doesn't make sense to use more threads than makefiles,
+  my $max_threads = @input_files;
+
+  # but a single worker thread is helpful for exposing bugs.
+  if ($automake_will_process_aux_dir && $max_threads > 1)
+    {
+      $max_threads--;
+    }
+  if ($nthreads > $max_threads)
+    {
+      $nthreads = $max_threads;
+    }
+  return $nthreads;
+}
+
+# handle_makefiles_threaded ($NTHREADS)
+# -------------------------------------
+# Deal with all makefiles, using threads.  The general strategy is to
+# spawn NTHREADS worker threads, dispatch makefiles to them, and let the
+# worker threads push back everything that needs serialization:
+# * warning and (normal) error messages, for stable stderr output
+#   order and content (avoiding duplicates, for example),
+# * races when installing aux files (and respective messages),
+# * races when collecting aux files for distribution.
+#
+# The latter requires that the makefile that deals with the aux dir
+# files be handled last, done by the master thread.
+sub handle_makefiles_threaded ($)
+{
+  my ($nthreads) = @_;
+
+  my @queued_input_files = @input_files;
+  my $last_input_file = undef;
+  if ($automake_will_process_aux_dir)
+    {
+      $last_input_file = pop @queued_input_files;
+    }
+
+  # The file queue distributes all makefiles, the message queues
+  # collect all serializations needed for respective files.
+  my $file_queue = Thread::Queue->new;
+  my %msg_queues;
+  foreach my $file (@queued_input_files)
+    {
+      $msg_queues{$file} = Thread::Queue->new;
+    }
+
+  verb "spawning $nthreads worker threads";
+  my @threads = (1 .. $nthreads);
+  foreach my $t (@threads)
+    {
+      $t = threads->new (sub
+       {
+         while (my $file = $file_queue->dequeue)
+           {
+             verb "handling $file";
+             my $queue = $msg_queues{$file};
+             setup_channel_queue ($queue, QUEUE_MESSAGE);
+             $required_conf_file_queue = $queue;
+             handle_makefile ($file);
+             $queue->enqueue (undef);
+             setup_channel_queue (undef, undef);
+             $required_conf_file_queue = undef;
+           }
+         return $exit_code;
+       });
+    }
+
+  # Queue all normal makefiles.
+  verb "queuing " . @queued_input_files . " input files";
+  $file_queue->enqueue (@queued_input_files, (undef) x @threads);
+
+  # Collect and process serializations.
+  foreach my $file (@queued_input_files)
+    {
+      verb "dequeuing messages for " . $file;
+      reset_local_duplicates ();
+      my $queue = $msg_queues{$file};
+      while (my $key = $queue->dequeue)
+       {
+         if ($key eq QUEUE_MESSAGE)
+           {
+             pop_channel_queue ($queue);
+           }
+         elsif ($key eq QUEUE_CONF_FILE)
+           {
+             require_queued_conf_file ($queue);
+           }
+         else
+           {
+             prog_error "unexpected key $key";
+           }
+       }
+    }
+
+  foreach my $t (@threads)
+    {
+      my @exit_thread = $t->join;
+      $exit_code = $exit_thread[0]
+       if ($exit_thread[0] > $exit_code);
+    }
+
+  # The master processes the last file.
+  if ($automake_will_process_aux_dir)
+    {
+      verb "processing last input file";
+      handle_makefile ($last_input_file);
+    }
+}
+
 ################################################################
 
 # Parse the WARNINGS environment variable.
@@ -8111,24 +8636,15 @@ if (! @input_files)
     fatal ("no `Makefile.am' found for any configure output$msg");
   }
 
-# Now do all the work on each file.
-foreach my $file (@input_files)
-  {
-    ($am_file = $file) =~ s/\.in$//;
-    if (! -f ($am_file . '.am'))
-      {
-       error "`$am_file.am' does not exist";
-      }
-    else
-      {
-       # Any warning setting now local to this Makefile.am.
-       dup_channel_setup;
-
-       generate_makefile ($am_file . '.am', $file);
+my $nthreads = get_number_of_threads ();
 
-       # Back out any warning setting.
-       drop_channel_setup;
-      }
+if ($perl_threads && $nthreads >= 1)
+  {
+    handle_makefiles_threaded ($nthreads);
+  }
+else
+  {
+    handle_makefiles_serial ();
   }
 
 exit $exit_code;
diff --git a/bootstrap b/bootstrap
index aa50f5d..cb563ca 100755
--- a/bootstrap
+++ b/bootstrap
@@ -56,6 +56,7 @@ fi
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
 PACKAGE=automake
 datadir=.
+PERL_THREADS=0
 
 # Override SHELL.  This is required on DJGPP so that Perl's system()
 # uses bash, not COMMAND.COM which doesn't quote arguments properly.
@@ -100,6 +101,7 @@ dosubst ()
   sed -e "address@hidden@%$APIVERSION%g" \
       -e "address@hidden@%$PACKAGE%g" \
       -e "address@hidden@%$PERL%g" \
+      -e "address@hidden@%$PERL_THREADS%g" \
       -e "address@hidden@%$BOOTSTRAP_SHELL%g" \
       -e "address@hidden@%$VERSION%g" \
       -e "address@hidden@%$datadir%g" \
@@ -122,6 +124,11 @@ dosubst m4/amversion.in m4/amversion.m4
 # Create temporary replacement for automake
 dosubst automake.in automake.tmp
 
+# Create tests/parallel-tests.am.
+cd tests
+$BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
+cd ..
+
 # Run the autotools.
 $PERL ./aclocal.tmp -I m4
 autoconf
diff --git a/configure b/configure
index 235f1a0..caf5ada 100755
--- a/configure
+++ b/configure
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.63 for GNU Automake 1.10a.
+# Generated by GNU Autoconf 2.63 for GNU Automake 1.10c.
 #
 # Report bugs to <address@hidden>.
 #
@@ -596,8 +596,8 @@ SHELL=${CONFIG_SHELL-/bin/sh}
 # Identity of this package.
 PACKAGE_NAME='GNU Automake'
 PACKAGE_TARNAME='automake'
-PACKAGE_VERSION='1.10a'
-PACKAGE_STRING='GNU Automake 1.10a'
+PACKAGE_VERSION='1.10c'
+PACKAGE_STRING='GNU Automake 1.10c'
 PACKAGE_BUGREPORT='address@hidden'
 
 ac_unique_file="automake.in"
@@ -610,9 +610,11 @@ MODIFICATION_DELAY
 LN
 HELP2MAN
 TEX
+PERL_THREADS
 PERL
 pkgvdatadir
 APIVERSION
+AM_BACKSLASH
 am__untar
 am__tar
 AMTAR
@@ -636,6 +638,7 @@ am__isrc
 INSTALL_DATA
 INSTALL_SCRIPT
 INSTALL_PROGRAM
+am_AUTOHEADER
 am_AUTOCONF
 build_os
 build_vendor
@@ -1237,7 +1240,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures GNU Automake 1.10a to adapt to many kinds of systems.
+\`configure' configures GNU Automake 1.10c to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1306,7 +1309,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Automake 1.10a:";;
+     short | recursive ) echo "Configuration of GNU Automake 1.10c:";;
    esac
   cat <<\_ACEOF
 
@@ -1373,7 +1376,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Automake configure 1.10a
+GNU Automake configure 1.10c
 generated by GNU Autoconf 2.63
 
 Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
@@ -1387,7 +1390,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by GNU Automake $as_me 1.10a, which was
+It was created by GNU Automake $as_me 1.10c, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   $ $0 $@
@@ -1838,11 +1841,13 @@ case $build_os in *\ *) build_os=`echo "$build_os" | 
sed 's/ /-/g'`;; esac
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.
+# suite) without being bothered by `missing'.  Likewise for autoheader.
 am_AUTOCONF="${AUTOCONF-autoconf}"
 
+am_AUTOHEADER="${AUTOHEADER-autoheader}"
 
-am__api_version='1.10a'
+
+am__api_version='1.10c'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -1942,16 +1947,33 @@ $as_echo_n "checking whether build environment is 
sane... " >&6; }
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[\\\"\#\$\&\'\`$am_lf]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe absolute working directory 
name" >&5
+$as_echo "$as_me: error: unsafe absolute working directory name" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+case $srcdir in
+  *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
+    { { $as_echo "$as_me:$LINENO: error: unsafe srcdir value: \`$srcdir'" >&5
+$as_echo "$as_me: error: unsafe srcdir value: \`$srcdir'" >&2;}
+   { (exit 1); exit 1; }; };;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$*" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$*" != "X $srcdir/configure conftest.file" \
@@ -1995,7 +2017,14 @@ program_transform_name=`$as_echo 
"$program_transform_name" | sed "$ac_script"`
 # expand $ac_aux_dir to an absolute path
 am_aux_dir=`cd $ac_aux_dir && pwd`
 
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
@@ -2005,6 +2034,115 @@ else
 $as_echo "$as_me: WARNING: \`missing' script is too old or missing" >&2;}
 fi
 
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
+
+# Installed binaries are usually stripped using `strip' when the user
+# run `make install-strip'.  However `strip' might not be the right
+# tool to use in cross-compilation environments, therefore Automake
+# will honor the `STRIP' environment variable to overrule this program.
+if test "$cross_compiling" != no; then
+  if test -n "$ac_tool_prefix"; then
+  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program 
name with args.
+set dummy ${ac_tool_prefix}strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$STRIP"; then
+  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+STRIP=$ac_cv_prog_STRIP
+if test -n "$STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
+$as_echo "$STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+
+fi
+if test -z "$ac_cv_prog_STRIP"; then
+  ac_ct_STRIP=$STRIP
+  # Extract the first word of "strip", so it can be a program name with args.
+set dummy strip; ac_word=$2
+{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
+$as_echo_n "checking for $ac_word... " >&6; }
+if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if test -n "$ac_ct_STRIP"; then
+  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+  IFS=$as_save_IFS
+  test -z "$as_dir" && as_dir=.
+  for ac_exec_ext in '' $ac_executable_extensions; do
+  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
+    ac_cv_prog_ac_ct_STRIP="strip"
+    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+    break 2
+  fi
+done
+done
+IFS=$as_save_IFS
+
+fi
+fi
+ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
+if test -n "$ac_ct_STRIP"; then
+  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
+$as_echo "$ac_ct_STRIP" >&6; }
+else
+  { $as_echo "$as_me:$LINENO: result: no" >&5
+$as_echo "no" >&6; }
+fi
+
+  if test "x$ac_ct_STRIP" = x; then
+    STRIP=":"
+  else
+    case $cross_compiling:$ac_tool_warned in
+yes:)
+{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host 
triplet" >&5
+$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" 
>&2;}
+ac_tool_warned=yes ;;
+esac
+    STRIP=$ac_ct_STRIP
+  fi
+else
+  STRIP="$ac_cv_prog_STRIP"
+fi
+
+fi
+INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
+
 { $as_echo "$as_me:$LINENO: checking for a thread-safe mkdir -p" >&5
 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; }
 if test -z "$MKDIR_P"; then
@@ -2159,7 +2297,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='automake'
- VERSION='1.10a'
+ VERSION='1.10c'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2187,108 +2325,6 @@ AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"}
 
 MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"}
 
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
-
-# Installed binaries are usually stripped using `strip' when the user
-# run `make install-strip'.  However `strip' might not be the right
-# tool to use in cross-compilation environments, therefore Automake
-# will honor the `STRIP' environment variable to overrule this program.
-if test "$cross_compiling" != no; then
-  if test -n "$ac_tool_prefix"; then
-  # Extract the first word of "${ac_tool_prefix}strip", so it can be a program 
name with args.
-set dummy ${ac_tool_prefix}strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$STRIP"; then
-  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_STRIP="${ac_tool_prefix}strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-STRIP=$ac_cv_prog_STRIP
-if test -n "$STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $STRIP" >&5
-$as_echo "$STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-
-fi
-if test -z "$ac_cv_prog_STRIP"; then
-  ac_ct_STRIP=$STRIP
-  # Extract the first word of "strip", so it can be a program name with args.
-set dummy strip; ac_word=$2
-{ $as_echo "$as_me:$LINENO: checking for $ac_word" >&5
-$as_echo_n "checking for $ac_word... " >&6; }
-if test "${ac_cv_prog_ac_ct_STRIP+set}" = set; then
-  $as_echo_n "(cached) " >&6
-else
-  if test -n "$ac_ct_STRIP"; then
-  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
-else
-as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
-  IFS=$as_save_IFS
-  test -z "$as_dir" && as_dir=.
-  for ac_exec_ext in '' $ac_executable_extensions; do
-  if { test -f "$as_dir/$ac_word$ac_exec_ext" && $as_test_x 
"$as_dir/$ac_word$ac_exec_ext"; }; then
-    ac_cv_prog_ac_ct_STRIP="strip"
-    $as_echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
-    break 2
-  fi
-done
-done
-IFS=$as_save_IFS
-
-fi
-fi
-ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
-if test -n "$ac_ct_STRIP"; then
-  { $as_echo "$as_me:$LINENO: result: $ac_ct_STRIP" >&5
-$as_echo "$ac_ct_STRIP" >&6; }
-else
-  { $as_echo "$as_me:$LINENO: result: no" >&5
-$as_echo "no" >&6; }
-fi
-
-  if test "x$ac_ct_STRIP" = x; then
-    STRIP=":"
-  else
-    case $cross_compiling:$ac_tool_warned in
-yes:)
-{ $as_echo "$as_me:$LINENO: WARNING: using cross tools not prefixed with host 
triplet" >&5
-$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" 
>&2;}
-ac_tool_warned=yes ;;
-esac
-    STRIP=$ac_ct_STRIP
-  fi
-else
-  STRIP="$ac_cv_prog_STRIP"
-fi
-
-fi
-INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
-
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
 # Always define AMTAR for backward compatibility.
@@ -2300,6 +2336,7 @@ am__tar='${AMTAR} chof - "$$tardir"'; am__untar='${AMTAR} 
xf -'
 
 
 
+AM_BACKSLASH='\'
 
 
 # The API version is the base version.  We must guarantee
@@ -2378,6 +2415,39 @@ installed, select the one Automake should use using
    { (exit 1); exit 1; }; }
 }
 
+# We require ithreads support, and version 5.7.2 for CLONE.
+{ $as_echo "$as_me:$LINENO: checking whether $PERL supports ithreads" >&5
+$as_echo_n "checking whether $PERL supports ithreads... " >&6; }
+if test "${am_cv_prog_PERL_ithreads+set}" = set; then
+  $as_echo_n "(cached) " >&6
+else
+  if $PERL -e '
+    require 5.007_002;
+    use Config;
+    if ($Config{useithreads})
+      {
+       require threads;
+       import threads;
+       require Thread::Queue;
+       import Thread::Queue;
+       exit 0;
+      }
+    exit 1;' >&5 2>&1
+then
+  am_cv_prog_PERL_ithreads=yes
+else
+  am_cv_prog_PERL_ithreads=no
+fi
+fi
+{ $as_echo "$as_me:$LINENO: result: $am_cv_prog_PERL_ithreads" >&5
+$as_echo "$am_cv_prog_PERL_ithreads" >&6; }
+if test $am_cv_prog_PERL_ithreads = yes; then
+  PERL_THREADS=1;
+else
+  PERL_THREADS=0;
+fi
+
+
 # The test suite will skip some tests if tex is absent.
 # Extract the first word of "tex", so it can be a program name with args.
 set dummy tex; ac_word=$2
@@ -3212,7 +3282,7 @@ exec 6>&1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by GNU Automake $as_me 1.10a, which was
+This file was extended by GNU Automake $as_me 1.10c, which was
 generated by GNU Autoconf 2.63.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -3262,7 +3332,7 @@ Report bugs to <address@hidden>."
 _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_version="\\
-GNU Automake config.status 1.10a
+GNU Automake config.status 1.10c
 configured by $0, generated by GNU Autoconf 2.63,
   with options \\"`$as_echo "$ac_configure_args" | sed 's/^ //; 
s/[\\""\`\$]/\\\\&/g'`\\"
 
diff --git a/configure.ac b/configure.ac
index a21bfb2..4229d68 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,7 +1,7 @@
 # Process this file with autoconf to produce a configure script.
 
 # Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003,
-# 2004, 2006, 2007, 2008  Free Software Foundation, Inc.
+# 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
@@ -16,7 +16,7 @@
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-AC_INIT([GNU Automake], [1.10a], address@hidden)
+AC_INIT([GNU Automake], [1.10c], address@hidden)
 
 AC_CONFIG_SRCDIR(automake.in)
 AC_CONFIG_AUX_DIR(lib)
@@ -25,10 +25,11 @@ AC_CANONICAL_BUILD
 
 # Save the AUTOCONF setting before AM_INIT_AUTOMAKE overrides it; this
 # way we can run Autoconf tests from configure (or from the test
-# suite) without being bothered by `missing'.
+# suite) without being bothered by `missing'.  Likewise for autoheader.
 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.
@@ -38,7 +39,7 @@ AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 
color-tests])
 # * Prereleases on the trunk are all incompatible -- 1.5b and 1.5c
 #   aren't the same.
 APIVERSION=`echo "$VERSION" | sed -e 
's/^\([[0-9]]*\.[[0-9]]*[[a-z]]*\).*$/\1/'`
-AC_SUBST(APIVERSION)
+AC_SUBST([APIVERSION])
 
 # A versioned directory, defined here for convenience.
 AC_SUBST([pkgvdatadir], ["\${datadir}/$PACKAGE-$APIVERSION"])
@@ -60,6 +61,32 @@ installed, select the one Automake should use using
   ./configure PERL=/path/to/perl])
 }
 
+# We require ithreads support, and version 5.7.2 for CLONE.
+AC_CACHE_CHECK([whether $PERL supports ithreads], [am_cv_prog_PERL_ithreads],
+[if $PERL -e '
+    require 5.007_002;
+    use Config;
+    if ($Config{useithreads})
+      {
+       require threads;
+       import threads;
+       require Thread::Queue;
+       import Thread::Queue;
+       exit 0;
+      }
+    exit 1;' >&AS_MESSAGE_LOG_FD 2>&1
+then
+  am_cv_prog_PERL_ithreads=yes
+else
+  am_cv_prog_PERL_ithreads=no
+fi])
+if test $am_cv_prog_PERL_ithreads = yes; then
+  PERL_THREADS=1;
+else
+  PERL_THREADS=0;
+fi
+AC_SUBST([PERL_THREADS])
+
 # The test suite will skip some tests if tex is absent.
 AC_CHECK_PROG([TEX], [tex], [tex])
 
diff --git a/doc/Makefile.in b/doc/Makefile.in
index 65f2747..fcfa1be 100644
--- a/doc/Makefile.in
+++ b/doc/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -132,6 +133,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -142,6 +144,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -235,9 +238,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  doc/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  doc/Makefile
+         $(AUTOMAKE) --gnu doc/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -331,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"; \
@@ -339,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"; \
@@ -354,7 +359,8 @@ uninstall-info-am:
          for file in $$list; do \
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
            echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove 
'$(DESTDIR)$(infodir)/$$relfile'"; \
-           install-info --info-dir="$(DESTDIR)$(infodir)" --remove 
"$(DESTDIR)$(infodir)/$$relfile"; \
+           if install-info --info-dir="$(DESTDIR)$(infodir)" --remove 
"$(DESTDIR)$(infodir)/$$relfile"; \
+           then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; 
fi; \
          done; \
        else :; fi
        @$(NORMAL_UNINSTALL)
@@ -370,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"; \
@@ -378,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"; \
@@ -419,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; \
@@ -443,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,.,'`; \
@@ -453,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) | \
@@ -464,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 ")"; \
@@ -523,6 +532,19 @@ distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
 distdir: $(DISTFILES)
+       @list='$(MANS)'; if test -n "$$list"; then \
+         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"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list 
>/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' 
replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | 
sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate 
the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" 
>&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
        list='$(DISTFILES)'; \
@@ -538,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" \
@@ -611,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) | \
@@ -626,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 \
@@ -649,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/||"`;; \
@@ -669,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'";\
@@ -683,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) | \
@@ -695,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/amhello/.gitignore b/doc/amhello/.gitignore
new file mode 100644
index 0000000..466b7a6
--- /dev/null
+++ b/doc/amhello/.gitignore
@@ -0,0 +1,8 @@
+Makefile.in
+aclocal.m4
+config.h.in
+config.h.in~
+configure
+depcomp
+install-sh
+missing
diff --git a/doc/automake.texi b/doc/automake.texi
index 7c5bf82..89f1848 100644
--- a/doc/automake.texi
+++ b/doc/automake.texi
@@ -22,12 +22,12 @@ This manual is for @acronym{GNU} Automake (version 
@value{VERSION},
 Makefiles from template files.
 
 Copyright @copyright{} 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.
 
 @quotation
 Permission is granted to copy, distribute and/or modify this document
 under the terms of the @acronym{GNU} Free Documentation License,
-Version 1.2 or any later version published by the Free Software
+Version 1.3 or any later version published by the Free Software
 Foundation; with no Invariant Sections, with no Front-Cover texts,
 and with no Back-Cover Texts.  A copy of the license is included in the
 section entitled address@hidden Free Documentation License.''
@@ -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
@@ -111,13 +111,13 @@ section entitled address@hidden Free Documentation 
License.''
 * Rebuilding::                  Automatic rebuilding of Makefile
 * Options::                     Changing Automake's behavior
 * Miscellaneous::               Miscellaneous rules
-* Include::                     Including extra files in an Automake template.
+* Include::                     Including extra files in an Automake template
 * Conditionals::                Conditionals
 * Gnits::                       The effect of @option{--gnu} and 
@option{--gnits}
 * Cygnus::                      The effect of @option{--cygnus}
 * Not Enough::                  When Automake is not Enough
 * Distributing::                Distributing the Makefile.in
-* API versioning::              About compatibility between Automake versions
+* API Versioning::              About compatibility between Automake versions
 * Upgrading::                   Upgrading to a Newer Automake Version
 * FAQ::                         Frequently Asked Questions
 * History::                     Notes about the history of Automake
@@ -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
@@ -263,9 +270,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
 
@@ -278,7 +285,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
 
@@ -286,6 +316,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,11 +330,11 @@ 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
+* Wildcards::                   Why doesn't Automake support wildcards?
+* 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
@@ -310,6 +345,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
@@ -876,7 +920,7 @@ On the first host, you could create a local build directory:
 @end example
 
 @noindent
-(Here we assume the that installer has configured @command{sudo} so it
+(Here we assume that the installer has configured @command{sudo} so it
 can execute @code{make install} with root privileges; it is more convenient
 than using @command{su} like in @ref{Basic Installation}).
 
@@ -928,8 +972,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
@@ -1028,7 +1072,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}.
@@ -1044,7 +1088,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,
@@ -1115,13 +1159,13 @@ snapshot of all the files to be installed.
 @dots{}
 ~/amhello-1.0 % @kbd{cd ~/inst}
 ~/inst % @kbd{find . -type f -print > ../files.lst}
-~/inst % @kbd{tar zcvf ~/amhello-1.0-i686.tar.gz `cat ../file.lst`}
+~/inst % @kbd{tar zcvf ~/amhello-1.0-i686.tar.gz `cat ../files.lst`}
 ./usr/bin/hello
 ./usr/share/doc/amhello/README
 @end example
 
 After this example, @code{amhello-1.0-i686.tar.gz} is ready to be
-uncompressed in @file{/} on many hosts.  (Using @code{`cat ../file.lst`}
+uncompressed in @file{/} on many hosts.  (Using @code{`cat ../files.lst`}
 instead of @samp{.} as argument for @command{tar} avoids entries for
 each subdirectory in the archive: we would not like @command{tar} to
 restore the modification time of @file{/}, @file{/usr/}, etc.)
@@ -1184,8 +1228,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
@@ -1252,7 +1296,7 @@ Autoconfiscated packages (that means packages whose build 
system have
 been created by Autoconf and friends) can be nested to arbitrary
 depth.
 
-A typical setup is that a package A will distribute one of the libraries
+A typical setup is that package A will distribute one of the libraries
 it needs in a subdirectory.  This library B is a complete package with
 its own GNU Build System.  The @command{configure} script of A will
 run the @command{configure} script of B as part of its execution,
@@ -1519,7 +1563,7 @@ This file is read by both @command{autoconf} (to create
 @file{Makefile.in}s).  It contains a series of M4 macros that will be
 expanded as shell code to finally form the @file{configure} script.
 We will not elaborate on the syntax of this file, because the Autoconf
-manual has a whole section about it (@pxref{Writing configure.ac, ,
+manual has a whole section about it (@pxref{Writing Autoconf Input, ,
 Writing @file{configure.ac}, autoconf, The Autoconf Manual}).
 
 The macros prefixed with @code{AC_} are Autoconf macros, documented
@@ -1690,7 +1734,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
@@ -1867,7 +1911,7 @@ At @command{make} time, certain variables are used to 
determine which
 objects are to be built.  The variable names are made of several pieces
 that are concatenated together.
 
-The piece that tells automake what is being built is commonly called
+The piece that tells @command{automake} what is being built is commonly called
 the @dfn{primary}.  For instance, the primary @code{PROGRAMS} holds a
 list of programs that are to be compiled and linked.
 @vindex PROGRAMS
@@ -1978,10 +2022,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
@@ -1994,7 +2038,7 @@ processes (see for example
 overview on this issue),
 which of course also applies to commands spawned by @command{make}.
 POSIX requires this limit to be at least 4096 bytes, and most modern
-systems have quite high limits, if at all.
+systems have quite high limits (or are unlimited).
 
 In order to create portable Makefiles that do not trip over these
 limits, it is necessary to keep the length of file lists bounded.
@@ -2018,10 +2062,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
@@ -2112,8 +2156,8 @@ source in case you need more recent versions.
 @table @code
 @item ansi2knr.c
 @itemx ansi2knr.1
-These two files are used by the obsolete de-ANSI-fication support
-(@pxref{ANSI}).
+These two files are used for de-ANSI-fication support (obsolete
address@hidden).
 
 @item compile
 This is a wrapper for compilers that do not accept options @option{-c}
@@ -2128,7 +2172,7 @@ support new architectures and fix probes broken by 
changes in new
 kernel versions.  Each new release of Automake comes with up-to-date
 copies of these programs.  If your copy of Automake is getting old,
 you are encouraged to fetch the latest versions of these files from
address@hidden://savannah.gnu.org/cvs/?group=config} before making a
address@hidden://savannah.gnu.org/git/?group=config} before making a
 release.
 
 @item config-ml.in
@@ -2161,7 +2205,7 @@ things so that the build can continue.
 
 @item mkinstalldirs
 This script used to be a wrapper around @samp{mkdir -p}, which is not
-portable.  Now we prefer to use @samp{install-sh -d} when configure
+portable.  Now we prefer to use @samp{install-sh -d} when @command{configure}
 finds that @samp{mkdir -p} does not work, this makes one less script to
 distribute.
 
@@ -2174,7 +2218,7 @@ This is used to byte-compile Python scripts.
 
 @item symlink-tree
 This program duplicates a tree of directories, using symbolic links
-instead of copying files.  Such operation is performed when building
+instead of copying files.  Such an operation is performed when building
 multilibs (@pxref{Multilibs}).  This file is maintained in the GCC
 tree at @url{http://gcc.gnu.org/svn.html}.
 
@@ -2307,7 +2351,8 @@ false.o: true.c
 @end example
 
 Note that there is no @code{true_SOURCES} definition.  Automake will
-implicitly assume that there is a source file named @file{true.c}, and
+implicitly assume that there is a source file named @file{true.c}
+(@pxref{Default _SOURCES}), and
 define rules to compile @file{true.o} and link @file{true}.  The
 @samp{true.o: true.c} rule supplied by the above @file{Makefile.am},
 will override the Automake generated rule to build @file{true.o}.
@@ -2425,7 +2470,7 @@ have to run @command{autoconf} yourself for this purpose.
 @opindex -a
 @opindex --add-missing
 Automake requires certain common files to exist in certain situations;
-for instance, @file{config.guess} is required if @file{configure.ac} runs
+for instance, @file{config.guess} is required if @file{configure.ac} invokes
 @code{AC_CANONICAL_HOST}.  Automake is distributed with several of these
 files (@pxref{Auxiliary Programs}); this option will cause the missing
 ones to be automatically added to the package, whenever possible.  In
@@ -2439,6 +2484,9 @@ Therefore, @code{AC_CONFIG_AUX_DIR}'s setting affects 
whether a
 file is considered missing, and where the missing file is added
 (@pxref{Optional}).
 
+In some strictness modes, additional files are installed, see @ref{Gnits}
+for more information.
+
 @item address@hidden
 @opindex --libdir
 Look for Automake data files in directory @var{dir} instead of in the
@@ -2512,6 +2560,10 @@ Ordinarily each @file{Makefile.in} is created in the 
directory of the
 corresponding @file{Makefile.am}.  This option is deprecated and will be
 removed in a future release.
 
address@hidden --silent-rules
address@hidden --silent-rules
+Enable the @option{silent-rules} option globally (@pxref{Options}).
+
 @item -v
 @itemx --verbose
 @opindex -v
@@ -2524,7 +2576,7 @@ created.
 Print the version number of Automake and exit.
 
 @item -W CATEGORY
address@hidden address@hidden
address@hidden address@hidden
 @opindex -W
 @opindex --warnings
 Output warnings falling in @var{category}.  @var{category} can be
@@ -2559,6 +2611,8 @@ variables.
 The categories output by default are @samp{syntax} and
 @samp{unsupported}.  Additionally, @samp{gnu} and @samp{portability}
 are enabled in @option{--gnu} and @option{--gnits} strictness.
+On the other hand, the @option{silent-rules} options (@pxref{Options})
+turns off portability warnings about recursive variable expansions.
 
 @vindex WARNINGS
 The environment variable @env{WARNINGS} can contain a comma separated
@@ -2570,6 +2624,12 @@ for this reason.
 
 @end table
 
address@hidden AUTOMAKE_JOBS
+If the environment variable @env{AUTOMAKE_JOBS} contains a positive
+number, it is taken as the maximum number of Perl threads to use in
address@hidden for generating multiple @file{Makefile.in} files
+concurrently.  This is an experimental feature.
+
 
 @node configure
 @chapter Scanning @file{configure.ac}
@@ -2649,8 +2709,8 @@ file is not considered to be generated by Automake.
 
 Files created by @code{AC_CONFIG_FILES}, be they Automake
 @file{Makefile}s or not, are all removed by @samp{make distclean}.
-Their inputs are automatically distributed, except for inputs that
-turn out the be outputs of prior @code{AC_CONFIG_FILES} commands.
+Their inputs are automatically distributed, unless they
+are the output of prior @code{AC_CONFIG_FILES} commands.
 Finally, rebuild rules are generated in the Automake @file{Makefile}
 existing in the subdirectory of the output file, if there is one, or
 in the top-level @file{Makefile} otherwise.
@@ -2671,7 +2731,7 @@ AC_CONFIG_FILES([output:$file],, [file=$file])
 @command{automake} will output rules to clean @file{output}, and
 rebuild it.  However the rebuild rule will not depend on @file{input},
 and this file will not be distributed either.  (You must add
address@hidden = input} to your @file{Makefile} if @file{input} is a
address@hidden = input} to your @file{Makefile.am} if @file{input} is a
 source file.)
 
 Similarly
@@ -2798,7 +2858,7 @@ macro.
 @item AC_CONFIG_HEADERS
 Automake will generate rules to rebuild these headers.  Older versions
 of Automake required the use of @code{AM_CONFIG_HEADER}
-(@pxref{Macros}); this is no longer the case today.
+(@pxref{Macros}); this is no longer the case.
 
 As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
 specification using shell variables will be ignored as far as
@@ -2811,7 +2871,7 @@ part of @samp{make dist}.
 
 As for @code{AC_CONFIG_FILES} (@pxref{Requirements}), parts of the
 specification using shell variables will be ignored as far as cleaning
-and distributing is concerned.  (There is no rebuild rules for links.)
+and distributing is concerned.  (There are no rebuild rules for links.)
 
 @item AC_LIBOBJ
 @itemx AC_LIBSOURCE
@@ -2881,25 +2941,28 @@ If a Lex source file is seen, then this macro must be 
used.
 Autoconf Manual}.
 
 @item AC_REQUIRE_AUX_FILE
address@hidden will ensure each file for which this macro is
-called exists in the aux directory, and will complain otherwise.  It
+For each @code{AC_REQUIRE_AUX_FILE(address@hidden)},
address@hidden will ensure that @address@hidden exists in the
+aux directory, and will complain otherwise.  It
 will also automatically distribute the file.  This macro should be
-used by third-party Autoconf macros that requires some supporting
+used by third-party Autoconf macros that require some supporting
 files in the aux directory specified with @code{AC_CONFIG_AUX_DIR}
 above.  @xref{Input, , Finding @command{configure} Input, autoconf,
 The Autoconf Manual}.
 
 @item AC_SUBST
 The first argument is automatically defined as a variable in each
-generated @file{Makefile.in}.  @xref{Setting Output Variables, , Setting
+generated @file{Makefile.in}, unless @code{AM_SUBST_NOTMAKE} is also
+used for this variable.  @xref{Setting Output Variables, , Setting
 Output Variables, autoconf, The Autoconf Manual}.
 
-If the Autoconf manual says that a macro calls @code{AC_SUBST} for
address@hidden, or defines the output variable @var{var} then @var{var} will
-be defined in each @file{Makefile.in} generated by Automake.
-E.g.@: @code{AC_PATH_XTRA} defines @code{X_CFLAGS} and @code{X_LIBS}, so
-you can use these variables in any @file{Makefile.am} if
address@hidden is called.
+For every substituted variable @var{var}, @command{automake} will add
+a line @address@hidden = @var{value}} to each @file{Makefile.in} file.
+Many Autoconf macros invoke @code{AC_SUBST} to set output variables
+this way, e.g., @code{AC_PATH_XTRA} defines @code{X_CFLAGS} and
address@hidden  Thus, you can access these variables as
address@hidden(X_CFLAGS)} and @code{$(X_LIBS)} in any @file{Makefile.am}
+if @code{AC_PATH_XTRA} is called.
 
 @item AM_C_PROTOTYPES
 This is required when using the obsolete de-ANSI-fication feature; see
@@ -2912,7 +2975,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
@@ -2936,6 +2999,17 @@ generated @file{Makefile.in}s, unless @var{default-mode} 
is
 conditional, which you can use in your own @file{Makefile.am}.
 @xref{maintainer-mode}.
 
address@hidden AM_SUBST_NOTMAKE(@var{var})
+Prevent Automake from defining a variable @var{var}, even if it is
+substituted by @command{config.status}.  Normally, Automake defines a
address@hidden variable for each @command{configure} substitution,
+i.e., for each @code{AC_SUBST(address@hidden)}.  This macro prevents that
+definition from Automake.  If @code{AC_SUBST} has not been called
+for this variable, then @code{AM_SUBST_NOTMAKE} has no effects.
+Preventing variable definitions may be useful for substitution of
+multi-line values, where @address@hidden = @@@var{value}@@} might yield
+unintended results.
+
 @item m4_include
 Files included by @file{configure.ac} using this macro will be
 detected by Automake and automatically distributed.  They will also
@@ -2971,7 +3045,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}.
@@ -3010,16 +3084,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}
@@ -3122,8 +3196,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
@@ -3133,9 +3207,9 @@ directories, in this order:
 
 @table @code
 @item @var{acdir-APIVERSION}
-This is where the @file{.m4} macros distributed with automake itself
-are stored.  @var{APIVERSION} depends on the automake release used;
-for automake 1.6.x, @var{APIVERSION} = @code{1.6}.
+This is where the @file{.m4} macros distributed with Automake itself
+are stored.  @var{APIVERSION} depends on the Automake release used;
+for Automake 1.6.x, @var{APIVERSION} = @code{1.6}.
 
 @item @var{acdir}
 This directory is intended for third party @file{.m4} files, and is
@@ -3143,7 +3217,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
@@ -3154,10 +3228,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
@@ -3169,12 +3243,12 @@ drops the @var{APIVERSION} directory.  For example, if 
one specifies
 @end enumerate
 
 This option, @option{--acdir}, is intended for use by the internal
-automake test suite only; it is not ordinarily needed by end-users.
+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
@@ -3184,7 +3258,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
@@ -3224,7 +3298,7 @@ If the @address@hidden option is used, then 
@command{aclocal}
 will search for the @file{dirlist} file in @var{dir}.  In the
 @samp{--acdir=/opt/private/} example above, @command{aclocal} would look
 for @file{/opt/private/dirlist}.  Again, however, the @option{--acdir}
-option is intended for use by the internal automake test suite only;
+option is intended for use by the internal Automake test suite only;
 @option{--acdir} is not ordinarily needed by end-users.
 
 @file{dirlist} is useful in the following situation: suppose that
@@ -3266,7 +3340,7 @@ using it to work around local system-dependent tool 
installation
 directories.
 
 Similarly, @file{dirlist} can be handy if you have installed a local
-copy Automake on your account and want @command{aclocal} to look for
+copy of Automake in your account and want @command{aclocal} to look for
 macros installed at other places on the system.
 
 
@@ -3354,7 +3428,7 @@ do not require it.
 If you have been directed here by the @command{aclocal} diagnostic but
 are not the maintainer of the implicated macro, you will want to
 contact the maintainer of that macro.  Please make sure you have the
-last version of the macro and that the problem already hasn't been
+latest version of the macro and that the problem hasn't already been
 reported before doing so: people tend to work faster when they aren't
 flooded by mails.
 
@@ -3403,10 +3477,10 @@ the place where Gettext's macros should be installed.  
So even if you
 do not really care about the rebuild rules, you should define
 @code{ACLOCAL_AMFLAGS}.
 
-When @samp{aclocal -I m4} is run, it will build a @file{aclocal.m4}
+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
@@ -3502,7 +3576,7 @@ Normally these serial numbers are completely ignored by
 However when using @command{aclocal}'s @option{--install} feature, these
 serial numbers will modify the way @command{aclocal} selects the
 macros to install in the package: if two files with the same basename
-exists in your search path, and if at least one of them use a
+exist in your search path, and if at least one of them uses a
 @samp{#serial} line, @command{aclocal} will ignore the file that has
 the older @samp{#serial} line (or the file that has none).
 
@@ -3510,7 +3584,7 @@ Note that a serial number applies to a whole M4 file, not 
to any macro
 it contains.  A file can contains multiple macros, but only one
 serial.
 
-Here is a use case that illustrate the use of @option{--install} and
+Here is a use case that illustrates the use of @option{--install} and
 its interaction with serial numbers.  Let's assume we maintain a
 package called MyPackage, the @file{configure.ac} of which requires a
 third-party macro @code{AX_THIRD_PARTY} defined in
@@ -3569,8 +3643,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])}.
 
@@ -3626,7 +3700,7 @@ macros you want to revert, and run @samp{aclocal -I m4 
--install}.
 @command{aclocal} is expected to disappear.  This feature really
 should not be offered by Automake.  Automake should focus on
 generating @file{Makefile}s; dealing with M4 macros really is
-Autoconf's job.  That some people install Automake just to use
+Autoconf's job.  The fact that some people install Automake just to use
 @command{aclocal}, but do not use @command{automake} otherwise is an
 indication of how that feature is misplaced.
 
@@ -3636,7 +3710,7 @@ For instance, it could enforce the @file{m4/}-style 
layout discussed in
 
 We have no idea when and how this will happen.  This has been
 discussed several times in the past, but someone still has to commit
-itself to that non-trivial task.
+to that non-trivial task.
 
 From the user point of view, @command{aclocal}'s removal might turn
 out to be painful.  There is a simple precaution that you may take to
@@ -3676,15 +3750,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
 
@@ -3692,7 +3766,7 @@ Automake ships with several Autoconf macros that you can 
use from your
 @acindex AM_ENABLE_MULTILIB
 This is used when a ``multilib'' library is being built.  The first
 optional argument is the name of the @file{Makefile} being generated; it
-defaults to @samp{Makefile}.  The second option argument is used to find
+defaults to @samp{Makefile}.  The second optional argument is used to find
 the top source directory; it defaults to the empty string (generally
 this should not be used unless you are familiar with the internals).
 @xref{Multilibs}.
@@ -3786,7 +3860,7 @@ choose the assembler for you (by default the C compiler) 
and set
 @acindex AM_PROG_CC_C_O
 @acindex AC_PROG_CC_C_O
 This is like @code{AC_PROG_CC_C_O}, but it generates its results in
-the manner required by automake.  You must use this instead of
+the manner required by Automake.  You must use this instead of
 @code{AC_PROG_CC_C_O} when you need this functionality, that is, when
 using per-target flags or subdir-objects with C sources.
 
@@ -3841,8 +3915,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
 
@@ -3916,8 +3990,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
@@ -3931,7 +4005,7 @@ skip this section!
 @itemx AM_DEP_TRACK
 @itemx AM_OUTPUT_DEPENDENCY_COMMANDS
 These macros are used to implement Automake's automatic dependency
-tracking scheme.  They are called automatically by automake when
+tracking scheme.  They are called automatically by Automake when
 required, and there should be no need to invoke them manually.
 
 @item AM_MAKE_INCLUDE
@@ -3956,14 +4030,14 @@ from @code{AM_INIT_AUTOMAKE}.
 @node Directories
 @chapter Directories
 
-For simple projects that distributes all files in the same directory
+For simple projects that distribute all files in the same directory
 it is enough to have a single @file{Makefile.am} that builds
 everything in place.
 
 In larger projects it is common to organize files in different
 directories, in a tree.  For instance one directory per program, per
 library or per module.  The traditional approach is to build these
-subdirectory recursively: each directory contains its @file{Makefile}
+subdirectories recursively: each directory contains its @file{Makefile}
 (generated from @file{Makefile.am}), and when @command{make} is run
 from the top level directory it enters each subdirectory in turn to
 build its contents.
@@ -4072,6 +4146,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
 
@@ -4088,7 +4170,7 @@ conditionally so that some directory will be omitted from 
the build.
 directories, even those that have been conditionally left out of the
 build.  Recall our example where we may not want to build subdirectory
 @file{opt/}, but yet we want to distribute it?  This is where
address@hidden come into play: @samp{opt} may not appear in
address@hidden comes into play: @samp{opt} may not appear in
 @code{SUBDIRS}, but it must appear in @code{DIST_SUBDIRS}.
 
 Precisely, @code{DIST_SUBDIRS} is used by @samp{make
@@ -4097,14 +4179,15 @@ other recursive rules use @code{SUBDIRS}.
 
 If @code{SUBDIRS} is defined conditionally using Automake
 conditionals, Automake will define @code{DIST_SUBDIRS} automatically
-from the possibles values of @code{SUBDIRS} in all conditions.
+from the possible values of @code{SUBDIRS} in all conditions.
 
 If @code{SUBDIRS} contains @code{AC_SUBST} variables,
 @code{DIST_SUBDIRS} will not be defined correctly because Automake
 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}
 
@@ -4145,7 +4228,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}
 
@@ -4179,10 +4263,11 @@ 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 semantic of @code{DIST_SUBDIRS} is often misunderstood by some
+The semantics of @code{DIST_SUBDIRS} are often misunderstood by some
 users that try to @emph{configure and build} subdirectories
 conditionally.  Here by configuring we mean creating the
 @file{Makefile} (it might also involve running a nested
@@ -4217,13 +4302,13 @@ I.e., the @file{Makefile} must exists or the recursive 
@command{make}
 rules will not be able to process the directory.
 @item Any configured directory must be listed in @code{DIST_SUBDIRS}.
 
-So that the cleaning rule remove the generated @file{Makefile}s.
+So that the cleaning rules remove the generated @file{Makefile}s.
 It would be correct to see @code{DIST_SUBDIRS} as a variable that
 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
@@ -4239,7 +4324,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},
@@ -4248,7 +4333,7 @@ name of a directory appears in @code{SUBDIRS} or 
@code{DIST_SUBDIRS},
 directory has been omitted.  One way to avoid this check is to use the
 @code{AC_SUBST} method to declare conditional directories; since
 @command{automake} does not know the values of @code{AC_SUBST}
-variables it cannot ensure the corresponding directory exist.
+variables it cannot ensure the corresponding directory exists.
 
 @node Alternative
 @section An Alternative Approach to Subdirectories
@@ -4296,7 +4381,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
@@ -4331,7 +4417,7 @@ an otherwise equivalent set of variables without 
@samp{nobase_} prefix.
 
 
 In the GNU Build System, packages can be nested to arbitrary depth.
-This means that a package can embedded other packages with their own
+This means that a package can embed other packages with their own
 @file{configure}, @file{Makefile}s, etc.
 
 These other packages should just appear as subdirectories of their
@@ -4439,7 +4525,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
@@ -4470,7 +4556,7 @@ programs.  Most of the comments about these also apply to 
libraries
 * Program Sources::             Defining program sources
 * Linking::                     Linking with libraries or extra objects
 * Conditional Sources::         Handling conditional sources
-* Conditional Programs::        Building program conditionally
+* Conditional Programs::        Building a program conditionally
 @end menu
 
 @node Program Sources
@@ -4558,9 +4644,8 @@ Sometimes, multiple programs are built in one directory 
but do not share
 the same link-time requirements.  In this case, you can use the
 @address@hidden variable (where @var{prog} is the name of the
 program as it appears in some @code{_PROGRAMS} variable, and usually
-written in lowercase) to override the global @code{LDADD}.  If this
-variable exists for a given program, then that program is not linked
-using @code{LDADD}.
+written in lowercase) to override @code{LDADD}.  If this variable exists
+for a given program, then that program is not linked using @code{LDADD}.
 @vindex maude_LDADD
 
 For instance, in GNU cpio, @code{pax}, @code{cpio} and @code{mt} are
@@ -4643,7 +4728,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
 
@@ -4681,7 +4766,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
@@ -4727,7 +4812,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
@@ -4752,7 +4837,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
@@ -4831,7 +4916,7 @@ variable (@pxref{Program and Library Variables}).
 @cindex Empty libraries
 Be careful when selecting library components conditionally.  Because
 building an empty library is not portable, you should ensure that any
-library contains always at least one object.
+library always contains at least one object.
 
 To use a static library when building a program, add it to
 @code{LDADD} for this program.  In the following example, the program
@@ -5007,7 +5092,7 @@ Here is an example where @code{WANTEDLIBS} is an 
@code{AC_SUBST}ed
 variable set at @file{./configure}-time to either @file{libfoo.la},
 @file{libbar.la}, both, or none.  Although @samp{$(WANTEDLIBS)}
 appears in the @code{lib_LTLIBRARIES}, Automake cannot guess it
-relates to @file{libfoo.la} or @file{libbar.la} by the time it creates
+relates to @file{libfoo.la} or @file{libbar.la} at the time it creates
 the link rule for these two libraries.  Therefore the @option{-rpath}
 argument must be explicitly supplied.
 
@@ -5182,10 +5267,10 @@ mymodule_la_SOURCES = doit.c
 mymodule_la_LDFLAGS = -module
 @end example
 
-Ordinarily, Automake requires that a library's name starts with
+Ordinarily, Automake requires that a library's name start with
 @code{lib}.  However, when building a dynamically loadable module you
 might wish to use a "nonstandard" name.  Automake will not complain
-about such nonstandard name if it knows the library being built is a
+about such nonstandard names if it knows the library being built is a
 libtool module, i.e., if @option{-module} explicitly appears in the
 library's @code{_LDFLAGS} variable (or in the common @code{AM_LDFLAGS}
 variable when no per-library @code{_LDFLAGS} variable is defined).
@@ -5228,19 +5313,21 @@ Libtool Manual} for more options) should appear before 
the mode
 selection on the command line; in @file{Makefile.am}s they should
 be listed in the @address@hidden variable.
 
-If @address@hidden is not defined, the global
address@hidden variable is used instead.
+If @address@hidden is not defined, then the variable
address@hidden is used instead.
 
 These flags are passed to libtool after the @address@hidden
 option computed by Automake (if any), so
address@hidden@var{library}_LIBTOOLFLAGS} (or @code{AM_LIBTOOLFLAGS}) is the
address@hidden@var{library}_LIBTOOLFLAGS} (or @code{AM_LIBTOOLFLAGS}) is a
 good place to override or supplement the @address@hidden
 setting.
 
 The libtool rules also use a @code{LIBTOOLFLAGS} variable that should
 not be set in @file{Makefile.am}: this is a user variable (@pxref{Flag
 Variables Ordering}.  It allows users to run @samp{make
-LIBTOOLFLAGS=--silent}, for instance.
+LIBTOOLFLAGS=--silent}, for instance.  Note that the verbosity of
address@hidden can also be influenced with the Automake
address@hidden option (@pxref{Options}).
 
 
 @node LTLIBOBJS, Libtool Issues, Libtool Flags, A Shared Library
@@ -5268,7 +5355,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}
@@ -5296,6 +5389,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
@@ -5330,7 +5424,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
@@ -5353,7 +5447,7 @@ the issue.
 @node Program and Library Variables
 @section Program and Library Variables
 
-Associated with each program are a collection of variables that can be
+Associated with each program is a collection of variables that can be
 used to modify how that program is built.  There is a similar list of
 such variables for each library.  The canonical name of the program (or
 library) is used as a base for naming these variables.
@@ -5376,7 +5470,7 @@ after the source file, but other factors can change this. 
 If a file in
 the @code{_SOURCES} variable has an unrecognized extension, Automake
 will do one of two things with it.  If a suffix rule exists for turning
 files with the unrecognized extension into @file{.o} files, then
-automake will treat this file as it will any other source file
address@hidden will treat this file as it will any other source file
 (@pxref{Support for Other Languages}).  Otherwise, the file will be
 ignored as though it were a header file.
 
@@ -5467,11 +5561,11 @@ of any library built by your package.  Doing so will 
ensure that
 
 @item maude_LDFLAGS
 This variable is used to pass extra flags to the link step of a program
-or a shared library.  It overrides the global @code{AM_LDFLAGS} variable.
+or a shared library.  It overrides the @code{AM_LDFLAGS} variable.
 
 @item maude_LIBTOOLFLAGS
 This variable is used to pass extra options to @command{libtool}.
-It overrides the global @code{AM_LIBTOOLFLAGS} variable.
+It overrides the @code{AM_LIBTOOLFLAGS} variable.
 These options are output before @command{libtool}'s @address@hidden
 option, so they should not be mode-specific options (those belong to
 the compiler or linker flags).  @xref{Libtool Flags}.
@@ -5480,7 +5574,7 @@ the compiler or linker flags).  @xref{Libtool Flags}.
 It is also occasionally useful to have a target (program or library)
 depend on some other file that is not actually part of that target.
 This can be done using the @code{_DEPENDENCIES} variable.  Each
-targets depends on the contents of such a variable, but no further
+target depends on the contents of such a variable, but no further
 interpretation is done.
 
 Since these dependencies are associated to the link rule used to
@@ -5554,7 +5648,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}.
 
@@ -5601,6 +5695,7 @@ and we recommend avoiding it until you find it is 
required.
 @vindex SOURCES
 @cindex @code{_SOURCES}, default
 @cindex default @code{_SOURCES}
address@hidden AM_DEFAULT_SOURCE_EXT
 
 @code{_SOURCES} variables are used to specify source files of programs
 (@pxref{A Program}), libraries (@pxref{A Library}), and Libtool
@@ -5609,8 +5704,7 @@ libraries (@pxref{A Shared Library}).
 When no such variable is specified for a target, Automake will define
 one itself.  The default is to compile a single C file whose base name
 is the name of the target itself, with any extension replaced by
address@hidden  (Defaulting to C is terrible but we are stuck with it for
-historical reasons.)
address@hidden, which defaults to @file{.c}.
 
 For example if you have the following somewhere in your
 @file{Makefile.am} with no corresponding @code{libfoo_a_SOURCES}:
@@ -5626,26 +5720,30 @@ lib_LIBRARIES = libfoo.a sub/libc++.a
 would be built from @file{sub_libc___a.c}, i.e., the default source
 was the canonized name of the target, with @file{.c} appended.
 We believe the new behavior is more sensible, but for backward
-compatibility automake will use the old name if a file or a rule
-with that name exist.)
+compatibility @command{automake} will use the old name if a file or a rule
+with that name exists and @code{AM_DEFAULT_SOURCE_EXT} is not used.)
 
 @cindex @code{check_PROGRAMS} example
 @vindex check_PROGRAMS
 Default sources are mainly useful in test suites, when building many
-tests programs each from a single source.  For instance, in
+test programs each from a single source.  For instance, in
 
 @example
 check_PROGRAMS = test1 test2 test3
+AM_DEFAULT_SOURCE_EXT = .cpp
 @end example
 
 @noindent
 @file{test1}, @file{test2}, and @file{test3} will be built
-from @file{test1.c}, @file{test2.c}, and @file{test3.c}.
+from @file{test1.cpp}, @file{test2.cpp}, and @file{test3.cpp}.
+Without the last line, they will be built from @file{test1.c},
address@hidden, and @file{test3.c}.
 
 @cindex Libtool modules, default source example
 @cindex default source, Libtool modules example
-Another case where is this convenient is building many Libtool modules
-(@file{moduleN.la}), each defined in its own file (@file{moduleN.c}).
+Another case where this is convenient is building many Libtool modules
+(@address@hidden), each defined in its own file
+(@address@hidden).
 
 @example
 AM_LDFLAGS = -module
@@ -5657,9 +5755,9 @@ lib_LTLIBRARIES = module1.la module2.la module3.la
 Finally, there is one situation where this default source computation
 needs to be avoided: when a target should not be built from sources.
 We already saw such an example in @ref{true}; this happens when all
-the constituents of a target have already been compiled and need just
+the constituents of a target have already been compiled and just need
 to be combined using a @code{_LDADD} variable.  Then it is necessary
-to define an empty @code{_SOURCES} variable, so that automake does not
+to define an empty @code{_SOURCES} variable, so that @command{automake} does 
not
 compute a default.
 
 @example
@@ -5707,7 +5805,9 @@ However there is no need to list the corresponding 
sources in
 automatically adds @samp{$(LIBOBJS)} and @samp{$(ALLOCA)} to the
 dependencies, and it will discover the list of corresponding source
 files automatically (by tracing the invocations of the
address@hidden Autoconf macros).
address@hidden Autoconf macros).  However, if you have already
+defined @samp{*_DEPENDENCIES} explicitly for an unrelated reason, then
+you have to add these variables manually.
 
 These variables are usually used to build a portability library that
 is linked with all the programs of the project.  We now review a
@@ -5753,7 +5853,7 @@ libcompat_a_LIBADD = $(LIBOBJS) $(ALLOCA)
 
 The library can have any name, of course, and anyway it is not going
 to be installed: it just holds the replacement versions of the missing
-or broken functions so we can later link them in.  In many projects
+or broken functions so we can later link them in.  Many projects
 also include extra functions, specific to the project, in that
 library: they are simply added on the @code{_SOURCES} line.
 
@@ -5813,12 +5913,13 @@ 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
-Automake uses for compilations; for instance, you might need to do your
-own compilation in some special cases.
+Automake uses for compilations, and in which order (@pxref{Flag
+Variables Ordering}); for instance, you might need to do your own
+compilation in some special cases.
 
 Some variables are inherited from Autoconf; these are @code{CC},
 @code{CFLAGS}, @code{CPPFLAGS}, @code{DEFS}, @code{LDFLAGS}, and
@@ -6004,7 +6105,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
@@ -6082,11 +6183,11 @@ Any flags to pass to the Objective C compiler.
 The maintainer's variant of @code{OBJCFLAGS}.
 
 @item OBJCCOMPILE
-The command used to actually compile a Objective C source file.  The
+The command used to actually compile an Objective C source file.  The
 file name is appended to form the complete command line.
 
 @item OBJCLINK
-The command used to actually link a Objective C program.
+The command used to actually link an Objective C program.
 @end vtable
 
 
@@ -6100,9 +6201,9 @@ 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 an Unified Parallel C
+A few additional variables are defined when a Unified Parallel C
 source file is seen:
 
 @vtable @code
@@ -6284,7 +6385,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
@@ -6302,8 +6402,8 @@ in the appropriate Fortran 77 intrinsic and run-time 
libraries.
 These extra Fortran 77 linker flags are supplied in the output variable
 @code{FLIBS} by the @code{AC_F77_LIBRARY_LDFLAGS} Autoconf macro
 supplied with newer versions of Autoconf (Autoconf version 2.13 and
-later).  @xref{Fortran 77 Compiler Characteristics, , , autoconf, The
-Autoconf}.
+later).  @xref{Fortran Compiler, , Fortran Compiler Characteristics,
+autoconf, The Autoconf Manual}.
 @end enumerate
 
 If Automake detects that a program or shared library (as mentioned in
@@ -6337,8 +6437,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
@@ -6505,15 +6603,17 @@ the @code{_LDFLAGS} variable for the program.
 @cindex Vala Support
 @cindex Support for Vala
 
-Automake provides support for Vala compilation
-(@uref{http://live.gnome.org/@/Vala}).
+Automake provides initial support for Vala
+(@uref{http://www.vala-project.org/}).
+This requires valac version 0.7.0 or later.
 
 @example
 foo_SOURCES = foo.vala bar.vala zardoc.c
 @end example
 
-Any @file{.vala} file listed in a @code{_SOURCE} variable will be
-compiled into C code by the Vala compiler.
+Any @file{.vala} file listed in a @code{_SOURCES} variable will be
+compiled into C code by the Vala compiler. The generated @file{.c} files are
+distributed. The end user does not need to have a Vala compiler installed.
 
 Automake ships with an Autoconf macro called @code{AM_PROG_VALAC}
 that will locate the Vala compiler and optionally check its version
@@ -6525,7 +6625,7 @@ Try to find a Vala compiler in @env{PATH}. If it is 
found, the variable
 can be requested:
 
 @example
-AM_PROG_VALAC([0.1.3])
+AM_PROG_VALAC([0.7.0])
 @end example
 @end defmac
 
@@ -6541,14 +6641,8 @@ Additional arguments for the Vala compiler.
 @item AM_VALAFLAGS
 The maintainer's variant of @code{VALAFLAGS}.
 
address@hidden PKGNAME
-The pkg-config
-(@uref{http://www.freedesktop.org/@/software/@/pkgconfig/}) and VAPI
-(Vala API definition file) name to use when building Vala based library.
-
 @example
 lib_LTLIBRARIES = libfoo.la
-libfoo_la_PKGNAME = foo-2.0
 libfoo_la_SOURCES = foo.vala
 @end example
 @end vtable
@@ -6629,7 +6723,7 @@ If no directory prefix is given, the files are assumed to 
be in the
 current directory.
 
 Note that automatic de-ANSI-fication will not work when the package is
-being built for a different host architecture.  That is because automake
+being built for a different host architecture.  That is because 
@command{automake}
 currently has no way to build @command{ansi2knr} for the build machine.
 
 @c FIXME: this paragraph might be better moved to an `upgrading' section.
@@ -6724,8 +6818,8 @@ bin_PROGRAMS = liver$(EXEEXT)
 The targets Automake generates are likewise given the @samp{$(EXEEXT)}
 extension.
 
-The variables @code{TESTS}, @code{XFAIL_TESTS} (@pxref{Tests}) are also
-rewritten if it contains filenames that have been declared as programs
+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}.)
 
@@ -6752,11 +6846,11 @@ executable extensions.  For those maintainers, the 
@option{no-exeext}
 option (@pxref{Options}) will disable this feature.  This works in a
 fairly ugly way; if @option{no-exeext} is seen, then the presence of a
 rule for a target named @code{foo} in @file{Makefile.am} will override
-an automake-generated rule for @samp{foo$(EXEEXT)}.  Without
+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
@@ -6807,7 +6901,7 @@ prefix as with other primaries.
 Scripts can be installed in @code{bindir}, @code{sbindir},
 @code{libexecdir}, or @code{pkgdatadir}.
 
-Scripts that need not being installed can be listed in
+Scripts that need not be installed can be listed in
 @code{noinst_SCRIPTS}, and among them, those which are needed only by
 @samp{make check} should go in @code{check_SCRIPTS}.
 
@@ -6835,7 +6929,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
@@ -6849,7 +6943,7 @@ AC_CONFIG_FILES([src/my_script], [chmod +x src/my_script])
 @end example
 
 @noindent
-to build @file{src/my_script} from @file{src/my_script.in}, then an
+to build @file{src/my_script} from @file{src/my_script.in}, then a
 @file{src/Makefile.am} to install this script in @code{$(bindir)} can
 be as simple as
 
@@ -6911,8 +7005,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
@@ -6964,7 +7058,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
@@ -7022,11 +7116,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
@@ -7038,7 +7132,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}).
@@ -7079,7 +7173,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}).
@@ -7094,7 +7188,7 @@ bindir.h: Makefile
         echo '#define bindir "$(bindir)"' >$@@
 @end example
 
-See how @file{bindir.h} get built first:
+See how @file{bindir.h} gets built first:
 
 @example
 % make
@@ -7128,7 +7222,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
@@ -7164,7 +7258,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
@@ -7174,7 +7268,7 @@ Directories, autoconf, The Autoconf Manual}), or by 
processing a
 Autoconf Manual}).
 
 At this point it should be clear that building @file{bindir.h} from
address@hidden work well for this example.  @file{bindir.h} will exist
address@hidden works well for this example.  @file{bindir.h} will exist
 before you build any target, hence will not cause any dependency issue.
 
 The Makefile can be shrunk as follows.  We do not even have to mention
@@ -7187,9 +7281,9 @@ foo_SOURCES = foo.c
 
 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...
+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}
@@ -7209,7 +7303,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.
@@ -7284,7 +7378,7 @@ ELCFILES =
 @code{ELCFILES} is an internal Automake variable that normally lists
 all @file{.elc} files that must be byte-compiled.  Automake defines
 @code{ELCFILES} automatically from @code{lisp_LISP}.  Emptying this
-variable explicitly prevents byte-compilation to occur.
+variable explicitly prevents byte-compilation.
 
 Since Automake 1.8, we now recommend using @code{lisp_DATA} instead.  As
 in
@@ -7309,7 +7403,7 @@ internationalization
 (@pxref{Top, , Introduction, gettext, GNU gettext utilities}).
 
 The @code{gettext} support in Automake requires the addition of one or
-two subdirectories to the package, @file{po} and possibly also @file{intl}.
+two subdirectories to the package: @file{po} and possibly also @file{intl}.
 The latter is needed if @code{AM_GNU_GETTEXT} is not invoked with the
 @samp{external} argument, or if @code{AM_GNU_GETTEXT_INTL_SUBDIR} is used.
 Automake ensures that these directories exist and are mentioned in
@@ -7415,7 +7509,7 @@ that will determine some Python-related directory 
variables (see
 below).  If you have called @code{AM_PATH_PYTHON} from
 @file{configure.ac}, then you may use the variables
 @code{python_PYTHON} or @code{pkgpython_PYTHON} to list Python source
-files in your @file{Makefile.am}, depending where you want your files
+files in your @file{Makefile.am}, depending on where you want your files
 installed (see the definitions of @code{pythondir} and
 @code{pkgpythondir} below).
 
@@ -7438,11 +7532,11 @@ AM_PATH_PYTHON([2.2])
 
 @noindent
 This is fine when Python is an absolute requirement for the package.
-If Python >= 2.2 was only @emph{optional} to the package,
+If Python >= 2.5 was only @emph{optional} to the package,
 @code{AM_PATH_PYTHON} could be called as follows.
 
 @example
-AM_PATH_PYTHON([2.2],, [:])
+AM_PATH_PYTHON([2.5],, [:])
 @end example
 
 @code{AM_PATH_PYTHON} creates the following output variables based on
@@ -7466,18 +7560,18 @@ as follows.
 
 @item PYTHON_VERSION
 The Python version number, in the form @address@hidden
-(e.g., @samp{1.5}).  This is currently the value of
+(e.g., @samp{2.5}).  This is currently the value of
 @samp{sys.version[:3]}.
 
 @item PYTHON_PREFIX
 The string @address@hidden@}}.  This term may be used in future work
 that needs the contents of Python's @samp{sys.prefix}, but general
-consensus is to always use the value from configure.
+consensus is to always use the value from @command{configure}.
 
 @item PYTHON_EXEC_PREFIX
 The string @address@hidden@}}.  This term may be used in future work
 that needs the contents of Python's @samp{sys.exec_prefix}, but general
-consensus is to always use the value from configure.
+consensus is to always use the value from @command{configure}.
 
 @item PYTHON_PLATFORM
 The canonical name used by Python to describe the operating system, as
@@ -7527,7 +7621,7 @@ Currently Automake provides support for Texinfo and man 
pages.
 
 @menu
 * Texinfo::                     Texinfo
-* Man pages::                   Man pages
+* Man Pages::                   Man pages
 @end menu
 
 
@@ -7640,7 +7734,7 @@ the same directory as the @file{Makefile.am} file that 
lists the
 @file{.texi} files.  If you used @code{AC_CONFIG_AUX_DIR} in
 @file{configure.ac} (@pxref{Input, , Finding `configure' Input,
 autoconf, The Autoconf Manual}), then @file{texinfo.tex} is looked for
-there.  In both cases, automake then supplies @file{texinfo.tex} if
+there.  In both cases, @command{automake} then supplies @file{texinfo.tex} if
 @option{--add-missing} is given, and takes care of its distribution.
 However, if you set the @code{TEXINFO_TEX} variable (see below),
 it overrides the location of the file and turns off its installation
@@ -7664,7 +7758,7 @@ use this.  By default, info pages are installed by 
@samp{make
 install}, so running @code{make install-info} is pointless.  This can
 be prevented via the @code{no-installinfo} option.  In this case,
 @file{.info} files are not installed by default, and user must
-request this explicitly using @samp{make install-info}
+request this explicitly using @samp{make install-info}.
 
 The following variables are used by the Texinfo build rules.
 
@@ -7715,7 +7809,7 @@ The name of the command that translates a @file{.texi} 
file into a
 @file{.pdf} file.  This defaults to @samp{$(TEXI2DVI) --pdf --batch}.
 
 @item DVIPS
-The name of the command that build a @file{.ps} file out of a
+The name of the command that builds a @file{.ps} file out of a
 @file{.dvi} file.  This defaults to @samp{dvips}.
 
 @item TEXINFO_TEX
@@ -7732,8 +7826,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
@@ -7824,7 +7918,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
@@ -7836,13 +7931,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.
@@ -7864,11 +7968,12 @@ suppress the base name step.  For example:
 nobase_include_HEADERS = stdio.h sys/types.h
 @end example
 
-Will install @file{stdio.h} in @samp{$(includedir)} and @file{types.h}
address@hidden
+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.
@@ -7879,7 +7984,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
@@ -7912,7 +8018,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
@@ -7928,7 +8035,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
@@ -7961,7 +8069,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}.
@@ -8043,7 +8152,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}
 
@@ -8052,7 +8170,7 @@ We recommend that you follow this same set of heuristics 
in your
 @trindex dist
 The @code{dist} rule in the generated @file{Makefile.in} can be used
 to generate a gzipped @code{tar} file and other flavors of archive for
-distribution.  The files is named based on the @code{PACKAGE} and
+distribution.  The file is named based on the @code{PACKAGE} and
 @code{VERSION} variables defined by @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}); more precisely the gzipped @code{tar} file is named
 @address@hidden@var{version}.tar.gz}.
@@ -8102,7 +8220,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_
@@ -8124,7 +8243,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
 
@@ -8174,7 +8294,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}
@@ -8237,7 +8358,8 @@ following definition instead:
 
 @example
 distcleancheck_listfiles = \
-  find -type f -exec sh -c 'test -f $(srcdir)/@address@hidden || echo 
@address@hidden' ';'
+  find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
+       sh '@address@hidden' ';'
 @end example
 
 The above definition is not the default because it's usually an error if
@@ -8256,7 +8378,7 @@ correctly coded your @code{uninstall}-related rules.
 
 By default, the checking is done by the @code{distuninstallcheck} rule,
 and the list of files in the install tree is generated by
address@hidden(distuninstallcheck_listfiles}) (this is a variable whose value is
address@hidden(distuninstallcheck_listfiles)} (this is a variable whose value is
 a shell command to run that prints the list of files to stdout).
 
 Either of these can be overridden to modify the behavior of
@@ -8268,7 +8390,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:
@@ -8284,14 +8407,20 @@ Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
 @item @code{dist-lzma}
-Generate a lzma tar archive of the distribution.  lzma archives are
-frequently smaller than @command{bzip2}-compressed archives.
+Generate an @samp{lzma} tar archive of the distribution.  @command{lzma}
+archives are frequently smaller than @command{bzip2}-compressed archives.
 @trindex dist-lzma
 
 @item @code{dist-shar}
 Generate a shar archive of the distribution.
 @trindex dist-shar
 
address@hidden @code{dist-xz}
+Generate an @samp{xz} tar archive of the distribution.  @command{xz}
+archives are frequently smaller than @command{bzip2}-compressed archives.
+The @samp{xz} format will soon (early 2009) displace the @samp{lzma} format.
address@hidden dist-xz
+
 @item @code{dist-zip}
 Generate a zip archive of the distribution.
 @trindex dist-zip
@@ -8314,8 +8443,17 @@ default, only the @code{dist-gzip} target is hooked to 
@code{dist}.
 @cindex @code{make check}
 @trindex check
 
-Automake supports two forms of test suites.
+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
@@ -8324,7 +8462,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,
@@ -8350,7 +8489,7 @@ terminal with @samp{AM_COLOR_TESTS=always}.
 @vindex TESTS
 @vindex TESTS_ENVIRONMENT
 The variable @code{TESTS_ENVIRONMENT} can be used to set environment
-variables for the test run; the environment variable @code{srcdir} is
+variables for the test run; the environment variable @env{srcdir} is
 set in the rule.  If all your test programs are scripts, you can also
 set @code{TESTS_ENVIRONMENT} to an invocation of the shell (e.g.
 @samp{$(SHELL) -x} can be useful for debugging the tests), or any other
@@ -8387,6 +8526,214 @@ that @code{check_PROGRAMS} are @emph{not} automatically 
added to
 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 parallel-tests
address@hidden Simple Tests using @samp{parallel-tests}
address@hidden @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
+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
address@hidden (reStructuredText) and @samp{HTML} format, and hard errors
+for exceptional failures.  Similar to the simple test driver,
address@hidden, @code{AM_COLOR_TESTS}, @code{XFAIL_TESTS}, and
+the @code{check_*} variables are honored, and the environment variable
address@hidden is set during test execution.
+
+This test driver is still experimental and may undergo changes in order
+to satisfy additional portability requirements.
+
address@hidden TEST_SUITE_LOG
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
address@hidden and requires a @file{.log} suffix.  This file
+depends upon log files created for each single test program listed in
address@hidden, which in turn contain all output produced by the
+corresponding tests.
+
address@hidden 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
address@hidden, and defaults to @code{TESTS}, with the executable
+extension if any (@pxref{EXEEXT}), as well as any suffix listed in
address@hidden removed, and @file{.log} appended.
address@hidden defaults to @file{.test}.  Results are undefined
+if a test file name ends in several concatenated suffixes.
+
address@hidden _LOG_COMPILE
address@hidden _LOG_COMPILER
address@hidden _LOG_FLAGS
address@hidden LOG_COMPILE
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
address@hidden AM_LOG_FLAGS
+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 all tests without a
+registered extension, the variables @code{LOG_COMPILER},
address@hidden, and @code{LOG_FLAGS} may be used.  For example,
+
address@hidden
+TESTS = foo.pl bar.py baz
+TEST_EXTENSIONS = .pl .py
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -w
+PY_LOG_COMPILER = $(PYTHON)
+AM_PY_LOG_FLAGS = -v
+LOG_COMPILER = ./wrapper-script
+AM_LOG_FLAGS = -d
address@hidden example
+
address@hidden
+will invoke @samp{$(PERL) -w foo.pl}, @samp{$(PYTHON) -v bar.py},
+and @samp{./wrapper-script -d baz} to produce @file{foo.log},
address@hidden, and @file{baz.log}, respectively.  The
address@hidden variable is still expanded before the driver,
+but should be reserved for the user.
+
address@hidden 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.
+However, standard output and standard error of the test are redirected
+to a per-test log file, so that parallel execution does not produce
+intermingled output.  The output from failed tests is collected in the
address@hidden file.  If the variable @samp{VERBOSE} is set, this
+file is output after the summary.  For best results, the tests should be
+verbose by default now.
+
address@hidden mostlyclean
address@hidden check-html
address@hidden RST2HTML
address@hidden TEST_SUITE_HTML
+With @code{make check-html}, the log files may be converted from RST
+(reStructuredText, see @uref{http://docutils.sourceforge.net/@/rst.html})
+to HTML using @samp{RST2HTML}, which defaults to @command{rst2html} or
address@hidden  The variable @samp{TEST_SUITE_HTML} contains the
+set of converted log files.  The log and HTML files are removed upon
address@hidden mostlyclean}.
+
address@hidden DISABLE_HARD_ERRORS
address@hidden Exit status 99, special interpretation
address@hidden hard error
+Even in the presence of expected failures (see @code{XFAIL_TESTS}, there
+may be conditions under which a test outcome needs attention.  For
+example, with test-driven development, you may write tests for features
+that you have not implemented yet, and thus mark these tests as expected
+to fail.  However, you may still be interested in exceptional conditions,
+for example, tests that fail due to a segmentation violation or another
+error that is independent of the feature awaiting implementation.
+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.
+
+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
+specified through usual @command{make} dependencies.  For example, the
+following snippet lets the test named @file{foo-execute.test} depend
+upon completion of the test @file{foo-compile.test}:
+
address@hidden
+TESTS = foo-compile.test foo-execute.test
+foo-execute.log: foo-compile.log
address@hidden example
+
address@hidden
+Please note that this ordering ignores the @emph{results} of required
+tests, thus the test @file{foo-execute.test} is run even if the test
address@hidden failed or was skipped beforehand.
+
address@hidden Unit tests
+The combination of lazy test execution and correct dependencies between
+tests and their sources may be exploited for efficient unit testing
+during development.  To further speed up the edit-compile-test cycle, it
+may even be useful to specify compiled programs in @code{EXTRA_PROGRAMS}
+instead of with @code{check_PROGRAMS}, as the former allows intertwined
+compilation and test execution (but note that @code{EXTRA_PROGRAMS} are
+not cleaned automatically, @pxref{Uniform}).
+
+The variables @code{TESTS} and @code{XFAIL_TESTS} may contain
+conditional parts as well as configure substitutions.  In the latter
+case, however, certain restrictions apply: substituted test names
+must end with a nonempty test suffix like @file{.test}, so that one of
+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 that 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
@@ -8431,6 +8778,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
@@ -8494,7 +8842,7 @@ macros with side effects.
 @code{CONFIG_STATUS_DEPENDENCIES} adds dependencies to the
 @file{config.status} rule, whose effect is to run @file{configure}.
 This variable should therefore carry any non-standard source that may
-be read as a side effect of running configure, like @file{version.sh}
+be read as a side effect of running @command{configure}, like @file{version.sh}
 in the example above.
 
 Speaking of @file{version.sh} scripts, we recommend against them
@@ -8581,13 +8929,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}
@@ -8633,9 +8981,9 @@ ignored in sub-packages of nested packages 
(@pxref{Subpackages}).
 @item @option{no-define}
 @cindex Option, @option{no-define}
 @opindex no-define
-This options is meaningful only when passed as an argument to
+This option is meaningful only when passed as an argument to
 @code{AM_INIT_AUTOMAKE}.  It will prevent the @code{PACKAGE} and
address@hidden variables to be @code{AC_DEFINE}d.
address@hidden variables from being @code{AC_DEFINE}d.
 
 @item @option{no-dependencies}
 @cindex Option, @option{no-dependencies}
@@ -8664,7 +9012,7 @@ Do not hook @code{dist-gzip} to @code{dist}.
 If your @file{Makefile.am} defines a rule for target @code{foo}, it
 will override a rule for a target named @samp{foo$(EXEEXT)}.  This is
 necessary when @code{EXEEXT} is found to be empty.  However, by
-default automake will generate an error for this use.  The
+default @command{automake} will generate an error for this use.  The
 @option{no-exeext} option will disable this error.  This is intended for
 use only where it is known in advance that the package will not be
 ported to Windows, or any other operating system using extensions on
@@ -8701,6 +9049,12 @@ are ordinarily automatically provided by Automake.
 Don't require @file{texinfo.tex}, even if there are texinfo files in
 this directory.
 
address@hidden @option{parallel-tests}
address@hidden Option, @option{parallel-tests}
address@hidden parallel-tests
+Enable test suite driver for @code{TESTS} that can run tests in parallel
+(@pxref{Simple Tests using parallel-tests}, for more information).
+
 @item @option{readme-alpha}
 @cindex Option, @option{readme-alpha}
 @opindex readme-alpha
@@ -8713,6 +9067,46 @@ non-alpha releases.  The second form is
 @address@hidden@address@hidden, where @var{ALPHA} is a
 letter; it should be omitted for non-alpha releases.
 
address@hidden @option{silent-rules}
address@hidden Option, @option{silent-rules}
address@hidden silent-rules
+Enable silent build rules.  This will cause many build rules to output a
+status line of the form
+
address@hidden
+  GEN @var{output-file}
address@hidden example
+
address@hidden
+instead of printing the command that will be executed to update
address@hidden  It will also silence @command{libtool} output.
+
address@hidden @code{V}
+The verbosity can be influenced at @command{make} run time by setting the
+variable @code{V}: @samp{make V=0} is equivalent to @code{V} being unset,
+while @samp{make V=1} will produce verbose output.
+
+For portability to different @command{make} implementations, package authors
+are advised to not set the variable @code{V} inside the @file{Makefile.am}
+file, to allow the user to override the value for subdirectories as well.
+
+The current implementation of this feature relies on a non-POSIX, but in
+practice rather widely supported @file{Makefile} construct of nested
+variable expansion @samp{$(@var{var1}$(V))}.  Do not use the
address@hidden option if your package needs to build with
address@hidden implementations that do not support it.  The
address@hidden option turns off warnings about recursive variable
+expansion, which are in turn enabled by @option{-Wportability}
+(@pxref{Invoking Automake}).
+
address@hidden @code{AM_V_GEN}
address@hidden @code{AM_V_at}
+To extend the silent mode to your own rules, you can use the predefined
+variable @code{AM_V_GEN} as a prefix to commands that should output a
+status line in silent mode, and @code{AM_V_at} as a prefix to commands
+that should not output anything in silent mode.  With @code{V=1}, these
+variables will expand to empty strings.
+
 @item @option{std-options}
 @cindex Options, @option{std-options}
 @cindex @samp{make installcheck}, testing @option{--help} and 
@option{--version}
@@ -8774,7 +9168,7 @@ when generating tarballs with @samp{make dist}.  (The tar 
file created
 is then compressed according to the set of @option{no-dist-gzip},
 @option{dist-bzip2}, @option{dist-lzma} and @option{dist-tarZ} options in use.)
 
-These options must be passed as argument to @code{AM_INIT_AUTOMAKE}
+These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
 Automake will complain if it sees such options in an
 @code{AUTOMAKE_OPTIONS} variable.
@@ -8906,7 +9300,7 @@ Automake will also generate an @code{ID} rule that will 
run
 directory-by-directory basis.
 @trindex id
 
-Finally, Automake also emit rules to support the
+Finally, Automake also emits rules to support the
 @uref{http://www.gnu.org/software/global/, GNU Global Tags program}.
 The @code{GTAGS} rule runs Global Tags and puts the
 result in the top build directory.  The variable @code{GTAGS_ARGS}
@@ -8925,7 +9319,7 @@ It is sometimes useful to introduce a new implicit rule 
to handle a file
 type that Automake does not know about.
 
 For instance, suppose you had a compiler that could compile @file{.foo}
-files to @file{.o} files.  You would simply define an suffix rule for
+files to @file{.o} files.  You would simply define a suffix rule for
 your language:
 
 @example
@@ -8942,14 +9336,14 @@ doit_SOURCES = doit.foo
 @end example
 
 This was the simpler and more common case.  In other cases, you will
-have to help Automake to figure which extensions you are defining your
-suffix rule for.  This usually happens when your extensions does not
+have to help Automake to figure out which extensions you are defining your
+suffix rule for.  This usually happens when your extension does not
 start with a dot.  Then, all you have to do is to put a list of new
 suffixes in the @code{SUFFIXES} variable @strong{before} you define your
 implicit rule.
 
-For instance, the following definition prevents Automake to misinterpret
address@hidden:} as an attempt to transform @file{.idlC} files into
+For instance, the following definition prevents Automake from misinterpreting
+the @samp{.idlC.cpp:} rule as an attempt to transform @file{.idlC} files into
 @file{.cpp} files.
 
 @example
@@ -9016,7 +9410,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
@@ -9033,7 +9444,7 @@ statement) is evaluated when @command{configure} is run.  
Note that you
 must arrange for @emph{every} @code{AM_CONDITIONAL} to be invoked every
 time @command{configure} is run.  If @code{AM_CONDITIONAL} is run
 conditionally (e.g., in a shell @code{if} statement), then the result
-will confuse automake.
+will confuse @command{automake}.
 @end defmac
 
 @cindex @option{--enable-debug}, example
@@ -9122,20 +9533,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
@@ -9162,7 +9561,8 @@ endif
 AM_CPPFLAGS = -DFEATURE_A $(DEBUGFLAGS) -DFEATURE_B
 @end example
 
address@hidden or
address@hidden
+or
 
 @example
 AM_CPPFLAGS = -DFEATURE_A
@@ -9172,6 +9572,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}
 
@@ -9188,6 +9594,14 @@ The files @file{INSTALL}, @file{NEWS}, @file{README}, 
@file{AUTHORS},
 and @file{ChangeLog}, plus one of @file{COPYING.LIB}, @file{COPYING.LESSER}
 or @file{COPYING}, are required at the topmost directory of the package.
 
+If the @option{--add-missing} option is given, @command{automake} will
+add a generic version of the @file{INSTALL} file as well as the
address@hidden file containing the text of the current version of the
+GNU General Public License existing at the time of this Automake release
+(version 3 as this is written, 
@uref{http://www.gnu.org/@/copyleft/@/gpl.html}).
+However, an existing @file{COPYING} file will never be overwritten by
address@hidden
+
 @item
 The options @option{no-installman} and @option{no-installinfo} are
 prohibited.
@@ -9315,7 +9729,7 @@ With some minor exceptions (for example @code{_PROGRAMS} 
variables,
 
 @cindex copying semantics
 
-These copying semantics means that many problems can be worked around
+These copying semantics mean that many problems can be worked around
 by simply adding some @command{make} variables and rules to
 @file{Makefile.am}.  Automake will ignore these additions.
 
@@ -9329,10 +9743,10 @@ different places (@file{Makefile.am}, 
@file{configure.ac}, and
 @command{automake} itself), it is possible to have conflicting
 definitions of rules or variables.  When building @file{Makefile.in}
 the following priorities are respected by @command{automake} to ensure
-the user always have the last word.  User defined variables in
+the user always has the last word.  User defined variables in
 @file{Makefile.am} have priority over variables @code{AC_SUBST}ed from
 @file{configure.ac}, and @code{AC_SUBST}ed variables have priority
-over @command{automake}-defined variables.  As far rules are
+over @command{automake}-defined variables.  As far as rules are
 concerned, a user-defined rule overrides any
 @command{automake}-defined rule for the same target.
 
@@ -9344,10 +9758,10 @@ These overriding semantics make it possible to fine 
tune some default
 settings of Automake, or replace some of its rules.  Overriding
 Automake rules is often inadvisable, particularly in the topmost
 directory of a package with subdirectories.  The @option{-Woverride}
-option (@pxref{Invoking Automake}) comes handy to catch overridden
+option (@pxref{Invoking Automake}) comes in handy to catch overridden
 definitions.
 
-Note that Automake does not make any difference between rules with
+Note that Automake does not make any distinction between rules with
 commands and rules that only specify dependencies.  So it is not
 possible to append new dependencies to an @command{automake}-defined
 target without redefining the entire rule.
@@ -9480,10 +9894,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
@@ -9523,7 +9937,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.
@@ -9605,7 +10019,7 @@ and @samp{@@top_builddir@@} are defined by 
@file{configure} when it
 processes a @file{Makefile} (@pxref{Preset Output Variables, , Preset
 Output Variables, autoconf, The Autoconf Manual}), they are not
 computed by the Makefile like the aforementioned @samp{$(distdir)} and
address@hidden(top_distdir)} variables..
address@hidden(top_distdir)} variables.
 
 It is sometimes inconvenient to modify a third-party @file{Makefile}
 to introduce the above required targets.  For instance, one may want to
@@ -9615,7 +10029,7 @@ versions.
 @cindex @file{GNUmakefile} including @file{Makefile}
 Here are two other ideas.  If GNU make is assumed, one possibility is
 to add to that subdirectory a @file{GNUmakefile} that defines the
-required targets and include the third-party @file{Makefile}.  For
+required targets and includes the third-party @file{Makefile}.  For
 this to work in VPATH builds, @file{GNUmakefile} must lie in the build
 directory; the easiest way to do this is to write a
 @file{GNUmakefile.in} instead, and have it processed with
@@ -9669,7 +10083,7 @@ EXTRA_DIST = subdir/Makefile subdir/program.c ...
 
 Pushing this idea to the extreme, it is also possible to ignore the
 subproject build system and build everything from this proxy
address@hidden  This might sounds very sensible if you need VPATH
address@hidden  This might sound very sensible if you need VPATH
 builds but the subproject does not support them.
 
 @node Distributing
@@ -9686,8 +10100,8 @@ have a special exception allowing you to distribute them 
with your
 package, regardless of the licensing you choose.
 
 
address@hidden API versioning
address@hidden Automake API versioning
address@hidden API Versioning
address@hidden Automake API Versioning
 
 New Automake releases usually include bug fixes and new features.
 Unfortunately they may also introduce new bugs and incompatibilities.
@@ -9696,7 +10110,7 @@ version.
 
 Things get worse when maintaining a large tree of packages, each one
 requiring a different version of Automake.  In the past, this meant that
-any developer (and sometime users) had to install several versions of
+any developer (and sometimes users) had to install several versions of
 Automake in different places, and switch @samp{$PATH} appropriately for
 each package.
 
@@ -9816,11 +10230,11 @@ lists.
 @menu
 * 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
+* Wildcards::                   Why doesn't Automake support wildcards?
+* 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
@@ -9829,7 +10243,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
 
@@ -9850,7 +10264,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
 
@@ -9873,7 +10287,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
 
@@ -9881,7 +10295,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
@@ -9934,20 +10348,20 @@ happen.  CVS's timestamp handling can also let you 
think an
 out-of-date file is up-to-date.
 
 For instance, suppose a developer has modified @file{Makefile.am} and
-has rebuilt @file{Makefile.in}.  He then decide to do a last-minute
+has rebuilt @file{Makefile.in}.  He then decides to do a last-minute
 change to @file{Makefile.am} right before checking in both files
 (without rebuilding @file{Makefile.in} to account for the change).
 
-This last change to @file{Makefile.am} make the copy of
+This last change to @file{Makefile.am} makes the copy of
 @file{Makefile.in} out-of-date.  Since CVS processes files
-alphabetically, when another developer @samp{cvs update} his or her
+alphabetically, when another developer @samp{cvs update}s his or her
 tree, @file{Makefile.in} will happen to be newer than
address@hidden  This other developer will not see
address@hidden  This other developer will not see that
 @file{Makefile.in} is out-of-date.
 
 @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
@@ -9973,7 +10387,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
 
@@ -9991,7 +10405,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
@@ -10008,7 +10422,7 @@ Besides the warning, when a tool is missing, 
@command{missing} will
 attempt to fix timestamps in a way that allows the build to continue.
 For instance, @command{missing} will touch @file{configure} if
 @command{autoconf} is not installed.  When all distributed files are
-kept under CVS, this feature of @command{missing} allows user
+kept under CVS, this feature of @command{missing} allows a user
 @emph{with no maintainer tools} to build a package off CVS, bypassing
 any timestamp inconsistency implied by @samp{cvs update}.
 
@@ -10020,17 +10434,17 @@ 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
 
address@hidden allows to choose whether the so called
address@hidden allows you to choose whether the so called
 "rebuild rules" should be enabled or disabled.  With
 @code{AM_MAINTAINER_MODE([enable])}, they are enabled by default,
 otherwise they are disabled by default.  In the latter case, if
 you have @code{AM_MAINTAINER_MODE} in @file{configure.ac}, and run
 @samp{./configure && make}, then @command{make} will *never* attempt to
-rebuilt @file{configure}, @file{Makefile.in}s, Lex or Yacc outputs, etc.
+rebuild @file{configure}, @file{Makefile.in}s, Lex or Yacc outputs, etc.
 I.e., this disables build rules for files that are usually distributed
 and that users should normally not have to update.
 
@@ -10038,7 +10452,7 @@ The user can override the default setting by passing 
either
 @samp{--enable-maintainer-mode} or @samp{--disable-maintainer-mode}
 to @command{configure}.
 
-People use @code{AM_MAINTAINER_MODE} either because they do want their
+People use @code{AM_MAINTAINER_MODE} either because they do not want their
 users (or themselves) annoyed by timestamps lossage (@pxref{CVS}), or
 because they simply can't stand the rebuild rules and prefer running
 maintainer tools explicitly.
@@ -10050,7 +10464,7 @@ rules that need exotic tools that users may not have 
available.
 Several years ago Fran@,{c}ois Pinard pointed out several arguments
 against this @code{AM_MAINTAINER_MODE} macro.  Most of them relate to
 insecurity.  By removing dependencies you get non-dependable builds:
-change to sources files can have no effect on generated files and this
+changes to sources files can have no effect on generated files and this
 can be very confusing when unnoticed.  He adds that security shouldn't
 be reserved to maintainers (what @option{--enable-maintainer-mode}
 suggests), on the contrary.  If one user has to modify a
@@ -10070,7 +10484,7 @@ and because @command{missing} isn't enough if you have 
the wrong
 version of the tools.
 
 
address@hidden wildcards
address@hidden Wildcards
 @section Why doesn't Automake support wildcards?
 @cindex wildcards
 
@@ -10133,7 +10547,7 @@ generate file lists in @file{Makefile.am} or in separate
 
 Even if you don't care about portability, and are tempted to use
 @samp{$(wildcard ...)} anyway because you target only GNU Make, you
-should know there are many places where Automake need to know exactly
+should know there are many places where Automake needs to know exactly
 which files should be processed.  As Automake doesn't know how to
 expand @samp{$(wildcard ...)}, you cannot use it in these places.
 @samp{$(wildcard ...)} is a black box comparable to @code{AC_SUBST}ed
@@ -10142,8 +10556,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
@@ -10165,7 +10579,7 @@ Portable POSIX file names cannot contain components 
that exceed a
 14-byte limit, but nowadays it's normally safe to assume the
 more-generous @acronym{XOPEN} limit of 255 bytes.  @acronym{POSIX}
 limits file names to 255 bytes (@acronym{XOPEN} allows 1023 bytes),
-but you may want to limit a source tarball to file names to 99 bytes
+but you may want to limit a source tarball to file names of 99 bytes
 to avoid interoperability problems with old versions of @command{tar}.
 
 If you depart from these rules (e.g., by using address@hidden
@@ -10216,8 +10630,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}.
@@ -10242,7 +10656,7 @@ proceed with an example.  Suppose our package contains 
a program for
 which we want to build a man page using @command{help2man}.  GNU
 @command{help2man} produces simple manual pages from the @option{--help}
 and @option{--version} output of other commands (@pxref{Top, , Overview,
-help2man, The Help2man Manual}).  Because we don't to force want our
+help2man, The Help2man Manual}).  Because we don't want to force our
 users to install @command{help2man}, we decide to distribute the
 generated man page using the following setup.
 
@@ -10270,8 +10684,8 @@ Why was @file{foo.1} rebuilt?  Because although 
distributed,
 will always appear to be newer than the distributed @file{foo.1}.
 
 @samp{make distcheck} caught an inconsistency in our package.  Our
-intent was to distribute @file{foo.1} so users do not need installing
address@hidden, however since this our rule causes this file to be
+intent was to distribute @file{foo.1} so users do not need to install
address@hidden, however since this rule causes this file to be
 always rebuilt, users @emph{do} need @command{help2man}.  Either we
 should ensure that @file{foo.1} is not rebuilt by users, or there is
 no point in distributing @file{foo.1}.
@@ -10349,7 +10763,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.
@@ -10376,7 +10791,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}
@@ -10503,7 +10918,7 @@ AM_CPPFLAGS = -DDATADIR=\"$(datadir)\"
 @end example
 
 @noindent
-is all what is needed here if no per-target flags are used.
+is all that is needed here if no per-target flags are used.
 
 You should not add options to these user variables within
 @file{configure} either, for the same reason.  Occasionally you need
@@ -10554,17 +10969,17 @@ 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
 (@pxref{Java}) use @code{JAVACFLAGS} and @code{AM_JAVACFLAGS}.  None
-of these rules supports per-target flags (yet).
+of these rules support per-target flags (yet).
 
 To some extent, even @code{AM_MAKEFLAGS} (@pxref{Subdirectories})
 obeys this naming scheme.  The slight difference is that
@@ -10573,7 +10988,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}),
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.
@@ -10581,15 +10996,15 @@ user counterpart.
 @code{ARFLAGS} (@pxref{A Library}) is usually defined by Automake and
 has neither @code{AM_} nor per-target cousin.
 
-Finally you should not think either that the existence of a per-target
-variable implies that of an @code{AM_} variable or that of a user
+Finally you should not think that the existence of a per-target
+variable implies the existance of an @code{AM_} variable or of a user
 variable.  For instance, the @code{mumble_LDADD} per-target variable
-overrides the global @code{LDADD} variable (which is not a user
+overrides the makefile-wide @code{LDADD} variable (which is not a user
 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
@@ -10615,7 +11030,7 @@ build two different objects: @file{true-generic.o} and
 @command{automake} doesn't actually look whether source files are
 shared to decide if it must rename objects.  It will just rename all
 objects of a target as soon as it sees per-target compilation flags
-are used.
+used.
 
 It's OK to share object files when per-target compilation flags are not
 used.  For instance, @file{true} and @file{false} will both use
@@ -10655,7 +11070,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.
@@ -10694,8 +11109,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
@@ -11027,21 +11442,21 @@ sysconf_DATA = afile
 @noindent
 by default @code{sysconfdir} will be @samp{$(prefix)/etc}, because
 this is what the GNU Standards require.  When such a package is
-installed on a FHS compliant system, the installer will have to set
+installed on an FHS compliant system, the installer will have to set
 @samp{--sysconfdir=/etc}.  As the maintainer of the package you
 should not be concerned by such site policies: use the appropriate
-standard directory variable to install your files so that installer
+standard directory variable to install your files so that the installer
 can easily redefine these variables to match their site conventions.
 
 Installing files that should be used by another package is slightly
 more involved.  Let's take an example and assume you want to install
-shared library that is a Python extension module.  If you ask Python
+a shared library that is a Python extension module.  If you ask Python
 where to install the library, it will answer something like this:
 
 @example
 % @kbd{python -c 'from distutils import sysconfig;
              print sysconfig.get_python_lib(1,0)'}
-/usr/lib/python2.3/site-packages
+/usr/lib/python2.5/site-packages
 @end example
 
 If you indeed use this absolute path to install your shared library,
@@ -11055,7 +11470,7 @@ installation prefix.
 @example
 % @kbd{python -c 'from distutils import sysconfig;
              print sysconfig.get_python_lib(1,0,"address@hidden@}")'}
address@hidden@}/lib/python2.3/site-packages
address@hidden@}/lib/python2.5/site-packages
 @end example
 
 You can also use this new path.  If you do
@@ -11078,7 +11493,7 @@ The @code{AM_PATH_PYTHON} macro uses similar commands 
to define
 
 Of course not all tools are as advanced as Python regarding that
 substitution of @var{prefix}.  So another strategy is to figure the
-part of the of the installation directory that must be preserved.  For
+part of the installation directory that must be preserved.  For
 instance, here is how @code{AM_PATH_LISPDIR} (@pxref{Emacs Lisp})
 computes @samp{$(lispdir)}:
 
@@ -11103,7 +11518,7 @@ the search path of emacs, and then substitutes 
@address@hidden@}} or
 @address@hidden@}} appropriately.
 
 The emacs case looks complicated because it processes a list and
-expect two possible layouts, otherwise it's easy, and the benefit for
+expects two possible layouts, otherwise it's easy, and the benefits for
 non-root users are really worth the extra @command{sed} invocation.
 
 
@@ -11158,7 +11573,7 @@ Autoconf two years before you can guess the rest.
 Several commits follow, and by the end of the day Automake is
 reported to work for GNU fileutils and GNU m4.
 
-The modus operandi is the one that is still used today: variables
+The modus operandi is the one that is still used today: variable
 assignments in @file{Makefile.am} files trigger injections of
 precanned @file{Makefile} fragments into the generated
 @file{Makefile.in}.  The use of @file{Makefile} fragments was inspired
@@ -11269,7 +11684,7 @@ AM_PROGRAMS = foo bar baz
 (@code{AM_PROGRAMS} has since then been renamed to
 @code{EXTRA_PROGRAMS}.)
 
-Similarly scripts, static libraries, and data can built and installed
+Similarly scripts, static libraries, and data can be built and installed
 using the @code{LIBRARIES}, @code{SCRIPTS}, and @code{DATA} variables.
 However @code{LIBRARIES} were treated a bit specially in that Automake
 did automatically supply the @file{lib} and @file{.a} prefixes.
@@ -11289,7 +11704,7 @@ for another purpose, @pxref{Conditional 
Subdirectories}).
 
 @item 1995-11-26 Automake 0.21
 
-In less time that it takes to cook a frozen pizza, Tom rewrites
+In less time than it takes to cook a frozen pizza, Tom rewrites
 Automake using Perl.  At this time Perl 5 is only one year old, and
 Perl 4.036 is in use at many sites.  Supporting several Perl versions
 has been a source of problems through the whole history of Automake.
@@ -11314,7 +11729,7 @@ use today, i.e., @code{bin_PROGRAMS} instead of 
@code{PROGRAMS},
 @code{EXTRA_PROGRAMS} does not exist yet, @code{AM_PROGRAMS} is still
 in use; and @code{TEXINFOS} and @code{MANS} still have no directory
 prefixes.)  Adding support for prefixes like that was one of the major
-ideas in automake; it has lasted pretty well.
+ideas in @command{automake}; it has lasted pretty well.
 
 AutoMake is renamed to Automake (Tom seems to recall it was Fran@,cois
 Pinard's doing).
@@ -11327,8 +11742,8 @@ Pinard's doing).
 @item 1996-01-03 Automake 0.26
 @itemx 1996-01-03 Automake 0.27
 
-Of the many change and suggestions sent by Fran@,cois Pinard and
-included in 0.26, the most important is perhaps the advise that to
+Of the many changes and suggestions sent by Fran@,cois Pinard and
+included in 0.26, perhaps the most important is the advice that to
 ease customization a user rule or variable definition should always
 override an Automake rule or definition.
 
@@ -11341,7 +11756,7 @@ that have been sending fixes.
 
 Automake starts scanning @file{configure.in} for @code{LIBOBJS}
 support.  This is an important step because until this version
-Automake did only know about the @file{Makefile.am}s it processed.
+Automake only knew about the @file{Makefile.am}s it processed.
 @file{configure.in} was Autoconf's world and the link between Autoconf
 and Automake had to be done by the @file{Makefile.am} author.  For
 instance, if @file{config.h} was generated by @file{configure}, it was the
@@ -11374,7 +11789,7 @@ be really helpful later on.
 All the third-party Autoconf macros, written mostly by Fran@,cois
 Pinard (and later Jim Meyering), are distributed in Automake's
 hand-written @file{aclocal.m4} file.  Package maintainers are expected
-to extract the necessary macros from this file.  (In previous version
+to extract the necessary macros from this file.  (In previous versions
 you had to copy and paste them from the manual...)
 
 @item 1996-03-11 Automake 0.31
@@ -11415,7 +11830,7 @@ author (@pxref{maintainer-mode}).
 
 @item 1996-05-28 Automake 1.0
 
-After only six months of heavy development, the automake script is
+After only six months of heavy development, the @command{automake} script is
 3134 lines long, plus 973 lines of @file{Makefile} fragments.  The
 package has 30 pages of documentation, and 38 test cases.
 @file{aclocal.m4} contains 4 macros.
@@ -11484,7 +11899,7 @@ stalled, Automake also becomes a kind of repository for 
such
 third-party macros, even macros completely unrelated to Automake (for
 instance macros that fix broken Autoconf macros).
 
-The 1.2 release contains 20 macros, among which the
+The 1.2 release contains 20 macros, including the
 @code{AM_INIT_AUTOMAKE} macro that simplifies the creation of
 @file{configure.in}.
 
@@ -11515,7 +11930,7 @@ plus 1294 lines of @file{Makefile} fragments.
 @item 1998-04-05 Automake 1.3
 
 This is a small advance compared to 1.2.
-It add support for assembly, and preliminary support for Java.
+It adds support for assembly, and preliminary support for Java.
 
 Perl 5.004_04 is out, but fixes to support Perl 4 are still
 regularly submitted whenever Automake breaks it.
@@ -11525,7 +11940,7 @@ regularly submitted whenever Automake breaks it.
 Sourceware was setup by Jason Molenda to host open source projects.
 
 @item 1998-09-19  Automake CVS repository moved to @code{sourceware.cygnus.com}
address@hidden 1998-10-26  @code{sourceware.cygnus.com} announces it hosts 
Automake
address@hidden 1998-10-26  @code{sourceware.cygnus.com} announces it hosts 
Automake:
 Automake is now hosted on @code{sourceware.cygnus.com}.  It has a
 publicly accessible CVS repository.  This CVS repository is a copy of
 the one Tom was using on his machine, which in turn is based on
@@ -11540,7 +11955,7 @@ announcement that @command{automake} and 
@command{autoconf} had joined
 @command{sourceware} was made on 1998-10-26.  They were among the
 first projects to be hosted there.
 
-The heedful reader will have noticed Automake was exactly 4-year-old
+The heedful reader will have noticed Automake was exactly 4 years old
 on 1998-09-19.
 
 @item 1999-01-05 Ben Elliston releases Autoconf 2.13.
@@ -11551,7 +11966,7 @@ This release adds support for Fortran 77 and for the 
@code{include}
 statement.  Also, @samp{+=} assignments are introduced, but it is
 still quite easy to fool Automake when mixing this with conditionals.
 
-These two releases, Automake 1.4 and Autoconf 2.13 makes a duo that
+These two releases, Automake 1.4 and Autoconf 2.13 make a duo that
 will be used together for years.
 
 @command{automake} is 7228 lines, plus 1591 lines of Makefile
@@ -11619,7 +12034,7 @@ been moved :) -- Alexandre Duret-Lutz
 @end quotation
 
 All these patches were sent to and discussed on
address@hidden@@gnu.org}, so subscribed users were literally drown in
address@hidden@@gnu.org}, so subscribed users were literally drowning in
 technical mails.  Eventually, the @email{automake-patches@@gnu.org}
 mailing list was created in May.
 
@@ -11636,7 +12051,7 @@ One of Akim's goal was moving all these hard-coded 
rules to separate
 Another significant contribution of Akim is the interface with the
 ``trace'' feature of Autoconf.  The way to scan @file{configure.in} at
 this time was to read the file and grep the various macro of interest
-to Automake.  Doing so could break in many unexpected ways; automake
+to Automake.  Doing so could break in many unexpected ways; @command{automake}
 could miss some definition (for instance @samp{AC_SUBST([$1], [$2])}
 where the arguments are known only when M4 is run), or conversely it
 could detect some macro that was not expanded (because it is called
@@ -11688,7 +12103,7 @@ A major and long-awaited release, that comes more than 
two years after
 @item The new dependency tracking scheme that uses @command{depcomp}.
 Aside from the improvement on the dependency tracking itself
 (@pxref{Dependency Tracking Evolution}), this also streamlines the use
-of automake generated @file{Makefile.in}s as the @file{Makefile.in}s
+of @command{automake}-generated @file{Makefile.in}s as the @file{Makefile.in}s
 used during development are now the same as those used in
 distributions.  Before that the @file{Makefile.in}s generated for
 maintainers required GNU @command{make} and GCC, they were different
@@ -11705,7 +12120,7 @@ prefixes.
 @item Perl 4 support is finally dropped.
 @end itemize
 
-1.5 did broke several packages that worked with 1.4.  Enough so that
+1.5 did break several packages that worked with 1.4.  Enough so that
 Linux distributions could not easily install the new Automake version
 without breaking many of the packages for which they had to run
 @command{automake}.
@@ -11729,7 +12144,7 @@ facing similar troubles, for similar reasons.
 @item 2002-03-05 Automake 1.6
 
 This release introduced versioned installation (@pxref{API
-versioning}).  This was mainly pushed by Havoc Pennington, taking the
+Versioning}).  This was mainly pushed by Havoc Pennington, taking the
 GNOME source tree as motive: due to incompatibilities between the
 autotools it's impossible for the GNOME packages to switch to Autoconf
 2.53 and Automake 1.5 all at once, so they are currently stuck with
@@ -11742,10 +12157,10 @@ scheme implies maintaining a bug-fix branch in 
addition to the
 development trunk, which means more work from the maintainer, but
 providing regular bug-fix releases proved to be really worthwhile.
 
-Like 1.5, 1.6 also introduced a bunch of incompatibilities, meant or
+Like 1.5, 1.6 also introduced a bunch of incompatibilities, intentional or
 not.  Perhaps the more annoying was the dependence on the newly
 released Autoconf 2.53.  Autoconf seemed to have stabilized enough
-since its explosive 2.50 release, and included changes required to fix
+since its explosive 2.50 release and included changes required to fix
 some bugs in Automake.  In order to upgrade to Automake 1.6, people
 now had to upgrade Autoconf too; for some packages it was no picnic.
 
@@ -11804,7 +12219,7 @@ Many bug-fix releases.  1.7 lasted because the 
development version
 Episode 49, `Repercussions', in the third season of the `Alias' TV
 show is first aired.
 
-Marshall, one of the character, is working on a computer virus that he
+Marshall, one of the characters, is working on a computer virus that he
 has to modify before it gets into the wrong hands or something like
 that.  The screenshots you see do not show any program code, they show
 a @file{Makefile.in} @code{generated by automake}...
@@ -11878,7 +12293,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
@@ -11937,6 +12362,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
 
@@ -11986,6 +12412,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
 
@@ -12050,7 +12477,7 @@ Java.)  This problem is easy to fix, by modifying 
dependency
 generators to record every probe, instead of every successful open.
 
 @item
-Since automake generates dependencies as a side effect of compilation,
+Since Automake generates dependencies as a side effect of compilation,
 there is a bootstrapping problem when header files are generated by
 running a program.  The problem is that, the first time the build is
 done, there is no way by default to know that the headers are
@@ -12086,6 +12513,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
@@ -12118,6 +12546,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
@@ -12129,7 +12558,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
@@ -12152,18 +12582,19 @@ The number of lines of the @command{aclocal} script.
 @item pm
 The number of lines of the @command{Perl} supporting modules.
 @item @file{*.am}
-The number of lines of the @file{Makefile} fragments.  The number in 
parenthesis
-is the number of files.
+The number of lines of the @file{Makefile} fragments.  The number in
+parentheses is the number of files.
 @item m4
 The number of lines (and files) of Autoconf macros.
 @item doc
 The number of pages of the documentation (the Postscript version).
 @item t
-The number of test cases in the test suite.
+The number of test cases in the test suite.  Of those, the number in
+parentheses is the number of generated test cases.
 @end table
 
address@hidden {8888-88-88} {8.8-p8} {8888} {8888} {8888} {8888 (88)} {8888 
(88)} {888} {888}
address@hidden Date   @tab Rel @tab am @tab acl @tab pm @tab @file{*.am} @tab 
m4 @tab doc @tab t
address@hidden {8888-88-88} {8.8-p8} {8888} {8888} {8888} {8888 (88)} {8888 
(88)} {888} {888 (88)}
address@hidden Date   @tab Rel    @tab   am @tab acl @tab   pm @tab @file{*.am} 
@tab m4 @tab doc @tab t
 @item 1994-09-19 @tab CVS    @tab  141 @tab     @tab      @tab  299 (24) @tab  
         @tab     @tab
 @item 1994-11-05 @tab CVS    @tab  208 @tab     @tab      @tab  332 (28) @tab  
         @tab     @tab
 @item 1995-11-23 @tab 0.20   @tab  533 @tab     @tab      @tab  458 (35) @tab  
         @tab   9 @tab
@@ -12219,6 +12650,8 @@ The number of test cases in the test suite.
 @item 2005-02-13 @tab 1.9.5  @tab 7523 @tab 719 @tab 7859 @tab 3373 (40) @tab 
1453 (32) @tab 142 @tab 562
 @item 2005-07-10 @tab 1.9.6  @tab 7539 @tab 699 @tab 7867 @tab 3400 (40) @tab 
1453 (32) @tab 144 @tab 570
 @item 2006-10-15 @tab 1.10   @tab 7859 @tab 1072 @tab 8024 @tab 3512 (40) @tab 
1496 (34) @tab 172 @tab 604
address@hidden 2008-01-19 @tab 1.10.1 @tab 7870 @tab 1089 @tab 8025 @tab 3520 
(40) @tab 1499 (34) @tab 173 @tab 617
address@hidden 2009-03-29 @tab 1.10b  @tab 8556 @tab 1092 @tab 8281 @tab 4106 
(41) @tab 1608 (35) @tab 178 @tab 720 (20)
 @end multitable
 
 
@@ -12232,6 +12665,8 @@ The number of test cases in the test suite.
 * GNU Free Documentation License::  License for copying this manual
 @end menu
 
address@hidden GNU Free Documentation License
address@hidden GNU Free Documentation License
 @include fdl.texi
 
 @page
@@ -12304,7 +12739,7 @@ The number of test cases in the test suite.
 @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
@@ -12340,4 +12775,4 @@ The number of test cases in the test suite.
 @c  LocalWords:  LTALLOCA MALLOC malloc memcmp strdup alloca libcompat xyz DFOO
 @c  LocalWords:  unprefixed buildable preprocessed DBAZ DDATADIR WARNINGCFLAGS
 @c  LocalWords:  LIBFOOCFLAGS LIBFOOLDFLAGS ftable testSubDir obj LIBTOOLFLAGS
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzma
address@hidden  LocalWords:  barexec Pinard's automatize initialize lzma xz
diff --git a/doc/fdl.texi b/doc/fdl.texi
index fe78df8..8805f1a 100644
--- a/doc/fdl.texi
+++ b/doc/fdl.texi
@@ -1,13 +1,12 @@
address@hidden The GNU Free Documentation License.
address@hidden Version 1.3, 3 November 2008
 
address@hidden GNU Free Documentation License
address@hidden GNU Free Documentation License
-
address@hidden FDL, GNU Free Documentation License
address@hidden Version 1.2, November 2002
address@hidden This file is intended to be included within another document,
address@hidden hence no sectioning command or @node.
 
 @display
-Copyright @copyright{} 2000,2001,2002 Free Software Foundation, Inc.
-51 Franklin St, Fifth Floor, Boston, MA  02110-1301, USA
+Copyright @copyright{} 2000, 2001, 2002, 2007, 2008 Free Software Foundation, 
Inc.
address@hidden://fsf.org/}
 
 Everyone is permitted to copy and distribute verbatim copies
 of this license document, but changing it is not allowed.
@@ -112,6 +111,9 @@ formats which do not have any title page as such, ``Title 
Page'' means
 the text near the most prominent appearance of the work's title,
 preceding the beginning of the body of the text.
 
+The ``publisher'' means any person or entity that distributes copies
+of the Document to the public.
+
 A section ``Entitled XYZ'' means a named subunit of the Document whose
 title either is precisely XYZ or contains XYZ in parentheses following
 text that translates XYZ in another language.  (Here XYZ stands for a
@@ -380,13 +382,30 @@ title.
 @item
 TERMINATION
 
-You may not copy, modify, sublicense, or distribute the Document except
-as expressly provided for under this License.  Any other attempt to
-copy, modify, sublicense or distribute the Document is void, and will
-automatically terminate your rights under this License.  However,
-parties who have received copies, or rights, from you under this
-License will not have their licenses terminated so long as such
-parties remain in full compliance.
+You may not copy, modify, sublicense, or distribute the Document
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense, or distribute it is void, and
+will automatically terminate your rights under this License.
+
+However, if you cease all violation of this License, then your license
+from a particular copyright holder is reinstated (a) provisionally,
+unless and until the copyright holder explicitly and finally
+terminates your license, and (b) permanently, if the copyright holder
+fails to notify you of the violation by some reasonable means prior to
+60 days after the cessation.
+
+Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License.  If your rights have been terminated and not permanently
+reinstated, receipt of a copy of some or all of the same material does
+not give you any rights to use it.
 
 @item
 FUTURE REVISIONS OF THIS LICENSE
@@ -404,11 +423,46 @@ following the terms and conditions either of that 
specified version or
 of any later version that has been published (not as a draft) by the
 Free Software Foundation.  If the Document does not specify a version
 number of this License, you may choose any version ever published (not
-as a draft) by the Free Software Foundation.
+as a draft) by the Free Software Foundation.  If the Document
+specifies that a proxy can decide which future versions of this
+License can be used, that proxy's public statement of acceptance of a
+version permanently authorizes you to choose that version for the
+Document.
+
address@hidden
+RELICENSING
+
+``Massive Multiauthor Collaboration Site'' (or ``MMC Site'') means any
+World Wide Web server that publishes copyrightable works and also
+provides prominent facilities for anybody to edit those works.  A
+public wiki that anybody can edit is an example of such a server.  A
+``Massive Multiauthor Collaboration'' (or ``MMC'') contained in the
+site means any set of copyrightable works thus published on the MMC
+site.
+
+``CC-BY-SA'' means the Creative Commons Attribution-Share Alike 3.0
+license published by Creative Commons Corporation, a not-for-profit
+corporation with a principal place of business in San Francisco,
+California, as well as future copyleft versions of that license
+published by that same organization.
+
+``Incorporate'' means to publish or republish a Document, in whole or
+in part, as part of another Document.
+
+An MMC is ``eligible for relicensing'' if it is licensed under this
+License, and if all works that were first published under this License
+somewhere other than this MMC, and subsequently incorporated in whole
+or in part into the MMC, (1) had no cover texts or invariant sections,
+and (2) were thus incorporated prior to November 1, 2008.
+
+The operator of an MMC Site may republish an MMC contained in the site
+under CC-BY-SA on the same site at any time before August 1, 2009,
+provided the MMC is eligible for relicensing.
+
 @end enumerate
 
 @page
address@hidden ADDENDUM: How to use this License for your documents
address@hidden ADDENDUM: How to use this License for your documents
 
 To use this License in a document you have written, include a copy of
 the License in the document and put the following copyright and
@@ -418,7 +472,7 @@ license notices just after the title page:
 @group
   Copyright (C)  @var{year}  @var{your name}.
   Permission is granted to copy, distribute and/or modify this document
-  under the terms of the GNU Free Documentation License, Version 1.2
+  under the terms of the GNU Free Documentation License, Version 1.3
   or any later version published by the Free Software Foundation;
   with no Invariant Sections, no Front-Cover Texts, and no Back-Cover
   Texts.  A copy of the license is included in the section entitled ``GNU
@@ -427,7 +481,7 @@ license notices just after the title page:
 @end smallexample
 
 If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
-replace the ``with...Texts.'' line with this:
+replace the address@hidden'' line with this:
 
 @smallexample
 @group
diff --git a/lib/Automake/ChannelDefs.pm b/lib/Automake/ChannelDefs.pm
index 898b1ea..436a904 100644
--- a/lib/Automake/ChannelDefs.pm
+++ b/lib/Automake/ChannelDefs.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2006, 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,6 +15,15 @@
 
 package Automake::ChannelDefs;
 
+use Automake::Config;
+BEGIN
+{
+  if ($perl_threads)
+    {
+      require threads;
+      import threads;
+    }
+}
 use Automake::Channels;
 
 =head1 NAME
@@ -129,7 +138,7 @@ Informative messages.
 # Do not forget to update &usage and the manual
 # if you add or change a warning channel.
 
-register_channel 'fatal', type => 'fatal';
+register_channel 'fatal', type => 'fatal', uniq_part => UP_NONE, ordered => 0;
 register_channel 'error', type => 'error';
 register_channel 'error-gnu', type => 'error';
 register_channel 'error-gnu/warn', type => 'error';
@@ -138,16 +147,19 @@ register_channel 'automake', type => 'fatal', backtrace 
=> 1,
   header => ("####################\n" .
             "## Internal Error ##\n" .
             "####################\n"),
-  footer => "\nPlease contact <address@hidden>.";
+  footer => "\nPlease contact <address@hidden>.",
+  uniq_part => UP_NONE, ordered => 0;
 
 register_channel 'gnu', type => 'warning';
 register_channel 'obsolete', type => 'warning', silent => 1;
 register_channel 'override', type => 'warning', silent => 1;
 register_channel 'portability', type => 'warning', silent => 1;
+register_channel 'portability-recursive', type => 'warning', silent => 1;
 register_channel 'syntax', type => 'warning';
 register_channel 'unsupported', type => 'warning';
 
-register_channel 'verb', type => 'debug', silent => 1;
+register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
+  ordered => 0;
 register_channel 'note', type => 'debug', silent => 0;
 
 =head2 FUNCTIONS
@@ -226,6 +238,8 @@ C<--verbose> messages.
 sub verb ($;%)
 {
   my ($msg, %opts) = @_;
+  $msg = "thread " . threads->tid . ": " . $msg
+    if $perl_threads;
   msg 'verb', '', $msg, %opts;
 }
 
@@ -267,6 +281,8 @@ sub switch_warning ($)
   elsif (channel_type ($cat) eq 'warning')
     {
       setup_channel $cat, silent => $has_no;
+      setup_channel 'portability-recursive', silent => $has_no
+        if $cat eq 'portability';
     }
   else
     {
diff --git a/lib/Automake/Channels.pm b/lib/Automake/Channels.pm
index 6dc4fa3..6b79b4f 100644
--- a/lib/Automake/Channels.pm
+++ b/lib/Automake/Channels.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006, 2008 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
@@ -43,6 +43,13 @@ Automake::Channels - support functions for error and warning 
management
   # Turn on all channels of type 'warning'.
   setup_channel_type 'warning', silent => 0;
 
+  # Redirect all channels to push messages on a Thread::Queue using
+  # the specified serialization key.
+  setup_channel_queue $queue, $key;
+
+  # Output a message pending in a Thread::Queue.
+  pop_channel_queue $queue;
+
   # Treat all warnings as errors.
   $warnings_are_errors = 1;
 
@@ -74,6 +81,7 @@ use vars qw (@ISA @EXPORT %channels $me);
              &setup_channel &setup_channel_type
              &dup_channel_setup &drop_channel_setup
              &buffer_messages &flush_messages
+             &setup_channel_queue &pop_channel_queue
              US_GLOBAL US_LOCAL
              UP_NONE UP_TEXT UP_LOC_TEXT);
 
@@ -173,6 +181,11 @@ The file where the error should be output.
 Whether the channel should be silent.  Use this do disable a
 category of warning, for instance.
 
+=item C<ordered =E<gt> 1>
+
+Whether, with multi-threaded execution, the message should be queued
+for ordered output.
+
 =item C<uniq_part =E<gt> UP_LOC_TEXT>
 
 The part of the message subject to duplicate filtering.  See the
@@ -252,6 +265,9 @@ use vars qw (%_default_options %_global_duplicate_messages
    exit_code => 1,
    file => \*STDERR,
    silent => 0,
+   ordered => 1,
+   queue => 0,
+   queue_key => undef,
    uniq_scope => US_LOCAL,
    uniq_part => UP_LOC_TEXT,
    header => '',
@@ -323,6 +339,13 @@ sub _merge_options (\%%)
          confess "unknown option `$_'";
        }
     }
+  if ($hash->{'ordered'})
+    {
+      confess "fatal messages cannot be ordered"
+       if $hash->{'type'} eq 'fatal';
+      confess "backtrace cannot be output on ordered messages"
+       if $hash->{'backtrace'};
+    }
 }
 
 =item C<register_channel ($name, [%options])>
@@ -403,6 +426,63 @@ sub _format_message ($$%)
   return $msg;
 }
 
+# _enqueue ($QUEUE, $KEY, $UNIQ_SCOPE, $TO_FILTER, $MSG, $FILE)
+# ------------------------------------------------------------
+# Push message on a queue, to be processed by another thread.
+sub _enqueue ($$$$$$)
+{
+  my ($queue, $key, $uniq_scope, $to_filter, $msg, $file) = @_;
+  $queue->enqueue ($key, $msg, $to_filter, $uniq_scope);
+  confess "message queuing works only for STDERR"
+    if $file ne \*STDERR;
+}
+
+# _dequeue ($QUEUE)
+# -----------------
+# Pop a message from a queue, and print, similarly to how
+# _print_message would do it.  Return 0 if the queue is
+# empty.  Note that the key has already been dequeued.
+sub _dequeue ($)
+{
+  my ($queue) = @_;
+  my $msg = $queue->dequeue || return 0;
+  my $to_filter = $queue->dequeue;
+  my $uniq_scope = $queue->dequeue;
+  my $file = \*STDERR;
+
+  if ($to_filter ne '')
+    {
+      # Do we want local or global uniqueness?
+      my $dups;
+      if ($uniq_scope == US_LOCAL)
+       {
+         $dups = \%_local_duplicate_messages;
+       }
+      elsif ($uniq_scope == US_GLOBAL)
+       {
+         $dups = \%_global_duplicate_messages;
+       }
+      else
+       {
+         confess "unknown value for uniq_scope: " . $uniq_scope;
+       }
+
+      # Update the hash of messages.
+      if (exists $dups->{$to_filter})
+       {
+         ++$dups->{$to_filter};
+         return 1;
+       }
+      else
+       {
+         $dups->{$to_filter} = 0;
+       }
+    }
+  print $file $msg;
+  return 1;
+}
+
+
 # Store partial messages here. (See the 'partial' option.)
 use vars qw ($partial);
 $partial = '';
@@ -431,10 +511,10 @@ sub _print_message ($$%)
     }
 
   # Check for duplicate message if requested.
+  my $to_filter;
   if ($opts{'uniq_part'} ne UP_NONE)
     {
       # Which part of the error should we match?
-      my $to_filter;
       if ($opts{'uniq_part'} eq UP_TEXT)
        {
          $to_filter = $message;
@@ -475,7 +555,15 @@ sub _print_message ($$%)
        }
     }
   my $file = $opts{'file'};
-  print $file $msg;
+  if ($opts{'ordered'} && $opts{'queue'})
+    {
+      _enqueue ($opts{'queue'}, $opts{'queue_key'}, $opts{'uniq_scope'},
+               $to_filter, $msg, $file);
+    }
+  else
+    {
+      print $file $msg;
+    }
   return 1;
 }
 
@@ -525,7 +613,7 @@ both print
 =cut
 
 
-use vars qw (@backlog %buffering @chain);
+use vars qw (@backlog %buffering);
 
 # See buffer_messages() and flush_messages() below.
 %buffering = ();       # The map of channel types to buffer.
@@ -566,7 +654,12 @@ sub msg ($$;$%)
 
       # Die on fatal messages.
       confess if $opts{'backtrace'};
-      exit $exit_code if $opts{'type'} eq 'fatal';
+      if ($opts{'type'} eq 'fatal')
+        {
+         # flush messages explicitly here, needed in worker threads.
+         STDERR->flush;
+         exit $exit_code;
+       }
     }
 }
 
@@ -675,6 +768,33 @@ sub flush_messages ()
   @backlog = ();
 }
 
+=item C<setup_channel_queue ($queue, $key)>
+
+Set the queue to fill for each channel that is ordered,
+and the key to use for serialization.
+
+=cut
+sub setup_channel_queue ($$)
+{
+  my ($queue, $key) = @_;
+  foreach my $channel (keys %channels)
+    {
+      setup_channel $channel, queue => $queue, queue_key => $key
+        if $channels{$channel}{'ordered'};
+    }
+}
+
+=item C<pop_channel_queue ($queue)>
+
+pop a message off the $queue; the key has already been popped.
+
+=cut
+sub pop_channel_queue ($)
+{
+  my ($queue) = @_;
+  return _dequeue ($queue);
+}
+
 =back
 
 =head1 SEE ALSO
diff --git a/lib/Automake/Config.in b/lib/Automake/Config.in
index 94caf3e..9c24a57 100644
--- a/lib/Automake/Config.in
+++ b/lib/Automake/Config.in
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.      -*- Perl -*-
+# Copyright (C) 2003, 2004, 2008  Free Software Foundation, Inc.  -*- Perl -*-
 # @configure_input@
 
 # This program is free software; you can redistribute it and/or modify
@@ -21,7 +21,7 @@ use 5.006;
 require Exporter;
 
 our @ISA = qw (Exporter);
-our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir);
+our @EXPORT = qw ($APIVERSION $PACKAGE $VERSION $libdir $perl_threads);
 
 # Parameters set by configure.  Not to be changed.  NOTE: assign
 # VERSION as string so that e.g. version 0.30 will print correctly.
@@ -29,6 +29,7 @@ our $APIVERSION = '@APIVERSION@';
 our $PACKAGE = '@PACKAGE@';
 our $VERSION = '@VERSION@';
 our $libdir = '@datadir@/@address@hidden@APIVERSION@';
+our $perl_threads = @PERL_THREADS@;
 
 1;;
 
diff --git a/lib/Automake/DisjConditions.pm b/lib/Automake/DisjConditions.pm
index 1f09c0f..ae759e2 100644
--- a/lib/Automake/DisjConditions.pm
+++ b/lib/Automake/DisjConditions.pm
@@ -192,6 +192,26 @@ sub new ($;@)
   return $self;
 }
 
+
+=item C<CLONE>
+
+Internal special subroutine to fix up the self hashes in
+C<%_disjcondition_singletons> upon thread creation.  C<CLONE> is invoked
+automatically with ithreads from Perl 5.7.2 or later, so if you use this
+module with earlier versions of Perl, it is not thread-safe.
+
+=cut
+
+sub CLONE
+{
+  foreach my $self (values %_disjcondition_singletons)
+    {
+      my %h = map { $_ => $_ } @{$self->{'conds'}};
+      $self->{'hash'} = \%h;
+    }
+}
+
+
 =item C<@conds = $set-E<gt>conds>
 
 Return the list of C<Condition> objects involved in C<$set>.
diff --git a/lib/Automake/FileUtils.pm b/lib/Automake/FileUtils.pm
index 2200be0..facde3f 100644
--- a/lib/Automake/FileUtils.pm
+++ b/lib/Automake/FileUtils.pm
@@ -47,7 +47,9 @@ use vars qw (@ISA @EXPORT);
 @EXPORT = qw (&open_quote &contents
              &find_file &mtime
              &update_file &up_to_date_p
-             &xsystem &xsystem_hint &xqx &dir_has_case_matching_file 
&reset_dir_cache);
+             &xsystem &xsystem_hint &xqx
+             &dir_has_case_matching_file &reset_dir_cache
+             &set_dir_cache_file);
 
 
 =item C<open_quote ($file_name)>
@@ -416,6 +418,19 @@ sub reset_dir_cache ($)
   delete $_directory_cache{$_[0]};
 }
 
+=item C<set_dir_cache_file ($dirname, $file_name)>
+
+State that C<$dirname> contains C<$file_name> now.
+
+=cut
+
+sub set_dir_cache_file ($$)
+{
+  my ($dirname, $file_name) = @_;
+  $_directory_cache{$dirname}{$file_name} = 1
+    if exists $_directory_cache{$dirname};
+}
+
 1; # for require
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
diff --git a/lib/Automake/Location.pm b/lib/Automake/Location.pm
index 33f526a..90534f1 100644
--- a/lib/Automake/Location.pm
+++ b/lib/Automake/Location.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008  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
@@ -57,6 +57,13 @@ Automake::Location - a class for location tracking, with a 
stack of contexts
   # that would otherwise be modified.
   my $where_copy = $where->clone;
 
+  # Serialize a Location object (for passing through a thread queue,
+  # for example)
+  my @array = $where->serialize ();
+
+  # De-serialize: recreate a Location object from a queue.
+  my $where = new Automake::Location::deserialize ($queue);
+
 =head1 DESCRIPTION
 
 C<Location> objects are used to keep track of locations in Automake,
@@ -145,6 +152,33 @@ sub dump ($)
   return $res;
 }
 
+sub serialize ($)
+{
+  my ($self) = @_;
+  my @serial = ();
+  push @serial, $self->get;
+  my @contexts = $self->get_contexts;
+  for my $pair (@contexts)
+    {
+      push @serial, @{$pair};
+    }
+  push @serial, undef;
+  return @serial;
+}
+
+sub deserialize ($)
+{
+  my ($queue) = @_;
+  my $position = $queue->dequeue ();
+  my $self = new Automake::Location $position;
+  while (my $position = $queue->dequeue ())
+    {
+      my $context = $queue->dequeue ();
+      push @{$self->{'contexts'}}, [$position, $context];
+    }
+  return $self;
+}
+
 =head1 SEE ALSO
 
 L<Automake::Channels>
diff --git a/lib/Automake/Makefile.am b/lib/Automake/Makefile.am
index e68c901..ca5471c 100644
--- a/lib/Automake/Makefile.am
+++ b/lib/Automake/Makefile.am
@@ -1,6 +1,6 @@
 ## Process this file with automake to create Makefile.in
 
-## Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2008  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
@@ -51,6 +51,7 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
   -e 's,address@hidden@],$(APIVERSION),g' \
   -e 's,address@hidden@],$(PACKAGE),g' \
   -e 's,address@hidden@],$(PERL),g' \
+  -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e "s,address@hidden@],Generated from $$in.in; do not edit by hand.,g" \
diff --git a/lib/Automake/Makefile.in b/lib/Automake/Makefile.in
index 7a20ca3..f649390 100644
--- a/lib/Automake/Makefile.in
+++ b/lib/Automake/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -83,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)
@@ -148,6 +152,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -158,6 +163,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -229,6 +235,7 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
   -e 's,address@hidden@],$(APIVERSION),g' \
   -e 's,address@hidden@],$(PACKAGE),g' \
   -e 's,address@hidden@],$(PERL),g' \
+  -e 's,address@hidden@],$(PERL_THREADS),g' \
   -e 's,address@hidden@],$(SHELL),g' \
   -e 's,address@hidden@],$(VERSION),g' \
   -e "s,address@hidden@],Generated from $$in.in; do not edit by hand.,g" \
@@ -247,9 +254,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Automake/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Automake/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  lib/Automake/Makefile
+         $(AUTOMAKE) --gnu lib/Automake/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -271,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) | \
@@ -282,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 ")"; \
@@ -290,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) | \
@@ -301,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 ")"; \
@@ -458,27 +467,37 @@ 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" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: distdir)"; \
            ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
@@ -537,6 +556,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -545,18 +566,28 @@ install-data-am: install-dist_perllibDATA 
install-nodist_perllibDATA
 
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-recursive
@@ -577,8 +608,8 @@ ps-am:
 
 uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am check check-am clean clean-generic ctags \
diff --git a/lib/Automake/Options.pm b/lib/Automake/Options.pm
index 1705981..5e05792 100644
--- a/lib/Automake/Options.pm
+++ b/lib/Automake/Options.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -259,14 +259,14 @@ sub _process_option_list (\%$@)
       elsif ($_ eq 'no-installman' || $_ eq 'no-installinfo'
             || $_ eq 'dist-shar' || $_ eq 'dist-zip'
             || $_ eq 'dist-tarZ' || $_ eq 'dist-bzip2'
-            || $_ eq 'dist-lzma'
+            || $_ eq 'dist-lzma' || $_ eq 'dist-xz'
             || $_ eq 'no-dist-gzip' || $_ eq 'no-dist'
             || $_ eq 'dejagnu' || $_ eq 'no-texinfo.tex'
             || $_ eq 'readme-alpha' || $_ eq 'check-news'
             || $_ eq 'subdir-objects' || $_ eq 'nostdinc'
             || $_ eq 'no-exeext' || $_ eq 'no-define'
-            || $_ eq 'std-options'
-            || $_ eq 'color-tests'
+            || $_ eq 'std-options' || $_ eq 'silent-rules'
+            || $_ eq 'color-tests' || $_ eq 'parallel-tests'
             || $_ eq 'cygnus' || $_ eq 'no-dependencies')
        {
          # Explicitly recognize these.
diff --git a/lib/Automake/Variable.pm b/lib/Automake/Variable.pm
index e67d215..f826586 100644
--- a/lib/Automake/Variable.pm
+++ b/lib/Automake/Variable.pm
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2005, 2006, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2005, 2006, 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
@@ -71,7 +71,7 @@ Automake::Variable - support for variable definitions
   # $var->conditions->conds is a list of Automake::Condition.)
   my @conds = $var->conditions->conds
 
-  # Accessing to the definition in Condition $cond.
+  # Access to the definition in Condition $cond.
   # $def is an Automake::VarDef.
   my $def = $var->def ($cond);
   if ($def)
@@ -128,7 +128,10 @@ non-object).
 
 =cut
 
-my $_VARIABLE_PATTERN = 'address@hidden' . "\$";
+my $_VARIABLE_CHARACTERS = 'address@hidden';
+my $_VARIABLE_PATTERN = '^' . $_VARIABLE_CHARACTERS . "\$";
+my $_VARIABLE_RECURSIVE_PATTERN =
+    '^(address@hidden|\$[({]' . $_VARIABLE_CHARACTERS . '[})]?)+' . "\$";
 
 # The order in which variables should be output.  (May contain
 # duplicates -- only the first occurrence matters.)
@@ -771,8 +774,17 @@ sub check_variable_expansions ($$)
          # Mention this in the diagnostic.
          my $gnuext = "";
          $gnuext = "\n(probably a GNU make extension)" if $var =~ / /;
-         msg ('portability', $where,
-              "$var: non-POSIX variable name$gnuext");
+         # Accept recursive variable expansions if so desired
+         # (we hope they are rather portable in practice).
+         if ($var =~ /$_VARIABLE_RECURSIVE_PATTERN/o)
+           {
+             msg ('portability-recursive', $where,
+                  "$var: non-POSIX recursive variable expansion$gnuext");
+           }
+         else
+           {
+             msg ('portability', $where, "$var: non-POSIX variable 
name$gnuext");
+           }
        }
     }
 }
diff --git a/lib/Automake/XFile.pm b/lib/Automake/XFile.pm
index 2e34b74..27f2455 100644
--- a/lib/Automake/XFile.pm
+++ b/lib/Automake/XFile.pm
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 2006, 2008 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
@@ -62,7 +63,7 @@ Automake::XFile - supply object methods for filehandles with 
error handling
 =head1 DESCRIPTION
 
 C<Automake::XFile> inherits from C<IO::File>.  It provides the method
-C<name> returning the file name.  It provides dying version of the
+C<name> returning the file name.  It provides dying versions of the
 methods C<close>, C<lock> (corresponding to C<flock>), C<new>,
 C<open>, C<seek>, and C<truncate>.  It also overrides the C<getline>
 and C<getlines> methods to translate C<\r\n> to C<\n>.
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/Condition-t.pl 
b/lib/Automake/tests/Condition-t.pl
new file mode 100644
index 0000000..eb93396
--- /dev/null
+++ b/lib/Automake/tests/Condition-t.pl
@@ -0,0 +1,301 @@
+# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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/>.
+
+BEGIN {
+  use Config;
+  if (eval { require 5.007_002; }      # for CLONE support
+      && $Config{useithreads})
+    {
+      require threads;
+      import threads;
+    }
+  else
+    {
+      exit 77;
+    }
+}
+use Automake::Condition qw/TRUE FALSE/;
+
+sub test_basics ()
+{
+  my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string]
+              [[], 1, 0, 'TRUE', ''],
+              [['TRUE'], 1, 0, 'TRUE', ''],
+              [['FALSE'], 0, 1, 'FALSE', '#'],
+              [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@'],
+              [['A_TRUE', 'B_FALSE'],
+               0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@'],
+              [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#'],
+              [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#']);
+
+  for (@tests)
+    {
+      my $a = new Automake::Condition @{$_->[0]};
+      return 1
+        if threads->new(sub {
+         return 1 if $_->[1] != $a->true;
+         return 1 if $_->[1] != ($a == TRUE);
+         return 1 if $_->[2] != $a->false;
+         return 1 if $_->[2] != ($a == FALSE);
+         return 1 if $_->[3] ne $a->string;
+         return 1 if $_->[4] ne $a->subst_string;
+       })->join;
+    }
+  return 0;
+}
+
+sub test_true_when ()
+{
+  my $failed = 0;
+
+  my @tests = (# [When,
+              #  [Implied-Conditions],
+              #  [Not-Implied-Conditions]]
+              [['TRUE'],
+               [['TRUE']],
+               [['A_TRUE'], ['A_TRUE', 'B_FALSE'], ['FALSE']]],
+              [['A_TRUE'],
+               [['TRUE'], ['A_TRUE']],
+               [['A_TRUE', 'B_FALSE'], ['FALSE']]],
+              [['A_TRUE', 'B_FALSE'],
+               [['TRUE'], ['A_TRUE'], ['B_FALSE'], ['A_TRUE', 'B_FALSE']],
+               [['FALSE'], ['C_FALSE'], ['C_FALSE', 'A_TRUE']]]);
+
+  for my $t (@tests)
+    {
+      my $a = new Automake::Condition @{$t->[0]};
+      return 1
+        if threads->new(sub {
+         for my $u (@{$t->[1]})
+           {
+             my $b = new Automake::Condition @$u;
+             return threads->new(sub {
+               if (! $b->true_when ($a))
+                 {
+                   print "`" . $b->string .
+                     "' not implied by `" . $a->string . "'?\n";
+                   $failed = 1;
+                 }
+             })->join;
+           }
+         for my $u (@{$t->[2]})
+           {
+             my $b = new Automake::Condition @$u;
+             return threads->new(sub {
+               if ($b->true_when ($a))
+                 {
+                   print "`" . $b->string .
+                     "' implied by `" . $a->string . "'?\n";
+                   $failed = 1;
+                 }
+
+               return threads->new(sub {
+                 return 1 if $b->true_when ($a);
+               })->join;
+             })->join;
+           }
+        })->join;
+    }
+  return $failed;
+}
+
+sub test_reduce_and ()
+{
+  my @tests = (# If no conditions are given, TRUE should be returned
+              [[], ["TRUE"]],
+              # An empty condition is TRUE
+              [[""], ["TRUE"]],
+              # A single condition should be passed through unchanged
+              [["FOO"], ["FOO"]],
+              [["FALSE"], ["FALSE"]],
+              [["TRUE"], ["TRUE"]],
+              # TRUE and false should be discarded and overwhelm
+              # the result, respectively
+              [["FOO", "TRUE"], ["FOO"]],
+              [["FOO", "FALSE"], ["FALSE"]],
+              # Repetitions should be removed
+              [["FOO", "FOO"], ["FOO"]],
+              [["TRUE", "FOO", "FOO"], ["FOO"]],
+              [["FOO", "TRUE", "FOO"], ["FOO"]],
+              [["FOO", "FOO", "TRUE"], ["FOO"]],
+              # Two different conditions should be preserved,
+              # but TRUEs should be removed
+              [["FOO", "BAR"], ["BAR,FOO"]],
+              [["TRUE", "FOO", "BAR"], ["BAR,FOO"]],
+              [["FOO", "TRUE", "BAR"], ["BAR,FOO"]],
+              [["FOO", "BAR", "TRUE"], ["BAR,FOO"]],
+              # A condition implied by another condition should be removed.
+              [["FOO BAR", "BAR"], ["FOO BAR"]],
+              [["BAR", "FOO BAR"], ["FOO BAR"]],
+              [["TRUE", "FOO BAR", "BAR"], ["FOO BAR"]],
+              [["FOO BAR", "TRUE", "BAR"], ["FOO BAR"]],
+              [["FOO BAR", "BAR", "TRUE"], ["FOO BAR"]],
+
+              [["BAR FOO", "BAR"], ["BAR FOO"]],
+              [["BAR", "BAR FOO"], ["BAR FOO"]],
+              [["TRUE", "BAR FOO", "BAR"], ["BAR FOO"]],
+              [["BAR FOO", "TRUE", "BAR"], ["BAR FOO"]],
+              [["BAR FOO", "BAR", "TRUE"], ["BAR FOO"]],
+
+              # Check that reduction happens even when there are
+              # two conditions to remove.
+              [["FOO", "FOO BAR", "BAR"], ["FOO BAR"]],
+              [["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["FOO BAR", "FOO BAZ"]],
+              [["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"],
+               ["FOO BAZ BAR"]],
+
+              # Duplicated conditionals should be removed.
+              [["FOO", "BAR", "BAR"], ["BAR,FOO"]],
+
+              # Equivalent conditions in different forms should be
+              # reduced: which one is left is unfortunately order
+              # dependent.
+              [["BAR FOO", "FOO BAR"], ["FOO BAR"]],
+              [["FOO BAR", "BAR FOO"], ["BAR FOO"]]);
+
+  my $failed = 0;
+  foreach (@tests)
+    {
+      my ($inref, $outref) = @$_;
+      my @inconds = map { new Automake::Condition $_ } @$inref;
+      return 1
+        if threads->new(sub {
+         my @outconds = map { (new Automake::Condition $_)->string } @$outref;
+         return threads->new(sub {
+           my @res =
+             map { $_->string } (Automake::Condition::reduce_and (@inconds));
+           return threads->new(sub {
+             my $result = join (",", sort @res);
+             my $exresult = join (",", @outconds);
+
+             if ($result ne $exresult)
+               {
+                 print '"' . join(",", @$inref) . '" => "' .
+                   $result . '" expected "' .
+                     $exresult . '"' . "\n";
+                 $failed = 1;
+               }
+             return $failed;
+           })->join;
+         })->join;
+       })->join;
+    }
+  return $failed;
+}
+
+sub test_reduce_or ()
+{
+  my @tests = (# If no conditions are given, FALSE should be returned
+              [[], ["FALSE"]],
+              # An empty condition is TRUE
+              [[""], ["TRUE"]],
+              # A single condition should be passed through unchanged
+              [["FOO"], ["FOO"]],
+              [["FALSE"], ["FALSE"]],
+              [["TRUE"], ["TRUE"]],
+              # FALSE and TRUE should be discarded and overwhelm
+              # the result, respectively
+              [["FOO", "TRUE"], ["TRUE"]],
+              [["FOO", "FALSE"], ["FOO"]],
+              # Repetitions should be removed
+              [["FOO", "FOO"], ["FOO"]],
+              [["FALSE", "FOO", "FOO"], ["FOO"]],
+              [["FOO", "FALSE", "FOO"], ["FOO"]],
+              [["FOO", "FOO", "FALSE"], ["FOO"]],
+              # Two different conditions should be preserved,
+              # but FALSEs should be removed
+              [["FOO", "BAR"], ["BAR,FOO"]],
+              [["FALSE", "FOO", "BAR"], ["BAR,FOO"]],
+              [["FOO", "FALSE", "BAR"], ["BAR,FOO"]],
+              [["FOO", "BAR", "FALSE"], ["BAR,FOO"]],
+              # A condition implying another condition should be removed.
+              [["FOO BAR", "BAR"], ["BAR"]],
+              [["BAR", "FOO BAR"], ["BAR"]],
+              [["FALSE", "FOO BAR", "BAR"], ["BAR"]],
+              [["FOO BAR", "FALSE", "BAR"], ["BAR"]],
+              [["FOO BAR", "BAR", "FALSE"], ["BAR"]],
+
+              [["BAR FOO", "BAR"], ["BAR"]],
+              [["BAR", "BAR FOO"], ["BAR"]],
+              [["FALSE", "BAR FOO", "BAR"], ["BAR"]],
+              [["BAR FOO", "FALSE", "BAR"], ["BAR"]],
+              [["BAR FOO", "BAR", "FALSE"], ["BAR"]],
+
+              # Check that reduction happens even when there are
+              # two conditions to remove.
+              [["FOO", "FOO BAR", "BAR"], ["BAR,FOO"]],
+              [["FOO", "FOO BAR", "BAZ", "FOO BAZ"], ["BAZ,FOO"]],
+              [["FOO", "FOO BAR", "BAZ", "FOO BAZ", "FOO BAZ BAR"],
+               ["BAZ,FOO"]],
+
+              # Duplicated conditionals should be removed.
+              [["FOO", "BAR", "BAR"], ["BAR,FOO"]],
+
+              # Equivalent conditions in different forms should be
+              # reduced: which one is left is unfortunately order
+              # dependent.
+              [["BAR FOO", "FOO BAR"], ["FOO BAR"]],
+              [["FOO BAR", "BAR FOO"], ["BAR FOO"]]);
+
+  my $failed = 0;
+  foreach (@tests)
+    {
+      my ($inref, $outref) = @$_;
+      my @inconds = map { new Automake::Condition $_ } @$inref;
+      return 1
+        if threads->new(sub {
+         my @outconds = map { (new Automake::Condition $_)->string } @$outref;
+         return threads->new(sub {
+           my @res =
+             map { $_->string } (Automake::Condition::reduce_or (@inconds));
+           return threads->new(sub {
+             my $result = join (",", sort @res);
+             my $exresult = join (",", @outconds);
+
+             if ($result ne $exresult)
+               {
+                 print '"' . join(",", @$inref) . '" => "' .
+                   $result . '" expected "' .
+                     $exresult . '"' . "\n";
+                 $failed = 1;
+               }
+             return $failed;
+           })->join;
+         })->join;
+       })->join;
+    }
+  return $failed;
+}
+
+exit (test_basics || test_true_when || test_reduce_and || test_reduce_or);
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
diff --git a/lib/Automake/tests/DisjConditions-t.pl 
b/lib/Automake/tests/DisjConditions-t.pl
new file mode 100644
index 0000000..c30b5e2
--- /dev/null
+++ b/lib/Automake/tests/DisjConditions-t.pl
@@ -0,0 +1,436 @@
+# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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/>.
+
+BEGIN {
+  use Config;
+  if (eval { require 5.007_002; }      # for CLONE support
+      && $Config{useithreads})
+    {
+      require threads;
+      import threads;
+    }
+  else
+    {
+      exit 77;
+    }
+}
+use Automake::Condition qw/TRUE FALSE/;
+use Automake::DisjConditions;
+
+sub test_basics ()
+{
+  my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
+  return threads->new (sub {
+    my $other = new Automake::Condition "COND3_FALSE";
+    return threads->new (sub {
+      my $set1 = new Automake::DisjConditions $cond, $other;
+      return threads->new (sub {
+       my $set2 = new Automake::DisjConditions $other, $cond;
+       return 1 unless $set1 == $set2;
+       return 1 if $set1->false;
+       return 1 if $set1->true;
+       return 1 unless (new Automake::DisjConditions)->false;
+       return 1 if (new Automake::DisjConditions)->true;
+      })->join;
+    })->join;
+  })->join;
+}
+
+sub build_set (@)
+{
+  my @conds = @_;
+  my @set = ();
+  for my $cond (@conds)
+    {
+      push @set, new Automake::Condition @$cond;
+    }
+  return new Automake::DisjConditions @set;
+}
+
+sub test_invert ()
+{
+  my @tests = ([[["FALSE"]],
+               [["TRUE"]]],
+
+              [[["TRUE"]],
+               [["FALSE"]]],
+
+              [[["COND1_TRUE", "COND2_TRUE"],
+                ["COND3_FALSE", "COND2_TRUE"]],
+               [["COND2_FALSE"],
+                ["COND1_FALSE", "COND3_TRUE"]]],
+
+              [[["COND1_TRUE", "COND2_TRUE"],
+                ["TRUE"]],
+               [["FALSE"]]],
+
+              [[["COND1_TRUE", "COND2_TRUE"],
+                ["FALSE"]],
+               [["COND1_FALSE"],
+                ["COND2_FALSE"]]],
+
+              [[["COND1_TRUE"],
+                ["COND2_FALSE"]],
+               [["COND1_FALSE", "COND2_TRUE"]]]
+              );
+
+  for my $t (@tests)
+    {
+      my $set = build_set @{$t->[0]};
+      return 1
+        if threads->new(sub {
+         my $res = build_set @{$t->[1]};
+         my $inv = $set->invert;
+         if ($inv != $res)
+           {
+             print " (I) " . $set->string . "\n\t"
+               . $inv->string . ' != ' . $res->string . "\n";
+             return 1;
+           }
+         return 0
+       })-> join;
+    }
+  return 0;
+}
+
+sub test_simplify ()
+{
+  my @tests = ([[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"]],
+               [["FOO_TRUE", "BAR_FALSE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_TRUE", "BAR_TRUE"]],
+               [["FOO_TRUE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_TRUE", "BAR_TRUE"],
+                ["FOO_FALSE"]],
+               [["TRUE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                            ["BAR_TRUE",  "BAZ_TRUE"],
+                            ["BAR_FALSE", "BAZ_TRUE"]],
+               [["BAZ_TRUE"], ["FOO_TRUE", "BAR_FALSE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                            ["BAR_TRUE",  "BAZ_TRUE"],
+                            ["BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_FALSE"]],
+               [["FOO_FALSE"], ["BAZ_TRUE"], ["BAR_FALSE"]]],
+
+              [[["B_TRUE"],
+                ["A_FALSE", "B_TRUE"]],
+               [["B_TRUE"]]],
+
+              [[["B_TRUE"],
+                ["A_FALSE", "B_FALSE", "C_TRUE"],
+                ["A_FALSE", "B_FALSE", "C_FALSE"]],
+               [["A_FALSE"], ["B_TRUE"]]],
+
+              [[["B_TRUE"],
+                ["A_FALSE", "B_FALSE", "C_TRUE"],
+                ["A_FALSE", "B_FALSE", "C_FALSE"],
+                ["A_TRUE", "B_FALSE"]],
+               [["TRUE"]]],
+
+              [[["A_TRUE", "B_TRUE"],
+                ["A_TRUE", "B_FALSE"],
+                ["A_TRUE", "C_FALSE", "D_FALSE"]],
+               [["A_TRUE"]]],
+
+              [[["A_FALSE", "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
+                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"]],
+               [           ["B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
+                           ["B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                           ["B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
+                           ["B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"]]],
+
+              [[["A_FALSE", "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
+                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_FALSE", "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_TRUE",  "E_FALSE"],
+                ["A_FALSE", "B_FALSE", "C_FALSE", "D_FALSE", "E_FALSE"],
+                ["A_FALSE", "B_FALSE", "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_FALSE", "B_TRUE",  "C_FALSE", "D_TRUE",  "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_FALSE", "D_TRUE",  "E_FALSE"],
+                ["A_TRUE",  "B_TRUE",  "C_TRUE",  "D_TRUE",  "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_TRUE",  "D_FALSE", "E_TRUE"],
+                ["A_TRUE",  "B_FALSE", "C_FALSE", "D_FALSE", "E_FALSE"]],
+               [["C_FALSE", "E_FALSE"],
+                ["C_TRUE", "E_TRUE"]]],
+
+              [[["A_FALSE"],
+                ["A_TRUE", "B_FALSE"],
+                ["A_TRUE", "B_TRUE", "C_FALSE"],
+                ["A_TRUE", "B_TRUE", "C_TRUE", "D_FALSE"],
+                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_FALSE"],
+                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_TRUE", "F_FALSE"],
+                ["A_TRUE", "B_TRUE", "C_TRUE", "D_TRUE", "E_TRUE"]],
+               [["TRUE"]]],
+
+              # Simplify should work with up to 31 variables.
+              [[["V01_TRUE", "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
+                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
+                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
+                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
+                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
+                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
+                 "V31_TRUE"],
+                ["V01_TRUE", "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
+                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
+                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
+                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
+                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
+                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
+                 "V31_FALSE"],
+                ["V01_FALSE","V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
+                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
+                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
+                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
+                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
+                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
+                 "V31_TRUE"],
+                ["V01_FALSE","V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
+                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
+                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
+                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
+                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
+                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE",
+                 "V31_FALSE"]],
+               [[            "V02_TRUE", "V03_TRUE", "V04_TRUE", "V05_TRUE",
+                 "V06_TRUE", "V07_TRUE", "V08_TRUE", "V09_TRUE", "V10_TRUE",
+                 "V11_TRUE", "V12_TRUE", "V13_TRUE", "V14_TRUE", "V15_TRUE",
+                 "V16_TRUE", "V17_TRUE", "V18_TRUE", "V19_TRUE", "V20_TRUE",
+                 "V21_TRUE", "V22_TRUE", "V23_TRUE", "V24_TRUE", "V25_TRUE",
+                 "V26_TRUE", "V27_TRUE", "V28_TRUE", "V29_TRUE", "V30_TRUE"
+                 ]]]);
+
+  for my $t (@tests)
+    {
+      my $set = build_set @{$t->[0]};
+      return 1
+       if threads->new(sub {
+         my $res = build_set @{$t->[1]};
+         return threads->new(sub {
+
+           # Make sure simplify() yields the expected result.
+           my $sim = $set->simplify;
+           return threads->new(sub {
+             if ($sim != $res)
+               {
+                 print " (S1) " . $set->string . "\n\t"
+                   . $sim->string . ' != ' . $res->string . "\n";
+                 return 1;
+               }
+
+             # Make sure simplify() is idempotent.
+             my $sim2 = $sim->simplify;
+             return threads->new(sub {
+               if ($sim2 != $sim)
+                 {
+                   print " (S2) " . $sim->string . "\n\t"
+                     . $sim2->string . ' != ' . $sim->string . "\n";
+                   return 1;
+                 }
+
+               # Also exercise invert() while we are at it.
+
+               my $inv1 = $set->invert->simplify;
+               return threads->new(sub {
+                 my $inv2 = $sim->invert->simplify;
+                 return threads->new(sub {
+                   if ($inv1 != $inv2)
+                     {
+                       print " (S3) " . $set->string . ", " . $sim->string . 
"\n\t"
+                         . $inv1->string . ' -= ' . $inv2->string . "\n";
+                       return 1;
+                     }
+                 })->join;
+               })->join;
+             })->join;
+           })->join;
+         })->join;
+       })->join;
+    }
+
+  return 0;
+}
+
+sub test_sub_conditions ()
+{
+  my @tests = ([[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_FALSE"]],
+               ["FOO_TRUE"],
+               [["BAR_FALSE", "BAZ_FALSE"],
+                ["BAR_FALSE", "BAZ_TRUE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_FALSE"]],
+               ["FOO_TRUE", "BAR_FALSE"],
+               [["BAZ_FALSE"],
+                ["BAZ_TRUE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAR_FALSE", "BAZ_TRUE"],
+                ["FOO_FALSE"]],
+               ["FOO_TRUE", "BAR_TRUE"],
+               [["FALSE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE", "BAZ_FALSE"],
+                ["FOO_TRUE", "BAZ_TRUE"],
+                ["FOO_FALSE"]],
+               ["FOO_TRUE", "BAR_TRUE"],
+               [["BAZ_TRUE"]]],
+
+              [[["FOO_TRUE", "BAR_FALSE"],
+                ["FOO_TRUE", "BAR_TRUE"]],
+               ["FOO_TRUE", "BAR_TRUE"],
+               [["TRUE"]]],
+
+              [[["TRUE"]],
+               ["TRUE"],
+               [["TRUE"]]],
+
+              [[["FALSE"]],
+               ["TRUE"],
+               [["FALSE"]]],
+
+              [[["FALSE"]],
+               ["FALSE"],
+               [["FALSE"]]]);
+
+  for my $t (@tests)
+    {
+      my $t1 = build_set @{$t->[0]};
+      return 1
+        if threads->new(sub {
+         my $t2 = new Automake::Condition @{$t->[1]};
+         return threads->new(sub {
+           my $t3 = build_set @{$t->[2]};
+           return threads->new(sub {
+
+             # Make sure sub_conditions() yields the expected result.
+             my $s = $t1->sub_conditions ($t2);
+             threads->new(sub {
+               if ($s != $t3)
+                 {
+                   print " (SC) " . $t1->string . "\n\t"
+                     . $s->string . ' != ' . $t3->string . "\n";
+                   return 1;
+                 }
+             })->join;
+           })->join;
+         })->join;
+       })->join;
+    }
+}
+
+sub test_ambig ()
+{
+  my @tests = ([[["TRUE"]],
+               ["TRUE"],
+               "multiply defined"],
+              [[["C1_TRUE"]],
+               ["C1_TRUE"],
+               "multiply defined"],
+              [[["TRUE"]],
+                ["C1_FALSE"],
+               "which includes"],
+              [[["C1_TRUE"]],
+               ["C1_TRUE", "C2_TRUE"],
+               "which includes"],
+              [[["C1_TRUE", "C2_TRUE"]],
+               ["C2_TRUE"],
+               "which is included in"],
+              [[["C1_TRUE"]],
+               ["C2_TRUE"],
+               ''],
+              [[["C1_TRUE"],
+                ["C2_FALSE"]],
+               ["C1_FALSE", "C2_TRUE"],
+               '']);
+
+  my $failed = 0;
+  for my $t (@tests)
+    {
+      my $t1 = build_set @{$t->[0]};
+      $failed = 1
+        if threads->new(sub {
+         my $t2 = new Automake::Condition @{$t->[1]};
+         my $t3 = $t->[2];
+         return threads->new(sub {
+           my ($ans, $cond) = $t1->ambiguous_p ("FOO", $t2);
+           return threads->new(sub {
+             if ($t3 && $ans !~ /FOO.*$t3/)
+               {
+                 print " (A1) " . $t1->string . " vs. " . $t2->string . "\n\t"
+                   . "Error message '$ans' does not match '$t3'\n";
+                 return 1;
+               }
+             if (!$t3 && $ans ne '')
+               {
+                 print " (A2) " . $t1->string . " vs. " . $t2->string . "\n\t"
+                   . "Unexpected error message: $ans\n";
+                 return 1;
+               }
+           })->join;
+         })->join;
+       })->join;
+    }
+  return $failed;
+}
+
+exit (test_basics
+      || test_invert
+      || test_simplify
+      || test_sub_conditions
+      || test_ambig);
+
+### Setup "GNU" style for perl-mode and cperl-mode.
+## Local Variables:
+## perl-indent-level: 2
+## perl-continued-statement-offset: 2
+## perl-continued-brace-offset: 0
+## perl-brace-offset: 0
+## perl-brace-imaginary-offset: 0
+## perl-label-offset: -2
+## cperl-indent-level: 2
+## cperl-brace-offset: 0
+## cperl-continued-brace-offset: 0
+## cperl-label-offset: -2
+## cperl-extra-newline-before-brace: t
+## cperl-merge-trailing-else: nil
+## cperl-continued-statement-offset: 2
+## End:
diff --git a/lib/Automake/tests/Makefile.am b/lib/Automake/tests/Makefile.am
index 705f195..b56f3dc 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  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,10 +15,15 @@
 ## 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 $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
+
 TESTS = \
 Condition.pl \
+Condition-t.pl \
 DisjConditions.pl \
+DisjConditions-t.pl \
 Version.pl \
 Wrap.pl
 
diff --git a/lib/Automake/tests/Makefile.in b/lib/Automake/tests/Makefile.in
index 43bbe90..0596752 100644
--- a/lib/Automake/tests/Makefile.in
+++ b/lib/Automake/tests/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -64,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@
@@ -101,6 +168,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -111,6 +179,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -151,10 +220,14 @@ target_alias = @target_alias@
 top_build_prefix = @top_build_prefix@
 top_builddir = @top_builddir@
 top_srcdir = @top_srcdir@
-TESTS_ENVIRONMENT = $(PERL) -Mstrict -I $(top_srcdir)/lib -w
+PL_LOG_COMPILER = $(PERL)
+AM_PL_LOG_FLAGS = -Mstrict -I ../.. -I $(top_srcdir)/lib -w
+TEST_EXTENSIONS = .pl
 TESTS = \
 Condition.pl \
+Condition-t.pl \
 DisjConditions.pl \
+DisjConditions-t.pl \
 Version.pl \
 Wrap.pl
 
@@ -162,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 \
@@ -171,9 +245,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  
lib/Automake/tests/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu 
lib/Automake/tests/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  lib/Automake/tests/Makefile
+         $(AUTOMAKE) --gnu lib/Automake/tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -199,84 +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 "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
-           else \
-             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 \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
-           fi; \
-         fi; \
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
-           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'`; \
@@ -294,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" \
@@ -324,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:
 
@@ -348,6 +505,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -356,18 +515,28 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -388,18 +557,20 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: 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 d3c5b40..2550dab 100644
--- a/lib/INSTALL
+++ b/lib/INSTALL
@@ -2,15 +2,15 @@ Installation Instructions
 *************************
 
 Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
-2006, 2007 Free Software Foundation, Inc.
+2006, 2007, 2008, 2009 Free Software Foundation, Inc.
 
-This file is free documentation; the Free Software Foundation gives
+   This file is free documentation; the Free Software Foundation gives
 unlimited permission to copy, distribute and modify it.
 
 Basic Installation
 ==================
 
-Briefly, the shell commands `./configure; make; make install' should
+   Briefly, the shell commands `./configure; make; make install' should
 configure, build, and install this package.  The following
 more-detailed instructions are generic; see the `README' file for
 instructions specific to this package.
@@ -73,9 +73,9 @@ The simplest way to compile this package is:
 Compilers and Options
 =====================
 
-Some systems require unusual options for compilation or linking that the
-`configure' script does not know about.  Run `./configure --help' for
-details on some of the pertinent environment variables.
+   Some systems require unusual options for compilation or linking that
+the `configure' script does not know about.  Run `./configure --help'
+for details on some of the pertinent environment variables.
 
    You can give `configure' initial values for configuration parameters
 by setting variables in the command line or in the environment.  Here
@@ -88,7 +88,7 @@ is an example:
 Compiling For Multiple Architectures
 ====================================
 
-You can compile the package for more than one kind of computer at the
+   You can compile the package for more than one kind of computer at the
 same time, by placing the object files for each architecture in their
 own directory.  To do this, you can use GNU `make'.  `cd' to the
 directory where you want the object files and executables to go and run
@@ -100,10 +100,24 @@ architecture at a time in the source code directory.  
After you have
 installed the package for one architecture, use `make distclean' before
 reconfiguring for another architecture.
 
+   On MacOS X 10.5 and later systems, you can create libraries and
+executables that work on multiple system types--known as "fat" or
+"universal" binaries--by specifying multiple `-arch' options to the
+compiler but only a single `-arch' option to the preprocessor.  Like
+this:
+
+     ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
+                 CPP="gcc -E" CXXCPP="g++ -E"
+
+   This is not guaranteed to produce working output in all cases, you
+may have to build one architecture at a time and combine the results
+using the `lipo' tool if you have problems.
+
 Installation Names
 ==================
 
-By default, `make install' installs the package's commands under
+   By default, `make install' installs the package's commands under
 `/usr/local/bin', include files under `/usr/local/include', etc.  You
 can specify an installation prefix other than `/usr/local' by giving
 `configure' the option `--prefix=PREFIX'.
@@ -126,7 +140,7 @@ option `--program-prefix=PREFIX' or 
`--program-suffix=SUFFIX'.
 Optional Features
 =================
 
-Some packages pay attention to `--enable-FEATURE' options to
+   Some packages pay attention to `--enable-FEATURE' options to
 `configure', where FEATURE indicates an optional part of the package.
 They may also pay attention to `--with-PACKAGE' options, where PACKAGE
 is something like `gnu-as' or `x' (for the X Window System).  The
@@ -138,14 +152,46 @@ find the X include and library files automatically, but 
if it doesn't,
 you can use the `configure' options `--x-includes=DIR' and
 `--x-libraries=DIR' to specify their locations.
 
+Particular systems
+==================
+
+   On HP-UX, the default C compiler is not ANSI C compatible.  If GNU
+CC is not installed, it is recommended to use the following options in
+order to use an ANSI C compiler:
+
+     ./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
+
+and if that doesn't work, install pre-built binaries of GCC for HP-UX.
+
+   On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
+parse its `<wchar.h>' header file.  The option `-nodtk' can be used as
+a workaround.  If GNU CC is not installed, it is therefore recommended
+to try
+
+     ./configure CC="cc"
+
+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
 ==========================
 
-There may be some features `configure' cannot figure out automatically,
-but needs to determine by the type of machine the package will run on.
-Usually, assuming the package is built to be run on the _same_
-architectures, `configure' can figure that out, but if it prints a
-message saying it cannot guess the machine type, give it the
+   There may be some features `configure' cannot figure out
+automatically, but needs to determine by the type of machine the package
+will run on.  Usually, assuming the package is built to be run on the
+_same_ architectures, `configure' can figure that out, but if it prints
+a message saying it cannot guess the machine type, give it the
 `--build=TYPE' option.  TYPE can either be a short name for the system
 type, such as `sun4', or a canonical name which has the form:
 
@@ -153,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
@@ -171,9 +218,9 @@ eventually be run) with `--host=TYPE'.
 Sharing Defaults
 ================
 
-If you want to set default values for `configure' scripts to share, you
-can create a site shell script called `config.site' that gives default
-values for variables like `CC', `cache_file', and `prefix'.
+   If you want to set default values for `configure' scripts to share,
+you can create a site shell script called `config.site' that gives
+default values for variables like `CC', `cache_file', and `prefix'.
 `configure' looks for `PREFIX/share/config.site' if it exists, then
 `PREFIX/etc/config.site' if it exists.  Or, you can set the
 `CONFIG_SITE' environment variable to the location of the site script.
@@ -182,7 +229,7 @@ A warning: not all `configure' scripts look for a site 
script.
 Defining Variables
 ==================
 
-Variables not defined in a site shell script can be set in the
+   Variables not defined in a site shell script can be set in the
 environment passed to `configure'.  However, some packages may run
 configure again during the build, and the customized values of these
 variables may be lost.  In order to avoid this problem, you should set
@@ -201,11 +248,19 @@ an Autoconf bug.  Until the bug is fixed you can use this 
workaround:
 `configure' Invocation
 ======================
 
-`configure' recognizes the following options to control how it operates.
+   `configure' recognizes the following options to control how it
+operates.
 
 `--help'
 `-h'
-     Print a summary of the options to `configure', and exit.
+     Print a summary of all of the options to `configure', and exit.
+
+`--help=short'
+`--help=recursive'
+     Print a summary of the options unique to this package's
+     `configure', and exit.  The `short' variant lists options used
+     only in the top level, while the `recursive' variant lists options
+     also present in any nested packages.
 
 `--version'
 `-V'
@@ -232,6 +287,16 @@ an Autoconf bug.  Until the bug is fixed you can use this 
workaround:
      Look for the package's source code in directory DIR.  Usually
      `configure' can determine that directory automatically.
 
+`--prefix=DIR'
+     Use DIR as the installation prefix.  *Note Installation Names::
+     for more details, including other options available for fine-tuning
+     the installation locations.
+
+`--no-create'
+`-n'
+     Run the configure checks, but stop before creating any output
+     files.
+
 `configure' also accepts some other, not widely useful, options.  Run
 `configure --help' for more details.
 
diff --git a/lib/Makefile.in b/lib/Makefile.in
index 2ecc780..ee031a9 100644
--- a/lib/Makefile.in
+++ b/lib/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -86,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)
@@ -151,6 +155,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -161,6 +166,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -223,9 +229,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  lib/Makefile
+         $(AUTOMAKE) --gnu lib/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -247,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) | \
@@ -258,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 ")"; \
@@ -266,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) | \
@@ -277,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 ")"; \
@@ -434,27 +442,37 @@ 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" \
            || exit 1; \
          fi; \
        done
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: distdir)"; \
            ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
@@ -512,6 +530,8 @@ dvi-am:
 
 html: html-recursive
 
+html-am:
+
 info: info-recursive
 
 info-am:
@@ -521,18 +541,28 @@ install-data-am: install-dist_pkgvdataDATA 
install-dist_scriptDATA
        $(MAKE) $(AM_MAKEFLAGS) install-data-hook
 install-dvi: install-dvi-recursive
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-recursive
 
+install-html-am:
+
 install-info: install-info-recursive
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-recursive
 
+install-pdf-am:
+
 install-ps: install-ps-recursive
 
+install-ps-am:
+
 installcheck-am: installcheck-local
 
 maintainer-clean: maintainer-clean-recursive
@@ -553,8 +583,8 @@ ps-am:
 
 uninstall-am: uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) install-am \
-       install-data-am install-strip
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
+       install-am install-data-am install-strip tags-recursive
 
 .PHONY: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) CTAGS GTAGS \
        all all-am check check-am clean clean-generic ctags \
diff --git a/lib/am/Makefile.am b/lib/am/Makefile.am
index f6fdafa..1ab2f31 100644
--- a/lib/am/Makefile.am
+++ b/lib/am/Makefile.am
@@ -2,7 +2,7 @@
 
 ## Makefile for Automake lib/am.
 
-## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004
+## Copyright (C) 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2008
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -23,6 +23,7 @@ amdir = $(pkgvdatadir)/am
 dist_am_DATA = \
 ansi2knr.am \
 check.am \
+check2.am \
 clean-hdr.am \
 clean.am \
 compile.am \
diff --git a/lib/am/Makefile.in b/lib/am/Makefile.in
index 847657c..ce96885 100644
--- a/lib/am/Makefile.in
+++ b/lib/am/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -111,6 +112,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -121,6 +123,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -165,6 +168,7 @@ amdir = $(pkgvdatadir)/am
 dist_am_DATA = \
 ansi2knr.am \
 check.am \
+check2.am \
 clean-hdr.am \
 clean.am \
 compile.am \
@@ -216,9 +220,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  lib/am/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu lib/am/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  lib/am/Makefile
+         $(AUTOMAKE) --gnu lib/am/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -240,7 +244,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) | \
@@ -251,7 +256,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 ")"; \
@@ -279,10 +284,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" \
@@ -335,6 +344,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -343,18 +354,28 @@ install-data-am: install-dist_amDATA
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
diff --git a/lib/am/ansi2knr.am b/lib/am/ansi2knr.am
index ee106c5..e81f116 100644
--- a/lib/am/ansi2knr.am
+++ b/lib/am/ansi2knr.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2008
+## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2008, 2009
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -28,6 +28,7 @@ if %?ANSI2KNR-DIR%
 ANSI2KNR = %ANSI2KNR-DIR%/ansi2knr
 %ANSI2KNR-DIR%/ansi2knr:
        $(am__cd) %ANSI2KNR-DIR% && $(MAKE) $(AM_MAKEFLAGS) ./ansi2knr
+.MAKE: %ANSI2KNR-DIR%/ansi2knr
 
 else !%?ANSI2KNR-DIR%
 
diff --git a/lib/am/check.am b/lib/am/check.am
index daae5a2..f5153e3 100644
--- a/lib/am/check.am
+++ b/lib/am/check.am
@@ -38,6 +38,259 @@ endif !%?COLOR%
 
 .PHONY: check-TESTS
 
+if %?PARALLEL_TESTS%
+
+include inst-vars.am
+
+## New parallel test driver.
+##
+## This code is adapted from check.mk which was originally
+## written at EPITA/LRDE, further developed at Gostai, then made
+## its way from GNU coreutils to end up, largely rewritten, in
+## Automake.
+##
+## 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, 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.
+## Sometimes this helps catching errors earlier (you don't have to
+## wait for all the tests to be compiled).
+##
+## Define TEST_SUITE_LOG to be the name of the global log to create.
+## Define TEST_LOGS to the set of logs to include in it.  It defaults
+## to $(TESTS), with `.test' and address@hidden@' removed, and `'.log'
+## appended.
+##
+## In addition to the magic "exit 77 means SKIP" feature (which was
+## imported from automake), there is a magic "exit 99 means FAIL" feature
+## which is useful if you need to issue a hard error no matter whether the
+## test is XFAIL or not.  You can disable this feature by setting the
+## variable DISABLE_HARD_ERRORS to a nonempty value.
+
+# 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)
+
+# 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
+
+RECHECK_LOGS = $(TEST_LOGS)
+
+# Run all the tests.
+check-TESTS:
+## 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
+## (can happen with a prior `make TESTS=<subset>'),
+## then we get no log output.
+## OTOH, this means that, in the rule for `$(TEST_SUITE_LOG)', we
+## cannot use `$?' to compute the set of lazily rerun tests, lest
+## we rely on .PHONY to work portably.
+       @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
+
+## 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.  ##
+## -------------- ##
+
+.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
+.PHONY: check-html recheck-html
+.MAKE: check-html recheck-html
+
+AM_RECURSIVE_TARGETS += check-html recheck-html
+
+else !%?PARALLEL_TESTS%
+
 check-TESTS: $(TESTS)
        @failed=0; all=0; xfail=0; xpass=0; skip=0; \
        srcdir=$(srcdir); export srcdir; \
@@ -86,24 +339,37 @@ check-TESTS: $(TESTS)
            echo "$${col}$$res$${std}: $$tst"; \
          done; \
 ## Prepare the banner
+         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"; \
+             banner="$$All$$all $$tests passed"; \
            else \
-             banner="All $$all tests behaved as expected ($$xfail expected 
failures)"; \
+             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"; \
+             banner="$$failed of $$all $$tests failed"; \
            else \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
+             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 should contain the largest line of the banner.
          dashes="$$banner"; \
          skipped=""; \
          if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
+           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; \
@@ -125,3 +391,5 @@ check-TESTS: $(TESTS)
          echo "$$dashes$$std"; \
          test "$$failed" -eq 0; \
        else :; fi
+
+endif !%?PARALLEL_TESTS%
diff --git a/lib/am/check2.am b/lib/am/check2.am
new file mode 100644
index 0000000..237e20a
--- /dev/null
+++ b/lib/am/check2.am
@@ -0,0 +1,20 @@
+## automake - create Makefile.in from Makefile.am
+## Copyright (C) 2008 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/>.
+
+## From a test file to a log file.
+?GENERIC?%EXT%.log:
+?!GENERIC?%OBJ%: %SOURCE%
+       @p='%SOURCE%'; $(am__check_pre) %COMPILE% "$$tst" $(am__check_post)
diff --git a/lib/am/configure.am b/lib/am/configure.am
index e24e9a6..f88665c 100644
--- a/lib/am/configure.am
+++ b/lib/am/configure.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2008  Free Software
-## Foundation, Inc.
+## Copyright (C) 2001, 2002, 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
@@ -39,8 +39,8 @@ endif %?TOPDIR_P%
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
-?TOPDIR_P?           echo ' cd $(srcdir) && $(AUTOMAKE) --%STRICTNESS% 
%USE-DEPS%'; \
-?TOPDIR_P?           $(am__cd) $(srcdir) && $(AUTOMAKE) --%STRICTNESS% 
%USE-DEPS% \
+?TOPDIR_P?           echo ' cd $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS%'; \
+?TOPDIR_P?           $(am__cd) $(srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% \
 ?TOPDIR_P?             && exit 0; \
 ?!TOPDIR_P?          ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) 
am--refresh ) \
 ## If on the other hand, subdir/Makefile.in has been removed, then toplevel
@@ -52,9 +52,9 @@ endif %?TOPDIR_P%
          esac; \
        done; \
 ## Otherwise, rebuild only this file.
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% 
%MAKEFILE-AM-SOURCES%'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) %AUTOMAKE-OPTIONS% 
%MAKEFILE-AM-SOURCES%'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --%STRICTNESS% %USE-DEPS% %MAKEFILE-AM-SOURCES%
+         $(AUTOMAKE) %AUTOMAKE-OPTIONS% %MAKEFILE-AM-SOURCES%
 
 ## Ensure that GNU make doesn't remove Makefile if ./config.status (below)
 ## is interrupted.  Otherwise, the user would need to know to rerun
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/depend2.am b/lib/am/depend2.am
index 1a13bd2..579ecdd 100644
--- a/lib/am/depend2.am
+++ b/lib/am/depend2.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
-## 2003, 2004, 2006, 2008  Free Software Foundation, Inc.
+## 2003, 2004, 2006, 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
@@ -63,12 +63,15 @@ if %?NONLIBTOOL%
 if %FASTDEP%
 ## In fast-dep mode, we can always use -o.
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o %OBJ% 
%SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?GENERIC??!SUBDIROBJ?  %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??SUBDIROBJ?   depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
+?!GENERIC?     %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??!SUBDIROBJ?  %VERBOSE%%COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo 
%-c% -o %OBJ% %SOURCEFLAG%%SOURCE%
+?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\
 ?GENERIC??SUBDIROBJ?   %COMPILE% -MT %OBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJ% %SOURCEFLAG%%SOURCE% &&\
-       $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
 else !%FASTDEP%
+?VERBOSE?      %VERBOSE% @AM_BACKSLASH@
 if %AMDEP%
        source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -88,12 +91,15 @@ endif !%FASTDEP%
 if %FASTDEP%
 ## In fast-dep mode, we can always use -o.
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else 
$(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
-?GENERIC??!SUBDIROBJ?  %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
-?GENERIC??SUBDIROBJ?   depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
+?!GENERIC?     %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %OBJOBJ% %SOURCEFLAG%`if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; 
else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
+?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??!SUBDIROBJ?  %VERBOSE%%COMPILE% -MT %OBJOBJ% -MD -MP -MF 
%DEPBASE%.Tpo %-c% -o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'`
+?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\
 ?GENERIC??SUBDIROBJ?   %COMPILE% -MT %OBJOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %OBJOBJ% %SOURCEFLAG%`$(CYGPATH_W) '%SOURCE%'` &&\
-       $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
+?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Po
 else !%FASTDEP%
+?VERBOSE?      %VERBOSE% @AM_BACKSLASH@
 if %AMDEP%
        source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
@@ -115,12 +121,15 @@ if %?LIBTOOL%
 if %FASTDEP%
 ## In fast-dep mode, we can always use -o.
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
-?!GENERIC?     %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% -o 
%LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
-?GENERIC??!SUBDIROBJ?  %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %LTOBJ% %SOURCEFLAG%%SOURCE%
-?GENERIC??SUBDIROBJ?   depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
+?!GENERIC?     %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %LTOBJ% %SOURCEFLAG%`test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+?!GENERIC?     %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+?GENERIC??!SUBDIROBJ?  %VERBOSE%%LTCOMPILE% -MT %LTOBJ% -MD -MP -MF 
%DEPBASE%.Tpo %-c% -o %LTOBJ% %SOURCEFLAG%%SOURCE%
+?GENERIC??!SUBDIROBJ?  %SILENT%$(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+?GENERIC??SUBDIROBJ?   %VERBOSE%depbase=`echo %OBJ% | sed 
's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\
 ?GENERIC??SUBDIROBJ?   %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF %DEPBASE%.Tpo %-c% 
-o %LTOBJ% %SOURCEFLAG%%SOURCE% &&\
-       $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
+?GENERIC??SUBDIROBJ?   $(am__mv) %DEPBASE%.Tpo %DEPBASE%.Plo
 else !%FASTDEP%
+?VERBOSE?      %VERBOSE% @AM_BACKSLASH@
 if %AMDEP%
        source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
        DEPDIR=$(DEPDIR) $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
diff --git a/lib/am/distdir.am b/lib/am/distdir.am
index 41e9b2b..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
@@ -80,6 +84,32 @@ if  %?CK-NEWS%
 endif  %?CK-NEWS%
 endif %?TOPDIR_P%
 ##
+## `missing help2man' may have created some bogus man pages.  Ensure they
+## are not distributed.
+##
+if %?INSTALL-MAN%
+if %?HAVE-MANS%
+       @list='$(MANS)'; if test -n "$$list"; then \
+         list=`for p in $$list; do \
+           if test -f $$p; then d=; else d="$(srcdir)/"; fi; \
+## Note that we check existing man pages here only.  If there are man pages
+## which are not distributed, and may be generated only conditionally, then
+## we should not error out because of them.  This could be refined to take
+## into account only dist_*_MANS, but then we'd be missing out on those
+## the user distributes with EXTRA_DIST.
+           if test -f "$$d$$p"; then echo "$$d$$p"; else :; fi; done`; \
+         if test -n "$$list" && \
+           grep 'ab help2man is required to generate this page' $$list 
>/dev/null; then \
+           echo "error: found man pages containing the \`missing help2man' 
replacement text:" >&2; \
+           grep -l 'ab help2man is required to generate this page' $$list | 
sed 's/^/         /' >&2; \
+           echo "       to fix them, install help2man, remove and regenerate 
the man pages;" >&2; \
+           echo "       typically \`make maintainer-clean' will remove them" 
>&2; \
+           exit 1; \
+         else :; fi; \
+       else :; fi
+endif %?HAVE-MANS%
+endif %?INSTALL-MAN%
+##
 ## Only for the top dir.
 ##
 if %?TOPDIR_P%
@@ -172,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
@@ -194,18 +230,26 @@ endif %?TOPDIR_P%
 ## directory, then we use `distdir' instead of `top_distdir'; this lets
 ## us work correctly with an enclosing package.
 ##
+## Split the loop for the directory creation and the one for recursion,
+## so that with GNU make -n, only the latter is executed.
 if %?SUBDIRS%
-       list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
          if test "$$subdir" = .; then :; else \
            test -d "$(distdir)/$$subdir" \
            || $(MKDIR_P) "$(distdir)/$$subdir" \
            || exit 1; \
+         fi; \
+       done
+       @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+         if test "$$subdir" = .; then :; else \
            dir1=$$subdir; dir2="$(distdir)/$$subdir"; \
            $(am__relativize); \
            new_distdir=$$reldir; \
            dir1=$$subdir; dir2="$(top_distdir)"; \
            $(am__relativize); \
            new_top_distdir=$$reldir; \
+           echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) 
top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \
+           echo "     am__remove_distdir=: am__skip_length_check=: distdir)"; \
            ($(am__cd) $$subdir && \
              $(MAKE) $(AM_MAKEFLAGS) \
                top_distdir="$$new_top_distdir" \
@@ -302,6 +346,12 @@ dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
        $(am__remove_distdir)
 
+?XZ?DIST_ARCHIVES += $(distdir).tar.xz
+.PHONY: dist-xz
+dist-xz: distdir
+       tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
+       $(am__remove_distdir)
+
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
 .PHONY: dist-tarZ
 dist-tarZ: distdir
@@ -335,10 +385,15 @@ 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
 ?LZMA? tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
+?XZ?   tardir=$(distdir) && $(am__tar) | xz -c >$(distdir).tar.xz
 ?COMPRESS?     tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
 ?SHAR? shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
 ?ZIP?  -rm -f $(distdir).zip
@@ -354,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.
@@ -366,6 +425,8 @@ distcheck: dist
          bunzip2 -c $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          unlzma -c $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.xz*) \
+         xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
          uncompress -c $(distdir).tar.Z | $(am__untar) ;;\
        *.shar.gz*) \
@@ -381,11 +442,17 @@ distcheck: dist
        mkdir $(distdir)/_inst
 ## Undo the write access.
        chmod a-w $(distdir)
+## With GNU make, the following command will be executed even with `make -n',
+## due to the presence of `$(MAKE)'.  That is normally all well (and `$(MAKE)'
+## is necessary for things like parallel distcheck), but here we don't want
+## execution.  To avoid MAKEFLAGS parsing hassles, use a witness file that a
+## non-`-n' run would have just created.
+       test -d $(distdir)/_build || exit 0; \
 ## Compute the absolute path of `_inst'.  Strip any leading DOS drive
 ## to allow DESTDIR installations.  Otherwise "$(DESTDIR)$(prefix)" would
 ## expand to "c:/temp/am-dc-5668/c:/src/package/package-1.0/_inst".
        dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 
's,^[^:\\/]:[\\/],/,'` \
-## We will attemp a DESTDIR install in $dc_destdir.  We don't
+## We will attempt a DESTDIR install in $dc_destdir.  We don't
 ## create this directory under $dc_install_base, because it would
 ## create very long directory names.
          && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \
diff --git a/lib/am/install.am b/lib/am/install.am
index 885ad0b..8380fd3 100644
--- a/lib/am/install.am
+++ b/lib/am/install.am
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 2006, 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
@@ -62,6 +63,10 @@ install-data: install-data-am
 uninstall: uninstall-am
 endif !%?SUBDIRS%
 
+if %?maybe_BUILT_SOURCES%
+.MAKE: install
+endif %?maybe_BUILT_SOURCES%
+
 .MAKE .PHONY: install-am
 install-am: all-am
        @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
@@ -78,7 +83,7 @@ install-am: all-am
 ## directory.
 .MAKE .PHONY: install-strip
 install-strip:
-## Beware that they are two variables used to install programs:
+## Beware that there are two variables used to install programs:
 ##   INSTALL_PROGRAM is used for ordinary *_PROGRAMS
 ##   install_sh_PROGRAM is used for nobase_*_PROGRAMS (because install-sh
 ##                                                     creates directories)
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/lex.am b/lib/am/lex.am
index b44daf1..1b6c475 100644
--- a/lib/am/lex.am
+++ b/lib/am/lex.am
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006  Free Software Foundation, Inc.
+## Copyright (C) 2001, 2002, 2003, 2004, 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
@@ -23,7 +24,8 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
-?GENERIC?      $(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% $(LEX_OUTPUT_ROOT).c 
%OBJ% -- %COMPILE%
+?GENERIC?      %VERBOSE%$(am__skiplex) $(SHELL) $(YLWRAP) %SOURCE% 
$(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
+?!GENERIC?     %VERBOSE% \
 ?!GENERIC??DIST_SOURCE?        $(am__skiplex) \
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 ?!GENERIC?     $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo 
'$(srcdir)/'`%SOURCE% $(LEX_OUTPUT_ROOT).c %OBJ% -- %COMPILE%
diff --git a/lib/am/library.am b/lib/am/library.am
index 8bf83e5..79d36b6 100644
--- a/lib/am/library.am
+++ b/lib/am/library.am
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1999, 2003 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1999, 2003, 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
@@ -14,6 +15,6 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 %LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
-       -rm -f %LIBRARY%
-       $(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
-       $(RANLIB) %LIBRARY%
+       %SILENT%-rm -f %LIBRARY%
+       %VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) 
$(%XLIBRARY%_LIBADD)
+       %SILENT%$(RANLIB) %LIBRARY%
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/libtool.am b/lib/am/libtool.am
index 103f4d0..d565b69 100644
--- a/lib/am/libtool.am
+++ b/lib/am/libtool.am
@@ -1,6 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2005
-## Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2005,
+## 2008  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
@@ -26,4 +26,4 @@ clean-libtool:
 
 ?TOPDIR_P?distclean-am: distclean-libtool
 ?TOPDIR_P?distclean-libtool:
-?TOPDIR_P?     -rm -f libtool
+?TOPDIR_P?     -rm -f libtool config.lt
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/ltlibrary.am b/lib/am/ltlibrary.am
index 228f02e..ba8526d 100644
--- a/lib/am/ltlibrary.am
+++ b/lib/am/ltlibrary.am
@@ -1,5 +1,6 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 2003, 2005 Free Software Foundation, Inc.
+## Copyright (C) 1994, 1995, 1996, 2003, 2005, 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
@@ -14,4 +15,4 @@
 ## You should have received a copy of the GNU General Public License
 ## along with this program.  If not, see <http://www.gnu.org/licenses/>.
 %LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
-       $(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) 
$(LIBS)
+       %VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) 
$(%XLTLIBRARY%_LIBADD) $(LIBS)
diff --git a/lib/am/mans.am b/lib/am/mans.am
index 803a892..1828c5d 100644
--- a/lib/am/mans.am
+++ b/lib/am/mans.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008 Free Software
+## Copyright (C) 1998, 2001, 2003, 2004, 2006, 2008, 2009 Free Software
 ## Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -34,14 +34,13 @@ 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.
-?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_NOTRANS?   case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_NOTRANS? done; \
+?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
@@ -67,14 +66,13 @@ 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.
-?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_TRANS?     case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_TRANS?   done; \
+?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_TRANS?     sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | while read p; do \
 ## Find the file.
@@ -112,14 +110,13 @@ 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.
-?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_NOTRANS?   case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_NOTRANS? done; \
+?HAVE_NOTRANS? l2='%NOTRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_NOTRANS?   sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, change the extension if needed.
        } | sed 's,.*/,,;s,\.[^%SECTION%][0-9a-z]*$$,.%SECTION%,'`; \
        test -n "$$files" || exit 0; \
@@ -128,14 +125,13 @@ 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.
-?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do \
-## Accept files like `foo.1c'.
-?HAVE_TRANS?     case $$i in *.%SECTION%*) echo "$$i";; esac; \
-?HAVE_TRANS?   done; \
+?HAVE_TRANS?   l2='%TRANS_LIST%'; for i in $$l2; do echo "$$i"; done | \
+## Accept for `man1' files like `foo.1c' but not `sub.1/foo.2' or `foo-2.1.4'.
+?HAVE_TRANS?     sed -n '/\.%SECTION%[a-z]*$$/p'; \
 ## Extract basename of manpage, run it through the program rename
 ## transform, and change the extension if needed.
        } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^%SECTION%][0-9a-z]*$$,%SECTION%,;x' 
\
diff --git a/lib/am/program.am b/lib/am/program.am
index 65ba506..8f69c77 100644
--- a/lib/am/program.am
+++ b/lib/am/program.am
@@ -21,4 +21,4 @@
 ## Or maybe not... sadly, incremental linkers are rarer than losing
 ## systems.
        @rm -f %PROGRAM%%EXEEXT%
-       $(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
+       %VERBOSE%$(%XLINK%) $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_LDADD) $(LIBS)
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 9cfc645..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'"; \
@@ -306,8 +312,11 @@ uninstall-info-am:
            relfile=`echo "$$file" | sed 's|^.*/||'`; \
 ## install-info needs the actual info file.  We use the installed one,
 ## rather than relying on one still being in srcdir or builddir.
+## However, `make uninstall && make uninstall' should not fail,
+## so we ignore failure if the file did not exist.
            echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove 
'$(DESTDIR)$(infodir)/$$relfile'"; \
-           install-info --info-dir="$(DESTDIR)$(infodir)" --remove 
"$(DESTDIR)$(infodir)/$$relfile"; \
+           if install-info --info-dir="$(DESTDIR)$(infodir)" --remove 
"$(DESTDIR)$(infodir)/$$relfile"; \
+           then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; 
fi; \
          done; \
        else :; fi
        @$(NORMAL_UNINSTALL)
@@ -324,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"; \
@@ -332,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/am/vala.am b/lib/am/vala.am
index fa2a23c..ed12dc5 100644
--- a/lib/am/vala.am
+++ b/lib/am/vala.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2008  Free Software Foundation, Inc.
+## Copyright (C) 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
diff --git a/lib/am/yacc.am b/lib/am/yacc.am
index 50fd7fa..df9a766 100644
--- a/lib/am/yacc.am
+++ b/lib/am/yacc.am
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2006
+## Copyright (C) 1998, 1999, 2001, 2002, 2003, 2004, 2006, 2009
 ##   Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -41,7 +41,8 @@ endif %?MAINTAINER-MODE%
 
 ?GENERIC?%EXT%%DERIVED-EXT%:
 ?!GENERIC?%OBJ%: %SOURCE%
-?GENERIC?      $(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c %OBJ% 
y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
+?GENERIC?      %VERBOSE%$(am__skipyacc) $(SHELL) $(YLWRAP) %SOURCE% y.tab.c 
%OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- %COMPILE%
+?!GENERIC?     %VERBOSE% \
 ?!GENERIC??DIST_SOURCE?        $(am__skipyacc) \
 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
 ?!GENERIC?     $(SHELL) $(YLWRAP) `test -f '%SOURCE%' || echo 
'$(srcdir)/'`%SOURCE% y.tab.c %OBJ% y.tab.h %BASE%.h y.output %BASE%.output -- 
%COMPILE%
diff --git a/lib/compile b/lib/compile
index 35af809..af472ac 100755
--- a/lib/compile
+++ b/lib/compile
@@ -1,9 +1,10 @@
 #! /bin/sh
 # Wrapper for compilers which do not understand `-c -o'.
 
-scriptversion=2005-05-14.22
+scriptversion=2009-03-03.21
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009  Free Software
+# Foundation, Inc.
 # Written by Tom Tromey <address@hidden>.
 #
 # This program is free software; you can redistribute it and/or modify
@@ -102,13 +103,13 @@ if test -z "$ofile" || test -z "$cfile"; then
 fi
 
 # Name of file we expect compiler to create.
-cofile=`echo "$cfile" | sed -e 's|^.*/||' -e 's/\.c$/.o/'`
+cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'`
 
 # Create the lock directory.
-# Note: use `[/.-]' here to ensure that we don't use the same name
+# Note: use `[/\\:.-]' here to ensure that we don't use the same name
 # that we are using for the .o file.  Also, base the name on the expected
 # object file name, since that is what matters with a parallel build.
-lockdir=`echo "$cofile" | sed -e 's|[/.-]|_|g'`.d
+lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d
 while true; do
   if mkdir "$lockdir" >/dev/null 2>&1; then
     break
diff --git a/lib/config.guess b/lib/config.guess
index 6603908..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-03-12'
+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
@@ -796,7 +809,7 @@ EOF
            x86)
                echo i586-pc-interix${UNAME_RELEASE}
                exit ;;
-           EM64T | authenticamd)
+           EM64T | authenticamd | genuineintel)
                echo x86_64-unknown-interix${UNAME_RELEASE}
                exit ;;
            IA64)
@@ -935,6 +948,9 @@ EOF
        if test "$?" = 0 ; then LIBC="libc1" ; else LIBC="" ; fi
        echo ${UNAME_MACHINE}-unknown-linux-gnu${LIBC}
        exit ;;
+    padre:Linux:*:*)
+       echo sparc-unknown-linux-gnu
+       exit ;;
     parisc:Linux:*:* | hppa:Linux:*:*)
        # Look for CPU level
        case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in
@@ -985,9 +1001,6 @@ EOF
          a.out-i386-linux)
                echo "${UNAME_MACHINE}-pc-linux-gnuaout"
                exit ;;
-         coff-i386)
-               echo "${UNAME_MACHINE}-pc-linux-gnucoff"
-               exit ;;
          "")
                # Either a pre-BFD a.out linker (linux-gnuoldld) or
                # one that does not give us useful --help.
@@ -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 0f295d9..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-03-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,8 +250,9 @@ 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 \
+       | maxq | mb | microblaze | mcore | mep | metag \
        | mips | mipsbe | mipseb | mipsel | mipsle \
        | mips16 \
        | mips64 | mips64el \
@@ -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 \
@@ -288,7 +290,7 @@ case $basic_machine in
        | v850 | v850e \
        | we32k \
        | x86 | xc16x | xscale | xscalee[bl] | xstormy16 | xtensa \
-       | z8k)
+       | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
        m6811 | m68hc11 | m6812 | m68hc12)
@@ -331,9 +333,10 @@ 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-* \
+       | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \
        | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \
        | mips16-* \
        | mips64-* | mips64el-* \
@@ -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-* \
@@ -375,7 +378,7 @@ case $basic_machine in
        | x86-* | x86_64-* | xc16x-* | xps100-* | xscale-* | xscalee[bl]-* \
        | xstormy16-* | xtensa*-* \
        | ymp-* \
-       | z8k-*)
+       | z8k-* | z80-*)
                ;;
        # Recognize the basic CPU types without company name, with glob match.
        xtensa*)
@@ -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
@@ -463,6 +470,10 @@ case $basic_machine in
                basic_machine=c90-cray
                os=-unicos
                ;;
+        cegcc)
+               basic_machine=arm-unknown
+               os=-cegcc
+               ;;
        convex-c1)
                basic_machine=c1-convex
                os=-bsd
@@ -530,6 +541,10 @@ case $basic_machine in
                basic_machine=m88k-motorola
                os=-sysv3
                ;;
+       dicos)
+               basic_machine=i686-pc
+               os=-dicos
+               ;;
        djgpp)
                basic_machine=i586-pc
                os=-msdosdjgpp
@@ -1132,6 +1147,10 @@ case $basic_machine in
                basic_machine=z8k-unknown
                os=-sim
                ;;
+       z80-*-coff)
+               basic_machine=z80-unknown
+               os=-sim
+               ;;
        none)
                basic_machine=none-none
                os=-none
@@ -1170,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)
@@ -1242,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* \
@@ -1252,7 +1272,7 @@ case $os in
              | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
              | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
-             | -chorusos* | -chorusrdb* \
+             | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
              | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
@@ -1392,6 +1412,9 @@ case $os in
        -zvmoe)
                os=-zvmoe
                ;;
+       -dicos*)
+               os=-dicos
+               ;;
        -none)
                ;;
        *)
diff --git a/lib/depcomp b/lib/depcomp
index 0f2bf43..0fb633e 100755
--- a/lib/depcomp
+++ b/lib/depcomp
@@ -1,10 +1,10 @@
 #! /bin/sh
 # depcomp - compile a program generating dependencies as side-effects
 
-scriptversion=2007-03-29.01
+scriptversion=2009-03-04.20
 
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007 Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 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
@@ -85,6 +85,15 @@ if test "$depmode" = dashXmstdout; then
    depmode=dashmstdout
 fi
 
+cygpath_u="cygpath -u -f -"
+if test "$depmode" = msvcmsys; then
+   # This is just like msvisualcpp but w/o cygpath translation.
+   # Just convert the backslash-escaped backslashes to single forward
+   # slashes to satisfy depend.m4
+   cygpath_u="sed s,\\\\\\\\,/,g"
+   depmode=msvisualcpp
+fi
+
 case "$depmode" in
 gcc3)
 ## gcc 3 implements dependency tracking that does exactly what
@@ -190,14 +199,14 @@ sgi)
 ' < "$tmpdepfile" \
     | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' | \
     tr '
-' ' ' >> $depfile
-    echo >> $depfile
+' ' ' >> "$depfile"
+    echo >> "$depfile"
 
     # The second pass generates a dummy entry for each header file.
     tr ' ' '
 ' < "$tmpdepfile" \
    | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \
-   >> $depfile
+   >> "$depfile"
   else
     # The sourcefile does not contain any dependencies, so just
     # store a dummy comment line, to avoid errors with the Makefile
@@ -326,7 +335,12 @@ hp2)
   if test -f "$tmpdepfile"; then
     sed -e "s,^.*\.[a-z]*:,$object:," "$tmpdepfile" > "$depfile"
     # Add `dependent.h:' lines.
-    sed -ne '2,${; s/^ *//; s/ \\*$//; s/$/:/; p;}' "$tmpdepfile" >> "$depfile"
+    sed -ne '2,${
+              s/^ *//
+              s/ \\*$//
+              s/$/:/
+              p
+            }' "$tmpdepfile" >> "$depfile"
   else
     echo "#dummy" > "$depfile"
   fi
@@ -402,7 +416,7 @@ dashmstdout)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -453,7 +467,7 @@ makedepend)
   "$@" || exit $?
   # Remove any Libtool call
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -461,7 +475,8 @@ makedepend)
   # X makedepend
   shift
   cleared=no
-  for arg in "$@"; do
+  for arg
+  do
     case $cleared in
     no)
       set ""; shift
@@ -478,7 +493,7 @@ makedepend)
       set fnord "$@" "$arg"; shift ;;
     esac
   done
-  obj_suffix="`echo $object | sed 's/^.*\././'`"
+  obj_suffix=`echo "$object" | sed 's/^.*\././'`
   touch "$tmpdepfile"
   ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@"
   rm -f "$depfile"
@@ -498,7 +513,7 @@ cpp)
 
   # Remove the call to Libtool.
   if test "$libtool" = yes; then
-    while test $1 != '--mode=compile'; do
+    while test "X$1" != 'X--mode=compile'; do
       shift
     done
     shift
@@ -536,13 +551,27 @@ cpp)
 
 msvisualcpp)
   # Important note: in order to support this mode, a compiler *must*
-  # always write the preprocessed file to stdout, regardless of -o,
-  # because we must use -o when running libtool.
+  # always write the preprocessed file to stdout.
   "$@" || exit $?
+
+  # Remove the call to Libtool.
+  if test "$libtool" = yes; then
+    while test "X$1" != 'X--mode=compile'; do
+      shift
+    done
+    shift
+  fi
+
   IFS=" "
   for arg
   do
     case "$arg" in
+    -o)
+      shift
+      ;;
+    $object)
+      shift
+      ;;
     "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI")
        set fnord "$@"
        shift
@@ -555,16 +584,23 @@ msvisualcpp)
        ;;
     esac
   done
-  "$@" -E |
-  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::echo "`cygpath -u \\"\1\\"`":p' 
| sort | uniq > "$tmpdepfile"
+  "$@" -E 2>/dev/null |
+  sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > 
"$tmpdepfile"
   rm -f "$depfile"
   echo "$object : \\" > "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::   \1 \\:p' >> 
"$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::     \1 \\:p' >> 
"$depfile"
   echo "       " >> "$depfile"
-  . "$tmpdepfile" | sed 's% %\\ %g' | sed -n '/^\(.*\)$/ s::\1\::p' >> 
"$depfile"
+  sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile"
   rm -f "$tmpdepfile"
   ;;
 
+msvcmsys)
+  # This case exists only to let depend.m4 do its work.  It works by
+  # looking at the text of this script.  This case will never be run,
+  # since it is checked for above.
+  exit 1
+  ;;
+
 none)
   exec "$@"
   ;;
diff --git a/lib/gnupload b/lib/gnupload
index b90e3ae..7c34784 100755
--- a/lib/gnupload
+++ b/lib/gnupload
@@ -1,9 +1,9 @@
 #!/bin/sh
 # Sign files and upload them.
 
-scriptversion=2008-04-02.19
+scriptversion=2009-03-05.20
 
-# Copyright (C) 2004, 2005, 2006, 2007, 2008  Free Software Foundation
+# Copyright (C) 2004, 2005, 2006, 2007, 2008, 2009  Free Software Foundation
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,96 +23,212 @@ scriptversion=2008-04-02.19
 set -e
 
 GPG='gpg --batch --no-tty'
+conffile=.gnuploadrc
 to=
+dry_run=false
+symlink_files=
+delete_files=
+delete_symlinks=
+collect_var=
+dbg=
 
-usage="Usage: $0 [OPTIONS]... FILES...
+usage="Usage: $0 [OPTIONS]... [COMMAND] FILES... [[COMMAND] FILES...]
 
 Sign all FILES, and upload them to selected destinations, according to
 <http://www.gnu.org/prep/maintain/html_node/Automated-FTP-Uploads.html>.
 
+Commands:
+  --delete                 delete FILES from destination
+  --symlink                create symbolic links
+  --rmsymlink              remove symbolic links
+  --                       treat the remaining arguments as files to upload
+
 Options:
   --help                   print this help text and exit
   --to DEST                specify one destination for FILES
                            (multiple --to options are allowed)
   --user NAME              sign with key NAME
+  --symlink-regex[=EXPR]   use sed script EXPR to compute symbolic link names
+  --dry-run                do nothing, show what would have been done
   --version                output version information and exit
 
+If --symlink-regex is given without EXPR, then the link target name
+is created by replacing the version information with \`-latest', e.g.:
+
+  foo-1.3.4.tar.gz -> foo-latest.tar.gz
+
 Recognized destinations are:
   alpha.gnu.org:DIRECTORY
   savannah.gnu.org:DIRECTORY
   savannah.nongnu.org:DIRECTORY
   ftp.gnu.org:DIRECTORY
                            build directive files and upload files by FTP
+  download.gnu.org.ua:{alpha|ftp}/DIRECTORY
+                           build directive files and upload files by SFTP
   address@hidden:DIRECTORY    upload files with scp
 
-Simple single-target single-file examples:
-  gnupload --to alpha.gnu.org:automake automake-1.8.2b.tar.gz
-  gnupload --to ftp.gnu.org:automake automake-1.8.3.tar.gz
+Options and commands are applied in order.  If the file $conffile exists
+in the current working directory, its contents are prepended to the
+actual command line options.  Use this to keep your defaults.  Comments
+(#) and empty lines in $conffile are allowed.
+
+Examples:
+1. Upload automake-1.8.2b.tar.gz and automake-1.8.2b.tar.bz2 to two sites:
+  gnupload --to sources.redhat.com:~ftp/pub/automake \\
+           --to alpha.gnu.org:automake \\
+           automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
+
+2. Same as above, but also create symbolic links to automake-latest.tar.*:
+  gnupload --to sources.redhat.com:~ftp/pub/automake \\
+           --to alpha.gnu.org:automake \\
+           --symlink-regex \\
+           automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
+
+3. Symlink automake-1.8.2b.tar.gz to automake-latest.tar.gz and
+automake-1.8.2b.tar.bz2 to automake-latest.tar.bz2 on both sites:
 
-Multiple-target multiple-file example:
   gnupload --to sources.redhat.com:~ftp/pub/automake \\
            --to alpha.gnu.org:automake \\
+           --symlink automake-1.8.2b.tar.gz automake-latest.tar.gz \\
+                     automake-1.8.2b.tar.bz2 automake-latest.tar.bz2
+
+4. Delete automake-1.8.2a.tar.gz and .bz2, remove symlink
+automake-latest.tar.gz and upload automake-1.8.2b.tar.gz:
+
+  gnupload --to sources.redhat.com:~ftp/pub/automake \\
+           --to alpha.gnu.org:automake \\
+           --delete automake-1.8.2a.tar.gz automake-1.8.2a.tar.bz2 \\
+           --rmsymlink automake-latest.tar.gz \\
+           -- \\
            automake-1.8.2b.tar.gz automake-1.8.2b.tar.bz2
 
 Report bugs to <address@hidden>.
 Send patches to <address@hidden>."
 
+# Read local configuration file
+if test -r "$conffile"; then
+  echo "$0: Reading configuration file $conffile"
+  eval set x "`sed 's/#.*$//;/^$/d' \"$conffile\" | tr '\012\015' '  '` 
\"address@hidden""
+  shift
+fi
+
 while test -n "$1"; do
   case $1 in
+  -*)
+    collect_var=
+    case $1 in
     --help)
       echo "$usage"
       exit $?
       ;;
     --to)
       if test -z "$2"; then
-       echo "$0: Missing argument for --to" 1>&2
+        echo "$0: Missing argument for --to" 1>&2
         exit 1
       else
         to="$to $2"
-        shift 2
+        shift
       fi
       ;;
     --user)
       if test -z "$2"; then
-       echo "$0: Missing argument for --user" 1>&2
+        echo "$0: Missing argument for --user" 1>&2
         exit 1
       else
         GPG="$GPG --local-user $2"
-        shift 2
+        shift
       fi
       ;;
+    --delete)
+      collect_var=delete_files
+      ;;
+    --rmsymlink)
+      collect_var=delete_symlinks
+      ;;
+    --symlink-regex=*)
+      symlink_expr=`expr "$1" : '[^=]*=\(.*\)'`
+      ;;
+    --symlink-regex)
+      symlink_expr='s|-[0-9][0-9\.]*\(-[0-9][0-9]*\)\{0,1\}\.|-latest.|'
+      ;;
+    --symlink)
+      collect_var=symlink_files
+      ;;
+    --dry-run|-n)
+      dry_run=:
+      ;;
     --version)
       echo "gnupload $scriptversion"
       exit $?
       ;;
+    --)
+      shift
+      break
+      ;;
     -*)
       echo "$0: Unknown option \`$1', try \`$0 --help'" 1>&2
       exit 1
       ;;
-    *)
+    esac
+    ;;
+  *)
+    if test -z "$collect_var"; then
       break
-      ;;
+    else
+      eval "$collect_var=\"\$$collect_var $1\""
+    fi
+    ;;
   esac
+  shift
 done
 
-if test $# = 0; then
-  echo "$0: No file to upload" 1>&2
+dprint()
+{
+  echo "Running $*..."
+}
+
+if $dry_run; then
+  dbg=dprint
+fi
+
+if test -z "$to"; then
+  echo "$0: Missing destination sites" >&2
   exit 1
-else
-  :
 fi
 
-# Make sure all files exist.  We don't want to ask
-# for the passphrase if the script will fail.
-for file
-do
-  if test ! -f $file; then
-    echo "$0: Cannot find \`$file'" 1>&2
+if test -n "$symlink_files"; then
+  x=`echo "$symlink_files" | sed 's/[^ ]//g;s/  //g'`
+  if test -n "$x"; then
+    echo "$0: Odd number of symlink arguments" >&2
     exit 1
-  else
-    :
   fi
-done
+fi
+
+if test $# = 0; then
+  if test -z "${symlink_files}${delete_files}${delete_symlinks}"; then
+    echo "$0: No file to upload" 1>&2
+    exit 1
+  fi
+else
+  # Make sure all files exist.  We don't want to ask
+  # for the passphrase if the script will fail.
+  for file
+  do
+    if test ! -f $file; then
+      echo "$0: Cannot find \`$file'" 1>&2
+      exit 1
+    elif test -n "$symlink_expr"; then
+      linkname=`echo $file | sed "$symlink_expr"`
+      if test -z "$linkname"; then
+        echo "$0: symlink expression produces empty results" >&2
+        exit 1
+      elif test "$linkname" = $file; then
+        echo "$0: symlink expression does not alter file name" >&2
+        exit 1
+      fi
+    fi
+  done
+fi
 
 # Make sure passphrase is not exported in the environment.
 unset passphrase
@@ -129,56 +245,164 @@ read -r passphrase
 stty echo
 echo
 
-for file
+if test $# -ne 0; then
+  for file
+  do
+    echo "Signing $file..."
+    rm -f $file.sig
+    echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
+  done
+fi
+
+
+# mkdirective DESTDIR BASE FILE STMT
+# Arguments: See upload, below
+mkdirective ()
+{
+  stmt="$4"
+  if test -n "$3"; then
+    stmt="
+filename: $3$stmt"
+  fi
+
+  cat >${2}.directive<<EOF
+version: 1.1
+directory: $1
+comment: gnupload v. $scriptversion$stmt
+EOF
+  if $dry_run; then
+    echo "File ${2}.directive:"
+    cat ${2}.directive
+    echo "File ${2}.directive:" | sed 's/./-/g'
+  fi
+}
+
+mksymlink ()
+{
+  while test $# -ne 0
+  do
+    echo "symlink: $1 $2"
+    shift
+    shift
+  done
+}
+
+# upload DEST DESTDIR BASE FILE STMT FILES
+# Arguments:
+#  DEST     Destination site;
+#  DESTDIR  Destination directory;
+#  BASE     Base name for the directive file;
+#  FILE     Name of the file to distribute (may be empty);
+#  STMT     Additional statements for the directive file;
+#  FILES    List of files to upload.
+upload ()
+{
+  dest=$1
+  destdir=$2
+  base=$3
+  file=$4
+  stmt=$5
+  files=$6
+
+  rm -f $base.directive $base.directive.asc
+  case $dest in
+    alpha.gnu.org:*)
+      mkdirective "$destdir" "$base" "$file" "$stmt"
+      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign 
$base.directive
+      $dbg ncftpput ftp-upload.gnu.org /incoming/alpha $files 
$base.directive.asc
+      ;;
+    ftp.gnu.org:*)
+      mkdirective "$destdir" "$base" "$file" "$stmt"
+      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign 
$base.directive
+      $dbg ncftpput ftp-upload.gnu.org /incoming/ftp $files $base.directive.asc
+      ;;
+    savannah.gnu.org:*)
+      if test -z "$files"; then
+        echo "$0: warning: standalone directives not applicable for $dest" >&2
+      fi
+      $dbg ncftpput savannah.gnu.org /incoming/savannah/$destdir $files
+      ;;
+    savannah.nongnu.org:*)
+      if test -z "$files"; then
+        echo "$0: warning: standalone directives not applicable for $dest" >&2
+      fi
+      $dbg ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files
+      ;;
+    download.gnu.org.ua:alpha/*|download.gnu.org.ua:ftp/*)
+      destdir_p1=`echo "$destdir" | sed 's,^[^/]*/,,'`
+      destdir_topdir=`echo "$destdir" | sed 's,/.*,,'`
+      mkdirective "$destdir_p1" "$base" "$file" "$stmt"
+      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign 
$base.directive
+      for f in $files $base.directive.asc
+      do
+        echo put $f
+      done | $dbg sftp -b - puszcza.gnu.org.ua:/incoming/$destdir_topdir
+      ;;
+    /*)
+      dest_host=`echo "$dest" | sed 's,:.*,,'`
+      mkdirective "$destdir" "$base" "$file" "$stmt"
+      echo "$passphrase" | $dbg $GPG --passphrase-fd 0 --clearsign 
$base.directive
+      $dbg cp $files $base.directive.asc $dest_host
+      ;;
+    *)
+      if test -z "$files"; then
+        echo "$0: warning: standalone directives not applicable for $dest" >&2
+      fi
+      $dbg scp $files $dest
+      ;;
+  esac
+  rm -f $base.directive $base.directive.asc
+}
+
+#####
+# Process any standalone directives
+stmt=
+if test -n "$symlink_files"; then
+  stmt="$stmt
+`mksymlink $symlink_files`"
+fi
+
+for file in $delete_files
+do
+  stmt="$stmt
+archive: $file"
+done
+
+for file in $delete_symlinks
 do
-  echo "Signing $file..."
-  rm -f $file.sig
-  echo $passphrase | $GPG --passphrase-fd 0 -ba -o $file.sig $file
+  stmt="$stmt
+rmsymlink: $file"
 done
 
+if test -n "$stmt"; then
+  for dest in $to
+  do
+    destdir=`echo $dest | sed 's/[^:]*://'`
+    upload "$dest" "$destdir" "`hostname`-$$" "" "$stmt"
+  done
+fi
+
+# Process actual uploads
 for dest in $to
 do
   for file
   do
     echo "Uploading $file to $dest..."
+    stmt=
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
-    case $dest in
-      alpha.gnu.org:*)
-       rm -f $file.directive $file.directive.asc
-       cat >$file.directive<<EOF
-version: 1.1
-directory: $destdir
-filename: `basename -- "$file"`
-EOF
-       echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
-        ncftpput ftp-upload.gnu.org /incoming/alpha $files $file.directive.asc
-       rm -f $file.directive $file.directive.asc
-       ;;
-      ftp.gnu.org:*)
-       rm -f $file.directive $file.directive.asc
-       cat >$file.directive<<EOF
-version: 1.1
-directory: $destdir
-filename: `basename -- "$file"`
-EOF
-       echo "$passphrase" | $GPG --passphrase-fd 0 --clearsign $file.directive
-        ncftpput ftp-upload.gnu.org /incoming/ftp $files $file.directive.asc
-       rm -f $file.directive $file.directive.asc
-       ;;
-      savannah.gnu.org:*)
-        ncftpput savannah.gnu.org /incoming/savannah/$destdir $files
-       ;;
-      savannah.nongnu.org:*)
-        ncftpput savannah.nongnu.org /incoming/savannah/$destdir $files
-       ;;
-      *)
-       scp $files $dest
-       ;;
-    esac
+    if test -n "$symlink_expr"; then
+      linkname=`echo $file | sed "$symlink_expr"`
+      stmt="$stmt
+symlink: $file $linkname
+symlink: $file.sig $linkname.sig"
+    fi
+    upload "$dest" "$destdir" "$file" "$file" "$stmt" "$files"
   done
 done
 
+exit 0
+
 # Local variables:
 # eval: (add-hook 'write-file-hooks 'time-stamp)
 # time-stamp-start: "scriptversion="
diff --git a/lib/missing b/lib/missing
index 68e3a41..f359dae 100755
--- a/lib/missing
+++ b/lib/missing
@@ -1,10 +1,10 @@
 #! /bin/sh
 # Common stub for a few missing GNU programs while installing.
 
-scriptversion=2006-05-10.23
+scriptversion=2008-12-21.33
 
-# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 2000, 2002, 2003, 2004, 2005, 2006,
+# 2008  Free Software Foundation, Inc.
 # Originally by Fran,cois Pinard <address@hidden>, 1996.
 
 # This program is free software; you can redistribute it and/or modify
@@ -87,6 +87,9 @@ Supported PROGRAM values:
   tar          try tar, gnutar, gtar, then tar without non-portable flags
   yacc         create \`y.tab.[ch]', if possible, from existing .[ch]
 
+Version suffixes to PROGRAM as well as the prefixes \`gnu-', \`gnu', and
+\`g' are ignored when checking the name.
+
 Send bug reports to <address@hidden>."
     exit $?
     ;;
@@ -104,15 +107,22 @@ Send bug reports to <address@hidden>."
 
 esac
 
+# normalize program name to check for.
+program=`echo "$1" | sed '
+  s/^gnu-//; t
+  s/^gnu//; t
+  s/^g//; t'`
+
 # Now exit if we have it, but it failed.  Also exit now if we
 # don't have it and --version was passed (most likely to detect
-# the program).
+# the program).  This is about non-GNU programs, so use $1 not
+# $program.
 case $1 in
-  lex|yacc)
+  lex*|yacc*)
     # Not GNU programs, they don't have --version.
     ;;
 
-  tar)
+  tar*)
     if test -n "$run"; then
        echo 1>&2 "ERROR: \`tar' requires --run"
        exit 1
@@ -136,7 +146,7 @@ esac
 
 # If it does not exist, or fails to run (possibly an outdated version),
 # try to emulate it.
-case $1 in
+case $program in
   aclocal*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
@@ -146,7 +156,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch aclocal.m4
     ;;
 
-  autoconf)
+  autoconf*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`${configure_ac}'.  You might want to install the
@@ -155,7 +165,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch configure
     ;;
 
-  autoheader)
+  autoheader*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified \`acconfig.h' or \`${configure_ac}'.  You might want
@@ -185,7 +195,7 @@ WARNING: \`$1' is $msg.  You should only need it if
           while read f; do touch "$f"; done
     ;;
 
-  autom4te)
+  autom4te*)
     echo 1>&2 "\
 WARNING: \`$1' is needed, but is $msg.
          You might have modified some files without having the
@@ -208,7 +218,7 @@ WARNING: \`$1' is needed, but is $msg.
     fi
     ;;
 
-  bison|yacc)
+  bison*|yacc*)
     echo 1>&2 "\
 WARNING: \`$1' $msg.  You should only need it if
          you modified a \`.y' file.  You may need the \`Bison' package
@@ -238,7 +248,7 @@ WARNING: \`$1' $msg.  You should only need it if
     fi
     ;;
 
-  lex|flex)
+  lex*|flex*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.l' file.  You may need the \`Flex' package
@@ -261,7 +271,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     fi
     ;;
 
-  help2man)
+  help2man*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
         you modified a dependency of a manual page.  You may need the
@@ -275,11 +285,11 @@ WARNING: \`$1' is $msg.  You should only need it if
     else
        test -z "$file" || exec >$file
        echo ".ab help2man is required to generate this page"
-       exit 1
+       exit $?
     fi
     ;;
 
-  makeinfo)
+  makeinfo*)
     echo 1>&2 "\
 WARNING: \`$1' is $msg.  You should only need it if
          you modified a \`.texi' or \`.texinfo' file, or any other file
@@ -308,7 +318,7 @@ WARNING: \`$1' is $msg.  You should only need it if
     touch $file
     ;;
 
-  tar)
+  tar*)
     shift
 
     # We have already tried tar in the generic part.
diff --git a/lib/py-compile b/lib/py-compile
index 865cda8..88776bc 100755
--- a/lib/py-compile
+++ b/lib/py-compile
@@ -1,9 +1,10 @@
 #!/bin/sh
 # py-compile - Compile a Python program
 
-scriptversion=2005-05-14.22
+scriptversion=2008-10-26.11
 
-# Copyright (C) 2000, 2001, 2003, 2004, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2003, 2004, 2005, 2008  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
@@ -101,38 +102,38 @@ else
 fi
 
 $PYTHON -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
 
 files = '''$files'''
 
-print 'Byte-compiling python modules...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules...\n')
+for file in files.split():
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+           continue
+    sys.stdout.write(file)
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'c', path)
-print" || exit $?
+sys.stdout.write('\n')" || exit $?
 
 # this will fail for python < 1.5, but that doesn't matter ...
 $PYTHON -O -c "
-import sys, os, string, py_compile
+import sys, os, py_compile
 
 files = '''$files'''
-print 'Byte-compiling python modules (optimized versions) ...'
-for file in string.split(files):
+sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n')
+for file in files.split():
     $pathtrans
     $filetrans
     if not os.path.exists(filepath) or not (len(filepath) >= 3
                                             and filepath[-3:] == '.py'):
-       continue
-    print file,
+           continue
+    sys.stdout.write(file)
     sys.stdout.flush()
     py_compile.compile(filepath, filepath + 'o', path)
-print" 2>/dev/null || :
+sys.stdout.write('\n')" 2>/dev/null || :
 
 # Local Variables:
 # mode: shell-script
diff --git a/lib/texinfo.tex b/lib/texinfo.tex
index e4f38dd..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-03-17.10}
+\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.
@@ -461,7 +464,7 @@
 \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm}
 \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm}
 
-% Each occurence of `\^^M' or `<space>\^^M' is replaced by a single space.
+% Each occurrence of `\^^M' or `<space>\^^M' is replaced by a single space.
 %
 % \argremovec might leave us with trailing space, e.g.,
 %    @end itemize  @c foo
@@ -486,7 +489,7 @@
 % to get _exactly_ the rest of the line, we had to prevent such situation.
 % We prepended an \empty token at the very beginning and we expand it now,
 % just before passing the control to \argtorun.
-% (Similarily, we have to think about #3 of \argcheckspacesY above: it is
+% (Similarly, we have to think about #3 of \argcheckspacesY above: it is
 % either the null string, or it ends with \^^M---thus there is no danger
 % that a pair of braces would be stripped.
 %
@@ -543,12 +546,12 @@
 % used to check whether the current environment is the one expected.
 %
 % Non-false conditionals (@iftex, @ifset) don't fit into this, so they
-% are not treated as enviroments; they don't open a group.  (The
+% are not treated as environments; they don't open a group.  (The
 % implementation of @end takes care not to call \endgroup in this
 % special case.)
 
 
-% At runtime, environments start with this:
+% At run-time, environments start with this:
 \def\startenvironment#1{\begingroup\def\thisenv{#1}}
 % initialize
 \let\thisenv\empty
@@ -566,7 +569,7 @@
   \fi
 }
 
-% Evironment mismatch, #1 expected:
+% Environment mismatch, #1 expected:
 \def\badenverr{%
   \errhelp = \EMsimple
   \errmessage{This command can appear only \inenvironment\temp,
@@ -650,8 +653,8 @@
 \def\jmacro{j}
 \def\dotless#1{%
   \def\temp{#1}%
-  \ifx\temp\imacro \ptexi
-  \else\ifx\temp\jmacro \j
+  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
   \else address@hidden can be used only with i or j}%
   \fi\fi
 }
@@ -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}
 %
@@ -924,8 +927,9 @@ where each line of input produces a line of output.}
   \pushthisfilestack
   \def\thisfile{#1}%
   {%
-    \makevalueexpandable  % we want to expand any @value in FILE.  
+    \makevalueexpandable  % we want to expand any @value in FILE.
     \turnoffactive        % and allow special characters in the expansion
+    \indexnofonts         % Allow `@@' and other weird things in file names.
     \edef\temp{\noexpand\input #1 }%
     %
     % This trickery is to read FILE outside of a group, in case it makes
@@ -944,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{%
@@ -1119,6 +1125,16 @@ where each line of input produces a line of output.}
   \mathunderscore
   \let\\ = \mathbackslash
   \mathactive
+  % make the texinfo accent commands work in math mode
+  \let\"=\ddot
+  \let\'=\acute
+  \let\==\bar
+  \let\^=\hat
+  \let\`=\grave
+  \let\u=\breve
+  \let\v=\check
+  \let\~=\tilde
+  \let\dotaccent=\dot
   $\finishmath
 }
 \def\finishmath#1{#1$\endgroup}  % Close the group opened by \tex.
@@ -1132,17 +1148,21 @@ 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
   }
 }
 
-% @bullet and @minus need the same treatment as @math, just above.
+% Some math mode symbols.
 \def\bullet{$\ptexbullet$}
-\def\minus{$-$}
+\def\geq{\ifmmode \ge\else $\ge$\fi}
+\def\leq{\ifmmode \le\else $\le$\fi}
+\def\minus{\ifmmode -\else $-$\fi}
 
 % @dots{} outputs an ellipsis using the current font.
 % We do .5em per period so that it has the same spacing in the cm
@@ -1265,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
@@ -1277,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%
@@ -1316,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{%
@@ -1367,8 +1390,11 @@ output) for that.)}
           \openin 1 #1.jpeg \ifeof 1
             \openin 1 #1.JPG \ifeof 1
               \openin 1 #1.pdf \ifeof 1
-                \errhelp = \nopdfimagehelp
-                \errmessage{Could not find image file #1 for pdf}%
+                \openin 1 #1.PDF \ifeof 1
+                  \errhelp = \nopdfimagehelp
+                  \errmessage{Could not find image file #1 for pdf}%
+                \else \gdef\pdfimgext{PDF}%
+                \fi
               \else \gdef\pdfimgext{pdf}%
               \fi
             \else \gdef\pdfimgext{JPG}%
@@ -1382,7 +1408,7 @@ output) for that.)}
       \closein 1
     \endgroup
     %
-    % without \immediate, pdftex seg faults when the same image is
+    % without \immediate, ancient pdftex seg faults when the same image is
     % included twice.  (Version 3.14159-pre-1.0-unofficial-20010704.)
     \ifnum\pdftexversion < 14
       \immediate\pdfimage
@@ -1547,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) >>}%
@@ -1582,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
@@ -1612,6 +1643,10 @@ output) for that.)}
 \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf}
 \def\tt{\fam=\ttfam \setfontstyle{tt}}
 
+% Unfortunately, we have to override this for titles and the like, since
+% in those cases "rm" is bold.  Sigh.
+\def\rmisbold{\rm\def\curfontstyle{bf}}
+
 % Texinfo sort of supports the sans serif font style, which plain TeX does not.
 % So we set up a \sf.
 \newfam\sffam
@@ -1946,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}
@@ -2009,8 +2044,6 @@ end
 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
 \def\titleecsize{2074}
 
 % Chapter (and unnumbered) fonts (17.28pt).
@@ -2079,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}
@@ -2142,8 +2175,6 @@ end
 \setfont\titlesc\scbshape{10}{\magstep4}{OT1}
 \font\titlei=cmmi12 scaled \magstep3
 \font\titlesy=cmsy10 scaled \magstep4
-\def\authorrm{\secrm}
-\def\authortt{\sectt}
 \def\titleecsize{2074}
 
 % Chapter fonts (14.4pt).
@@ -2170,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}
 
@@ -2214,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}
 %
@@ -2224,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
@@ -2275,7 +2306,7 @@ end
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
   \resetmathfonts \setleading{25pt}}
-\def\titlefont#1{{\titlefonts\rm #1}}
+\def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
   \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc
@@ -2326,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
 
@@ -2339,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
 
@@ -2375,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
 
@@ -2417,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.
@@ -2474,11 +2633,11 @@ end
 {
   \catcode`\-=\active \catcode`\_=\active
   \catcode`\'=\active \catcode`\`=\active
+  \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
@@ -2510,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}
@@ -2530,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),
@@ -2551,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
@@ -2621,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}%
@@ -2660,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}%
@@ -2670,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\$}}
@@ -2679,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}}
@@ -2734,8 +2925,36 @@ end
 \def\quotedblbase{{\ecfont \char"12}}
 \def\quotesinglbase{{\ecfont \char"0D}}
 %
+% This positioning is not perfect (see the ogonek LaTeX package), but
+% 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.
+\def\ogonek#1{{%
+  \def\temp{#1}%
+  \ifx\temp\macrocharA\Aogonek
+  \else\ifx\temp\macrochara\aogonek
+  \else\ifx\temp\macrocharE\Eogonek
+  \else\ifx\temp\macrochare\eogonek
+  \else
+    \ecfont \setbox0=\hbox{#1}%
+    \ifdim\ht0=1ex\accent"0C #1%
+    \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}%
+    \fi
+  \fi\fi\fi\fi
+  }%
+}
+\def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A}
+\def\aogonek{{\ecfont \char"A1}}\def\macrochara{a}
+\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/sanserif and italic/slanted, but this
+  % We can't distinguish serif/sans and italic/slanted, but this
   % is used for crude hacks anyway (like adding French and German
   % quotes to documents typeset with CM, where we lose kerning), so
   % hopefully nobody will notice/care.
@@ -2768,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
@@ -2863,12 +3082,9 @@ end
 \let\subtitlerm=\tenrm
 \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines}
 
-\def\authorfont{\authorrm \normalbaselineskip = 16pt \normalbaselines
-               \let\tt=\authortt}
-
 \parseargdef\title{%
   \checkenv\titlepage
-  \leftline{\titlefonts\rm #1}
+  \leftline{\titlefonts\rmisbold #1}
   % print a rule at the page bottom also.
   \finishedtitlepagefalse
   \vskip4pt \hrule height 4pt width \hsize \vskip4pt
@@ -2889,7 +3105,7 @@ end
   \else
     \checkenv\titlepage
     \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi
-    {\authorfont \leftline{#1}}%
+    {\secfonts\rmisbold \leftline{#1}}%
   \fi
 }
 
@@ -3117,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
@@ -3211,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
 }
 
@@ -3234,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
 }
@@ -3455,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}%
 
@@ -3859,11 +4092,11 @@ end
 \def\dosynindex#1#2#3{%
   % Only do \closeout if we haven't already done it, else we'll end up
   % closing the target index.
-  \expandafter \ifx\csname donesynindex#2\endcsname \undefined
+  \expandafter \ifx\csname donesynindex#2\endcsname \relax
     % The \closeout helps reduce unnecessary open files; the limit on the
     % Acorn RISC OS is a mere 16 files.
     \expandafter\closeout\csname#2indfile\endcsname
-    \expandafter\let\csname\donesynindex#2\endcsname = 1
+    \expandafter\let\csname donesynindex#2\endcsname = 1
   \fi
   % redefine \fooindfile:
   \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname
@@ -3913,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}
@@ -3921,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
   %
@@ -3978,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
@@ -4021,6 +4258,7 @@ end
   \definedummyword\guilsinglright
   \definedummyword\expansion
   \definedummyword\minus
+  \definedummyword\ogonek
   \definedummyword\pounds
   \definedummyword\point
   \definedummyword\print
@@ -4064,6 +4302,7 @@ end
   \definedummyword\v
   \definedummyword\H
   \definedummyword\dotaccent
+  \definedummyword\ogonek
   \definedummyword\ringaccent
   \definedummyword\tieaccent
   \definedummyword\ubaraccent
@@ -4131,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}%
@@ -4182,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
 }
 
@@ -4314,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.
@@ -4444,7 +4687,7 @@ end
 %
 % A straightforward implementation would start like this:
 %      \def\entry#1#2{...
-% But this frozes the catcodes in the argument, and can cause problems to
+% But this freezes the catcodes in the argument, and can cause problems to
 % @code, which sets - active.  This problem was fixed by a kludge---
 % ``-'' was active throughout whole index, but this isn't really right.
 %
@@ -4895,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}%
@@ -4906,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}%
   %
@@ -5046,7 +5293,6 @@ end
 %       3) Likewise, headings look best if no \parindent is used, and
 %          if justification is not attempted.  Hence \raggedright.
 
-
 \def\majorheading{%
   {\advance\chapheadingskip by 10pt \chapbreak }%
   \parsearg\chapheadingzzz
@@ -5055,8 +5301,8 @@ end
 \def\chapheading{\chapbreak \parsearg\chapheadingzzz}
 \def\chapheadingzzz#1{%
   {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                    \parindent=0pt\raggedright
-                    \rm #1\hfill}}%
+                    \parindent=0pt\ptexraggedright
+                    \rmisbold #1\hfill}}%
   \bigskip \par\penalty 200\relax
   \suppressfirstparagraphindent
 }
@@ -5148,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
@@ -5156,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
@@ -5175,7 +5427,7 @@ end
   \domark
   %
   {%
-    \chapfonts \rm
+    \chapfonts \rmisbold
     %
     % Have to define \lastsection before calling \donoderef, because the
     % xref code eventually uses it.  On the other hand, it has to be called
@@ -5212,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}%
   }%
@@ -5236,8 +5488,8 @@ end
 %
 \def\unnchfopen #1{%
 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
-                       \parindent=0pt\raggedright
-                       \rm #1\hfill}}\bigskip \par\nobreak
+                       \parindent=0pt\ptexraggedright
+                       \rmisbold #1\hfill}}\bigskip \par\nobreak
 }
 \def\chfopen #1#2{\chapoddpage {\chapfonts
 \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}%
@@ -5246,7 +5498,7 @@ end
 \def\centerchfopen #1{%
 \chapoddpage {\chapfonts \vbox{\hyphenpenalty=10000\tolerance=5000
                        \parindent=0pt
-                       \hfill {\rm #1}\hfill}}\bigskip \par\nobreak
+                       \hfill {\rmisbold #1}\hfill}}\bigskip \par\nobreak
 }
 \def\CHAPFopen{%
   \global\let\chapmacro=\chfopen
@@ -5279,7 +5531,7 @@ end
 \def\sectionheading#1#2#3#4{%
   {%
     % Switch to the right set of fonts.
-    \csname #2fonts\endcsname \rm
+    \csname #2fonts\endcsname \rmisbold
     %
     \def\sectionlevel{#2}%
     \def\temptype{#3}%
@@ -5299,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
@@ -5309,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
@@ -5364,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}%
   }%
@@ -5380,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
@@ -5442,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
@@ -5492,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.
@@ -5662,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
@@ -5711,6 +5940,8 @@ end
   \catcode `\|=\other
   \catcode `\<=\other
   \catcode `\>=\other
+  \catcode`\`=\other
+  \catcode`\'=\other
   \escapechar=`\\
   %
   \let\b=\ptexb
@@ -5846,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
@@ -5853,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
@@ -5864,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:
@@ -5912,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
 }
@@ -5950,12 +6205,36 @@ 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
 % \afterenvbreak, temporarily make \parskip 0.
 %
-\envdef\quotation{%
+\def\quotationstart{%
   {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
   \parindent=0pt
   %
@@ -5970,6 +6249,17 @@ end
   \parsearg\quotationlabel
 }
 
+\envdef\quotation{%
+  \setnormaldispenv
+  \quotationstart
+}
+
+\envdef\smallquotation{%
+  \setsmalldispenv
+  \quotationstart
+}
+\let\Esmallquotation = \Equotation
+
 % We have retained a nonzero parskip for the environment, since we're
 % doing normal filling.
 %
@@ -6005,18 +6295,16 @@ 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
 \def\uncatcodespecials{%
   \def\do##1{\catcode`##1=\other}\dospecials}
 %
-% [Knuth] pp. 380,381,391
-% Disable Spanish ligatures ?` and !` of \tt font
-\begingroup
-  \catcode`\`=\active\gdef`{\relax\lq}
-\endgroup
-%
 % Setup for the @verb command.
 %
 % Eight spaces for a tab
@@ -6028,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
@@ -6043,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
-      `%
-    \else \char'22 \fi
-  \else \char'22 \fi
-}
 %
 \begingroup
   \catcode`\^^I=\active
@@ -6083,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.
@@ -6099,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
@@ -6161,6 +6414,7 @@ end
   {%
     \makevalueexpandable
     \setupverbatim
+    \indexnofonts       % Allow `@@' and other weird things in file names.
     \input #1
     \afterenvbreak
   }%
@@ -6260,7 +6514,7 @@ end
 \def\Edefun{\endgraf\medbreak}
 
 % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn;
-% the only thing remainnig is to define \deffnheader.
+% the only thing remaining is to define \deffnheader.
 %
 \def\makedefun#1{%
   \expandafter\let\csname E#1\endcsname = \Edefun
@@ -6439,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
 }
@@ -6593,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
@@ -7333,7 +7587,7 @@ end
 % In case a @footnote appears in a vbox, save the footnote text and create
 % the real \insert just after the vbox finished.  Otherwise, the insertion
 % would be lost.
-% Similarily, if a @footnote appears inside an alignment, save the footnote
+% Similarly, if a @footnote appears inside an alignment, save the footnote
 % text to a box and make the \insert when a row of the table is finished.
 % And the same can be done for other insert classes.  --kasal, 16nov03.
 
@@ -7437,15 +7691,19 @@ end
   % If the image is by itself, center it.
   \ifvmode
     \imagevmodetrue
-    \nobreak\bigskip
+    \nobreak\medskip
     % Usually we'll have text after the image which will insert
     % \parskip glue, so insert it here too to equalize the space
     % above and below.
     \nobreak\vskip\parskip
     \nobreak
-    \line\bgroup
   \fi
   %
+  % Leave vertical mode so that indentation from an enclosing
+  % environment such as @quotation is respected.  On the other hand, if
+  % it's at the top level, we don't want the normal paragraph indentation.
+  \noindent
+  %
   % Output the image.
   \ifpdf
     \dopdfimage{#1}{#2}{#3}%
@@ -7456,7 +7714,7 @@ end
     \epsfbox{#1.eps}%
   \fi
   %
-  \ifimagevmode \egroup \bigbreak \fi  % space after the image
+  \ifimagevmode \medskip \fi  % space after the standalone image
 \endgroup}
 
 
@@ -7728,10 +7986,9 @@ end
 
 \message{localization,}
 
-% @documentlanguage is usually given very early, just after
-% @setfilename.  If done too late, it may not override everything
-% properly.  Single argument is the language (de) or locale (de_DE)
-% abbreviation.  It would be nice if we could set up a hyphenation file.
+% For single-language documents, @documentlanguage is usually given very
+% early, just after @documentencoding.  Single argument is the language
+% (de) or locale (de_DE) abbreviation.
 %
 {
   \catcode`\_ = \active
@@ -7744,31 +8001,60 @@ end
     \ifeof 1
       \documentlanguagetrywithoutunderscore{#1_\finish}%
     \else
+      \globaldefs = 1  % everything in the txi-LL files needs to persist
       \input txi-#1.tex
     \fi
     \closein 1
-  \endgroup
+  \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?  In the current directory
-should work if nowhere else does.}
+is empty.  Maybe you need to install it?  Putting it in the current
+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.
+  \expandafter\ifx\csname address@hidden \relax
+    \message{no patterns for #1}%
+  \else
+    \global\language = \csname address@hidden
+  \fi
+  % but there is no harm in adjusting the hyphenmin values regardless.
+  \global\lefthyphenmin = #2\relax
+  \global\righthyphenmin = #3\relax
+}
+
+% Helpers for encodings.
 % Set the catcode of characters 128 through 255 to the specified number.
 %
 \def\setnonasciicharscatcode#1{%
@@ -7809,7 +8095,7 @@ should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \lattwochardefs
   %
-  \else \ifx \declaredencoding \latone 
+  \else \ifx \declaredencoding \latone
      \setnonasciicharscatcode\active
      \latonechardefs
   %
@@ -7821,7 +8107,7 @@ should work if nowhere else does.}
      \setnonasciicharscatcode\active
      \utfeightchardefs
   %
-  \else 
+  \else
     \message{Unknown document encoding #1, ignoring.}%
   %
   \fi % utfeight
@@ -7833,7 +8119,7 @@ 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.
@@ -7846,21 +8132,21 @@ 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{\missingcharmsg{LEFT-POINTING DOUBLE ANGLE QUOTATION MARK}} 
+  \gdef^^ab{\guillemetleft}
   \gdef^^ac{$\lnot$}
-  \gdef^^ad{\-} 
-  \gdef^^ae{\registeredsymbol} 
+  \gdef^^ad{\-}
+  \gdef^^ae{\registeredsymbol}
   \gdef^^af{\={}}
   %
   \gdef^^b0{\textdegree}
@@ -7876,7 +8162,7 @@ should work if nowhere else does.}
   \gdef^^b9{$^1$}
   \gdef^^ba{\ordm}
   %
-  \gdef^^bb{\missingcharmsg{RIGHT-POINTING DOUBLE ANGLE QUOTATION MARK}}
+  \gdef^^bb{\guilletright}
   \gdef^^bc{$1\over4$}
   \gdef^^bd{$1\over2$}
   \gdef^^be{$3\over4$}
@@ -7887,7 +8173,7 @@ 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}
@@ -7899,7 +8185,7 @@ 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}
@@ -7913,7 +8199,7 @@ 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}
@@ -7933,7 +8219,7 @@ 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}
@@ -7947,7 +8233,7 @@ 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}
 }
 
@@ -7969,7 +8255,7 @@ should work if nowhere else does.}
 % Latin2 (ISO-8859-2) character definitions.
 \def\lattwochardefs{%
   \gdef^^a0{~}
-  \gdef^^a1{\missingcharmsg{LATIN CAPITAL LETTER A WITH OGONEK}}
+  \gdef^^a1{\ogonek{A}}
   \gdef^^a2{\u{}}
   \gdef^^a3{\L}
   \gdef^^a4{\missingcharmsg{CURRENCY SIGN}}
@@ -7986,8 +8272,8 @@ should work if nowhere else does.}
   \gdef^^af{\dotaccent Z}
   %
   \gdef^^b0{\textdegree}
-  \gdef^^b1{\missingcharmsg{LATIN SMALL LETTER A WITH OGONEK}}
-  \gdef^^b2{\missingcharmsg{OGONEK}}
+  \gdef^^b1{\ogonek{a}}
+  \gdef^^b2{\ogonek{ }}
   \gdef^^b3{\l}
   \gdef^^b4{\'{}}
   \gdef^^b5{\v l}
@@ -8012,14 +8298,14 @@ should work if nowhere else does.}
   \gdef^^c7{\cedilla C}
   \gdef^^c8{\v C}
   \gdef^^c9{\'E}
-  \gdef^^ca{\missingcharmsg{LATIN CAPITAL LETTER E WITH OGONEK}}
+  \gdef^^ca{\ogonek{E}}
   \gdef^^cb{\"E}
   \gdef^^cc{\v E}
   \gdef^^cd{\'I}
   \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}
@@ -8028,7 +8314,7 @@ 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}
@@ -8046,14 +8332,14 @@ should work if nowhere else does.}
   \gdef^^e7{\cedilla c}
   \gdef^^e8{\v c}
   \gdef^^e9{\'e}
-  \gdef^^ea{\missingcharmsg{LATIN SMALL LETTER E WITH OGONEK}}
+  \gdef^^ea{\ogonek{e}}
   \gdef^^eb{\"e}
   \gdef^^ec{\v e}
   \gdef^^ed{\'\i}
   \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}
@@ -8072,11 +8358,11 @@ 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
@@ -8226,6 +8512,7 @@ should work if nowhere else does.}
   \DeclareUnicodeCharacter{00CE}{\^I}
   \DeclareUnicodeCharacter{00CF}{\"I}
 
+  \DeclareUnicodeCharacter{00D0}{\DH}
   \DeclareUnicodeCharacter{00D1}{\~N}
   \DeclareUnicodeCharacter{00D2}{\`O}
   \DeclareUnicodeCharacter{00D3}{\'O}
@@ -8238,6 +8525,7 @@ should work if nowhere else does.}
   \DeclareUnicodeCharacter{00DB}{\^U}
   \DeclareUnicodeCharacter{00DC}{\"U}
   \DeclareUnicodeCharacter{00DD}{\'Y}
+  \DeclareUnicodeCharacter{00DE}{\TH}
   \DeclareUnicodeCharacter{00DF}{\ss}
 
   \DeclareUnicodeCharacter{00E0}{\`a}
@@ -8257,6 +8545,7 @@ 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}
@@ -8269,16 +8558,21 @@ should work if nowhere else does.}
   \DeclareUnicodeCharacter{00FB}{\^u}
   \DeclareUnicodeCharacter{00FC}{\"u}
   \DeclareUnicodeCharacter{00FD}{\'y}
+  \DeclareUnicodeCharacter{00FE}{\th}
   \DeclareUnicodeCharacter{00FF}{\"y}
 
   \DeclareUnicodeCharacter{0100}{\=A}
   \DeclareUnicodeCharacter{0101}{\=a}
   \DeclareUnicodeCharacter{0102}{\u{A}}
   \DeclareUnicodeCharacter{0103}{\u{a}}
+  \DeclareUnicodeCharacter{0104}{\ogonek{A}}
+  \DeclareUnicodeCharacter{0105}{\ogonek{a}}
   \DeclareUnicodeCharacter{0106}{\'C}
   \DeclareUnicodeCharacter{0107}{\'c}
   \DeclareUnicodeCharacter{0108}{\^C}
   \DeclareUnicodeCharacter{0109}{\^c}
+  \DeclareUnicodeCharacter{0118}{\ogonek{E}}
+  \DeclareUnicodeCharacter{0119}{\ogonek{e}}
   \DeclareUnicodeCharacter{010A}{\dotaccent{C}}
   \DeclareUnicodeCharacter{010B}{\dotaccent{c}}
   \DeclareUnicodeCharacter{010C}{\v{C}}
@@ -8426,6 +8720,8 @@ should work if nowhere else does.}
   \DeclareUnicodeCharacter{0233}{\=y}
   \DeclareUnicodeCharacter{0237}{\dotless{j}}
 
+  \DeclareUnicodeCharacter{02DB}{\ogonek{ }}
+
   \DeclareUnicodeCharacter{1E02}{\dotaccent{B}}
   \DeclareUnicodeCharacter{1E03}{\dotaccent{b}}
   \DeclareUnicodeCharacter{1E04}{\udotaccent{B}}
@@ -8807,6 +9103,9 @@ 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
@@ -8916,7 +9215,7 @@ 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
@@ -8928,6 +9227,8 @@ should work if nowhere else does.}
   @let>address@hidden
   @address@hidden
   @address@hidden %$ font-lock fix
+  @markupsetuplqdefault
+  @markupsetuprqdefault
   @unsepspaces
 }
 
@@ -8962,9 +9263,20 @@ should work if nowhere else does.}
 @address@hidden = @other
 @address@hidden = @other
 
address@hidden Finally, make ` and ' active, so that txicodequoteundirected and
address@hidden txicodequotebacktick work right in, e.g., @address@hidden'}}.  
If we
address@hidden don't make ` and ' active, @code will not get them as active 
chars.
address@hidden Do this last of all since we use ` in the previous @catcode 
assignments.
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 0a81dc9..db2a213 100644
--- a/m4/Makefile.in
+++ b/m4/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -111,6 +112,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -121,6 +123,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -213,9 +216,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  m4/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu m4/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  m4/Makefile
+         $(AUTOMAKE) --gnu m4/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -237,7 +240,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) | \
@@ -248,7 +252,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 ")"; \
@@ -276,10 +280,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" \
@@ -332,6 +340,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -340,18 +350,28 @@ install-data-am: install-dist_m4dataDATA
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
diff --git a/m4/amversion.in b/m4/amversion.in
index 40a9ed4..0ca73cf 100644
--- a/m4/amversion.in
+++ b/m4/amversion.in
@@ -29,7 +29,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
 [AM_AUTOMAKE_VERSION(address@hidden@])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
diff --git a/m4/amversion.m4 b/m4/amversion.m4
index 33230d4..c6a24af 100644
--- a/m4/amversion.m4
+++ b/m4/amversion.m4
@@ -12,10 +12,10 @@
 # generated from the m4 files accompanying Automake X.Y.
 # (This private macro should not be called outside this file.)
 AC_DEFUN([AM_AUTOMAKE_VERSION],
-[am__api_version='1.10a'
+[am__api_version='1.10c'
 dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to
 dnl require some minimum version.  Point them to the right macro.
-m4_if([$1], [1.10a], [],
+m4_if([$1], [1.10c], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -29,9 +29,9 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # AM_SET_CURRENT_AUTOMAKE_VERSION
 # -------------------------------
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
-# This function is AC_REQUIREd by AC_INIT_AUTOMAKE.
+# This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.10a])dnl
+[AM_AUTOMAKE_VERSION([1.10c])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
diff --git a/m4/depend.m4 b/m4/depend.m4
index fd09373..451312a 100644
--- a/m4/depend.m4
+++ b/m4/depend.m4
@@ -1,12 +1,12 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2009
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 9
+# serial 10
 
 # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
 # written in clear, in which case automake, when reading aclocal.m4,
@@ -80,6 +80,12 @@ AC_CACHE_CHECK([dependency style of $depcc],
     done
     echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf
 
+    # We check with `-c' and `-o' for the sake of the "dashmstdout"
+    # mode.  It turns out that the SunPro C++ compiler does not properly
+    # handle `-M -o', and we need to detect this.  Also, some Intel
+    # versions had trouble with output in subdirs
+    am__obj=sub/conftest.${OBJEXT-o}
+    am__minus_obj="-o $am__obj"
     case $depmode in
     nosideeffect)
       # after this tag, mechanisms are not by side-effect, so they'll
@@ -90,19 +96,23 @@ AC_CACHE_CHECK([dependency style of $depcc],
        break
       fi
       ;;
+    msvisualcpp | msvcmsys)
+      # This compiler won't grok `-c -o', but also, the minuso test has
+      # not run yet.  These depmodes are late enough in the game, and
+      # so weak that their functioning should not be impacted.
+      am__obj=conftest.${OBJEXT-o}
+      am__minus_obj=
+      ;;
     none) break ;;
     esac
-    # We check with `-c' and `-o' for the sake of the "dashmstdout"
-    # mode.  It turns out that the SunPro C++ compiler does not properly
-    # handle `-M -o', and we need to detect this.
     if depmode=$depmode \
-       source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \
+       source=sub/conftest.c object=$am__obj \
        depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \
-       $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \
+       $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \
          >/dev/null 2>conftest.err &&
        grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 &&
        grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 &&
-       grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 &&
+       grep $am__obj sub/conftest.Po > /dev/null 2>&1 &&
        ${MAKE-make} -s -f confmf > /dev/null 2>&1; then
       # icc doesn't choke on unknown options, it will just issue warnings
       # or remarks (even with -Werror).  So we grep stderr for any message
diff --git a/m4/depout.m4 b/m4/depout.m4
index a7cc30a..80a3926 100644
--- a/m4/depout.m4
+++ b/m4/depout.m4
@@ -1,56 +1,67 @@
 # Generate code to set up dependency tracking.              -*- Autoconf -*-
 
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-#serial 3
+#serial 5
 
 # _AM_OUTPUT_DEPENDENCY_COMMANDS
 # ------------------------------
 AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
-[for mf in $CONFIG_FILES; do
-  # Strip MF so we end up with the name of the file.
-  mf=`echo "$mf" | sed -e 's/:.*$//'`
-  # Check whether this is an Automake generated Makefile or not.
-  # We used to match only the files named `Makefile.in', but
-  # some people rename them; so instead we look at the file content.
-  # Grep'ing the first line is not enough: some people post-process
-  # each Makefile.in and add a new line on top of each file to say so.
-  # Grep'ing the whole file is not good either: AIX grep has a line
-  # limit of 2048, but all sed's we know have understand at least 4000.
-  if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
-    dirpart=`AS_DIRNAME("$mf")`
-  else
-    continue
-  fi
-  # Extract the definition of DEPDIR, am__include, and am__quote
-  # from the Makefile without running `make'.
-  DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
-  test -z "$DEPDIR" && continue
-  am__include=`sed -n 's/^am__include = //p' < "$mf"`
-  test -z "am__include" && continue
-  am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
-  # When using ansi2knr, U may be empty or an underscore; expand it
-  U=`sed -n 's/^U = //p' < "$mf"`
-  # Find all dependency output files, they are included files with
-  # $(DEPDIR) in their names.  We invoke sed twice because it is the
-  # simplest approach to changing $(DEPDIR) to its actual value in the
-  # expansion.
-  for file in `sed -n "
-    s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
-       sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
-    # Make sure the directory exists.
-    test -f "$dirpart/$file" && continue
-    fdir=`AS_DIRNAME(["$file"])`
-    AS_MKDIR_P([$dirpart/$fdir])
-    # echo "creating $dirpart/$file"
-    echo '# dummy' > "$dirpart/$file"
+[{
+  # Autoconf 2.62 quotes --file arguments for eval, but not when files
+  # are listed without --file.  Let's play safe and only enable the eval
+  # if we detect the quoting.
+  case $CONFIG_FILES in
+  *\'*) eval set x "$CONFIG_FILES" ;;
+  *)   set x $CONFIG_FILES ;;
+  esac
+  shift
+  for mf
+  do
+    # Strip MF so we end up with the name of the file.
+    mf=`echo "$mf" | sed -e 's/:.*$//'`
+    # Check whether this is an Automake generated Makefile or not.
+    # We used to match only the files named `Makefile.in', but
+    # some people rename them; so instead we look at the file content.
+    # Grep'ing the first line is not enough: some people post-process
+    # each Makefile.in and add a new line on top of each file to say so.
+    # Grep'ing the whole file is not good either: AIX grep has a line
+    # limit of 2048, but all sed's we know have understand at least 4000.
+    if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 
2>&1; then
+      dirpart=`AS_DIRNAME("$mf")`
+    else
+      continue
+    fi
+    # Extract the definition of DEPDIR, am__include, and am__quote
+    # from the Makefile without running `make'.
+    DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
+    test -z "$DEPDIR" && continue
+    am__include=`sed -n 's/^am__include = //p' < "$mf"`
+    test -z "am__include" && continue
+    am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
+    # When using ansi2knr, U may be empty or an underscore; expand it
+    U=`sed -n 's/^U = //p' < "$mf"`
+    # Find all dependency output files, they are included files with
+    # $(DEPDIR) in their names.  We invoke sed twice because it is the
+    # simplest approach to changing $(DEPDIR) to its actual value in the
+    # expansion.
+    for file in `sed -n "
+      s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
+        sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
+      # Make sure the directory exists.
+      test -f "$dirpart/$file" && continue
+      fdir=`AS_DIRNAME(["$file"])`
+      AS_MKDIR_P([$dirpart/$fdir])
+      # echo "creating $dirpart/$file"
+      echo '# dummy' > "$dirpart/$file"
+    done
   done
-done
+}
 ])# _AM_OUTPUT_DEPENDENCY_COMMANDS
 
 
diff --git a/m4/init.m4 b/m4/init.m4
index 7104dd3..a4d5c90 100644
--- a/m4/init.m4
+++ b/m4/init.m4
@@ -1,7 +1,7 @@
 # Do all the work for Automake.                             -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2008 Free Software Foundation, Inc.
+# 2005, 2006, 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -75,8 +75,8 @@ AM_MISSING_PROG(AUTOCONF, autoconf)
 AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version})
 AM_MISSING_PROG(AUTOHEADER, autoheader)
 AM_MISSING_PROG(MAKEINFO, makeinfo)
-AM_PROG_INSTALL_SH
-AM_PROG_INSTALL_STRIP
+AC_REQUIRE([AM_PROG_INSTALL_SH])dnl
+AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl
 AC_REQUIRE([AM_PROG_MKDIR_P])dnl
 # We need awk for the "check" target.  The system "awk" is bad on
 # some platforms.
@@ -100,6 +100,9 @@ AC_PROVIDE_IFELSE([AC_PROG_OBJC],
                  [define([AC_PROG_OBJC],
                          defn([AC_PROG_OBJC])[_AM_DEPENDENCIES(OBJC)])])dnl
 ])
+AM_BACKSLASH='\'
+AC_SUBST([AM_BACKSLASH])dnl
+_AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl
 ])
 
 
diff --git a/m4/install-sh.m4 b/m4/install-sh.m4
index 32c2ebb..b153715 100644
--- a/m4/install-sh.m4
+++ b/m4/install-sh.m4
@@ -1,5 +1,5 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2001, 2003, 2005  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2005, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
@@ -10,5 +10,12 @@
 # Define $install_sh.
 AC_DEFUN([AM_PROG_INSTALL_SH],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
-install_sh=${install_sh-"\$(SHELL) $am_aux_dir/install-sh"}
+if test x"${install_sh}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;;
+  *)
+    install_sh="\${SHELL} $am_aux_dir/install-sh"
+  esac
+fi
 AC_SUBST(install_sh)])
diff --git a/m4/missing.m4 b/m4/missing.m4
index 26fab2a..136399c 100644
--- a/m4/missing.m4
+++ b/m4/missing.m4
@@ -1,13 +1,13 @@
 # Fake the existence of programs that GNU maintainers use.  -*- Autoconf -*-
 
-# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005
+# Copyright (C) 1997, 1999, 2000, 2001, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 5
+# serial 6
 
 # AM_MISSING_PROG(NAME, PROGRAM)
 # ------------------------------
@@ -24,7 +24,14 @@ AC_SUBST($1)])
 AC_DEFUN([AM_MISSING_HAS_RUN],
 [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl
 AC_REQUIRE_AUX_FILE([missing])dnl
-test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing"
+if test x"${MISSING+set}" != xset; then
+  case $am_aux_dir in
+  *\ * | *\    *)
+    MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;;
+  *)
+    MISSING="\${SHELL} $am_aux_dir/missing" ;;
+  esac
+fi
 # Use eval to expand $SHELL
 if eval "$MISSING --run true"; then
   am_missing_run="$MISSING --run "
diff --git a/m4/python.m4 b/m4/python.m4
index 229fd55..3adf87b 100644
--- a/m4/python.m4
+++ b/m4/python.m4
@@ -3,7 +3,7 @@
 ## From Andrew Dalke
 ## Updated by James Henstridge
 ## ------------------------
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
@@ -34,13 +34,11 @@
 # numbers and dots only.
 AC_DEFUN([AM_PATH_PYTHON],
  [
-  dnl Find a Python interpreter.  Python versions prior to 1.5 are not
-  dnl supported because the default installation locations changed from
-  dnl $prefix/lib/site-python in 1.4 to $prefix/lib/python1.5/site-packages
-  dnl in 1.5.
+  dnl Find a Python interpreter.  Python versions prior to 2.0 are not
+  dnl supported. (2.0 was released on October 16, 2000).
   m4_define_default([_AM_PYTHON_INTERPRETER_LIST],
-                    [python python2 python2.5 python2.4 python2.3 python2.2 dnl
-python2.1 python2.0 python1.6 python1.5])
+                    [python python2 python3 python3.0 python2.5 python2.4 
python2.3 python2.2 dnl
+python2.1 python2.0])
 
   m4_if([$1],[],[
     dnl No version check is needed.
@@ -87,7 +85,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl library.
 
   AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version],
-    [am_cv_python_version=`$PYTHON -c "import sys; print sys.version[[:3]]"`])
+    [am_cv_python_version=`$PYTHON -c "import sys; 
sys.stdout.write(sys.version[[:3]])"`])
   AC_SUBST([PYTHON_VERSION], [$am_cv_python_version])
 
   dnl Use the values of $prefix and $exec_prefix for the corresponding
@@ -102,7 +100,7 @@ python2.1 python2.0 python1.6 python1.5])
   dnl to know which OS platform Python thinks this is.
 
   AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform],
-    [am_cv_python_platform=`$PYTHON -c "import sys; print sys.platform"`])
+    [am_cv_python_platform=`$PYTHON -c "import sys; 
sys.stdout.write(sys.platform)"`])
   AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform])
 
 
@@ -155,14 +153,15 @@ python2.1 python2.0 python1.6 python1.5])
 # Run ACTION-IF-FALSE otherwise.
 # This test uses sys.hexversion instead of the string equivalent (first
 # word of sys.version), in order to cope with versions such as 2.2c1.
-# hexversion has been introduced in Python 1.5.2; it's probably not
-# worth to support older versions (1.5.1 was released on October 31, 1998).
+# This supports Python 2.0 or higher. (2.0 was released on October 16, 2000).
 AC_DEFUN([AM_PYTHON_CHECK_VERSION],
- [prog="import sys, string
+ [prog="import sys
 # split strings by '.' and convert to numeric.  Append some zeros
 # because we need at least 4 digits for the hex conversion.
-minver = map(int, string.split('$2', '.')) + [[0, 0, 0]]
+# map returns an iterator in Python 3.0 and a list in 2.x
+minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]]
 minverhex = 0
-for i in xrange(0, 4): minverhex = (minverhex << 8) + minver[[i]]
+# xrange is not present in Python 3.0 and range returns an iterator
+for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]]
 sys.exit(sys.hexversion < minverhex)"
   AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])])
diff --git a/m4/sanity.m4 b/m4/sanity.m4
index 2e76b10..3d2f304 100644
--- a/m4/sanity.m4
+++ b/m4/sanity.m4
@@ -1,13 +1,13 @@
 # Check to make sure that the build environment is sane.    -*- Autoconf -*-
 
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008
 # Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
-# serial 4
+# serial 5
 
 # AM_SANITY_CHECK
 # ---------------
@@ -16,16 +16,29 @@ AC_DEFUN([AM_SANITY_CHECK],
 # Just in case
 sleep 1
 echo timestamp > conftest.file
+# Reject unsafe characters in $srcdir or the absolute working directory
+# name.  Accept space and tab only in the latter.
+am_lf='
+'
+case `pwd` in
+  *[[\\\"\#\$\&\'\`$am_lf]]*)
+    AC_MSG_ERROR([unsafe absolute working directory name]);;
+esac
+case $srcdir in
+  *[[\\\"\#\$\&\'\`$am_lf\ \   ]]*)
+    AC_MSG_ERROR([unsafe srcdir value: `$srcdir']);;
+esac
+
 # Do `set' in a subshell so we don't clobber the current shell's
 # arguments.  Must try -L first in case configure is actually a
 # symlink; some systems play weird games with the mod time of symlinks
 # (eg FreeBSD returns the mod time of the symlink's containing
 # directory).
 if (
-   set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null`
+   set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
    if test "$[*]" = "X"; then
       # -L didn't work.
-      set X `ls -t $srcdir/configure conftest.file`
+      set X `ls -t "$srcdir/configure" conftest.file`
    fi
    rm -f conftest.file
    if test "$[*]" != "X $srcdir/configure conftest.file" \
diff --git a/m4/substnot.m4 b/m4/substnot.m4
index 5958962..811d286 100644
--- a/m4/substnot.m4
+++ b/m4/substnot.m4
@@ -1,12 +1,19 @@
 ##                                                          -*- Autoconf -*-
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2008  Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
 
+# serial 2
+
 # _AM_SUBST_NOTMAKE(VARIABLE)
 # ---------------------------
 # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in.
 # This macro is traced by Automake.
 AC_DEFUN([_AM_SUBST_NOTMAKE])
+
+# AM_SUBST_NOTMAKE(VARIABLE)
+# ---------------------------
+# Public sister of _AM_SUBST_NOTMAKE.
+AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)])
diff --git a/m4/vala.m4 b/m4/vala.m4
index 5606296..d3f73a5 100644
--- a/m4/vala.m4
+++ b/m4/vala.m4
@@ -1,6 +1,6 @@
 # Autoconf support for the Vala compiler
 
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009 Free Software Foundation, Inc.
 #
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
diff --git a/tests/.gitignore b/tests/.gitignore
index f1c3bff..cfd4565 100644
--- a/tests/.gitignore
+++ b/tests/.gitignore
@@ -1,4 +1,9 @@
 aclocal-*
 automake-*
 defs
+defs-p
+parallel-tests.am
 *.dir
+*.log
+*.log-t
+*-p.test
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 4e0de85..7b17271 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -1,10 +1,26 @@
 ## Process this file with automake to create Makefile.in
 
-XFAIL_TESTS =                                  \
+XFAIL_TESTS =                                  \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
-txinfo5.test
+txinfo5.test                                   \
+vala5.test
+
+include $(srcdir)/parallel-tests.am
+
+$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
+       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+
+$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
+       input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+       sed 's,^\. \./defs,. ./defs-p,' < $(srcdir)/$$input > $@
+       chmod a+rx $@
+
+MAINTAINERCLEANFILES = $(parallel_tests)
+
+defs-p: defs Makefile.am
+       sed 's,^AM_INIT_AUTOMAKE$$,&([parallel-tests]),' < defs >$@
 
 TESTS =        \
 aclibobj.test \
@@ -96,6 +112,8 @@ check6.test \
 check7.test \
 check8.test \
 check9.test \
+check10.test \
+check11.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -120,6 +138,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 compile.test \
+compile2.test \
 compile_f90_c_cxx.test \
 compile_f_c_cxx.test \
 cond.test \
@@ -221,11 +240,14 @@ depend.test \
 depend2.test \
 depend3.test \
 depend4.test \
+depend5.test \
+depend6.test \
 destdir.test \
 dirforbid.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+distcleancheck.test \
 distcom2.test \
 distcom3.test \
 distcom4.test \
@@ -235,6 +257,8 @@ distcom7.test \
 distdir.test \
 distname.test \
 dollar.test \
+dollarvar.test \
+dollarvar2.test \
 double.test \
 dup2.test \
 else.test \
@@ -259,6 +283,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 f90only.test \
+flavor.test \
 flibs.test \
 fn99.test \
 fn99subdir.test \
@@ -304,6 +329,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 \
@@ -355,7 +388,9 @@ libtool7.test \
 libtool8.test \
 libtool9.test \
 libtoo10.test \
+libtoo11.test \
 license.test \
+license2.test \
 link_c_cxx.test        \
 link_dist.test \
 link_f90_only.test \
@@ -386,10 +421,16 @@ lzma.test \
 maintclean.test \
 make.test \
 makej.test \
+maken.test \
+maken2.test \
+maken3.test \
+maken4.test \
 makevars.test \
 man.test \
 man2.test \
 man3.test \
+man4.test \
+man5.test \
 mclean.test \
 mdate.test \
 mdate2.test \
@@ -447,6 +488,18 @@ output12.test \
 output13.test \
 output-order.test \
 overrid.test \
+parallel-am.test \
+parallel-am2.test \
+parallel-am3.test \
+parallel-tests.test \
+parallel-tests2.test \
+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 \
@@ -515,8 +568,16 @@ req.test \
 reqd.test \
 reqd2.test \
 rulepat.test \
+sanity.test \
 scripts.test \
 seenc.test \
+silent.test \
+silent2.test \
+silent3.test \
+silent4.test \
+silent5.test \
+silent6.test \
+silent7.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
@@ -528,6 +589,7 @@ specflg6.test       \
 specflg7.test  \
 specflg8.test  \
 specflg9.test  \
+specflg10.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -568,6 +630,7 @@ subpkg3.test \
 subst.test \
 subst2.test \
 subst3.test \
+subst4.test \
 substref.test \
 substre2.test \
 substtarg.test \
@@ -621,6 +684,7 @@ txinfo28.test \
 txinfo29.test \
 txinfo30.test \
 txinfo31.test \
+txinfo32.test \
 transform.test \
 transform2.test \
 unused.test \
@@ -632,6 +696,7 @@ vala1.test \
 vala2.test \
 vala3.test \
 vala4.test \
+vala5.test \
 vars.test \
 vars3.test \
 vartar.test \
@@ -650,6 +715,7 @@ werror.test \
 werror2.test \
 whoami.test \
 xsource.test \
+xz.test \
 yacc.test \
 yacc2.test \
 yacc3.test \
@@ -659,15 +725,16 @@ yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccpp.test \
-yaccvpath.test
+yaccvpath.test \
+$(parallel_tests)
 
-EXTRA_DIST = ChangeLog-old $(TESTS)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 # Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
+check_SCRIPTS = defs defs-p aclocal-$(APIVERSION) automake-$(APIVERSION) 
$(parallel_tests)
 
-distclean-local: check-clean-local
+clean-local: check-clean-local
 
 check-clean-local:
        -chmod -R u+rwx *.dir
-       -rm -rf *.dir
+       -rm -rf defs-p *.dir
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 2ae178a..d1c1ccb 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -1,8 +1,9 @@
-# Makefile.in generated by automake 1.10a from Makefile.am.
+# Makefile.in generated by automake 1.10c from Makefile.am.
 # @configure_input@
 
 # 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 Makefile.in is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
@@ -31,9 +32,10 @@ NORMAL_UNINSTALL = :
 PRE_UNINSTALL = :
 POST_UNINSTALL = :
 build_triplet = @build@
-subdir = tests
 DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
-       $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in
+       $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
+       $(srcdir)/parallel-tests.am
+subdir = tests
 ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
 am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/auxdir.m4 $(top_srcdir)/m4/init.m4 \
@@ -65,6 +67,74 @@ 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)
+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@
 AMTAR = @AMTAR@
@@ -102,6 +172,7 @@ PACKAGE_TARNAME = @PACKAGE_TARNAME@
 PACKAGE_VERSION = @PACKAGE_VERSION@
 PATH_SEPARATOR = @PATH_SEPARATOR@
 PERL = @PERL@
+PERL_THREADS = @PERL_THREADS@
 SET_MAKE = @SET_MAKE@
 SHELL = @SHELL@
 STRIP = @STRIP@
@@ -112,6 +183,7 @@ abs_srcdir = @abs_srcdir@
 abs_top_builddir = @abs_top_builddir@
 abs_top_srcdir = @abs_top_srcdir@
 am_AUTOCONF = @am_AUTOCONF@
+am_AUTOHEADER = @am_AUTOHEADER@
 am__leading_dot = @am__leading_dot@
 am__tar = @am__tar@
 am__untar = @am__untar@
@@ -156,8 +228,32 @@ XFAIL_TESTS = \
 all.test                                       \
 auxdir2.test                                   \
 cond17.test                                    \
-txinfo5.test
+txinfo5.test                                   \
+vala5.test
 
+parallel_tests = \
+check-p.test \
+check10-p.test \
+check11-p.test \
+check2-p.test \
+check3-p.test \
+check4-p.test \
+check5-p.test \
+check6-p.test \
+check7-p.test \
+check8-p.test \
+check9-p.test \
+color-p.test \
+comment9-p.test \
+dejagnu-p.test \
+exeext4-p.test \
+maken3-p.test \
+maken4-p.test \
+pr401-p.test \
+pr401b-p.test \
+pr401c-p.test
+
+MAINTAINERCLEANFILES = $(parallel_tests)
 TESTS = \
 aclibobj.test \
 aclocal.test \
@@ -248,6 +344,8 @@ check6.test \
 check7.test \
 check8.test \
 check9.test \
+check10.test \
+check11.test \
 checkall.test \
 clean.test \
 clean2.test \
@@ -272,6 +370,7 @@ comment8.test \
 comment9.test \
 commen10.test \
 compile.test \
+compile2.test \
 compile_f90_c_cxx.test \
 compile_f_c_cxx.test \
 cond.test \
@@ -373,11 +472,14 @@ depend.test \
 depend2.test \
 depend3.test \
 depend4.test \
+depend5.test \
+depend6.test \
 destdir.test \
 dirforbid.test \
 dirlist.test \
 dirlist2.test \
 discover.test \
+distcleancheck.test \
 distcom2.test \
 distcom3.test \
 distcom4.test \
@@ -387,6 +489,8 @@ distcom7.test \
 distdir.test \
 distname.test \
 dollar.test \
+dollarvar.test \
+dollarvar2.test \
 double.test \
 dup2.test \
 else.test \
@@ -411,6 +515,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 f90only.test \
+flavor.test \
 flibs.test \
 fn99.test \
 fn99subdir.test \
@@ -456,6 +561,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 \
@@ -507,7 +620,9 @@ libtool7.test \
 libtool8.test \
 libtool9.test \
 libtoo10.test \
+libtoo11.test \
 license.test \
+license2.test \
 link_c_cxx.test        \
 link_dist.test \
 link_f90_only.test \
@@ -538,10 +653,16 @@ lzma.test \
 maintclean.test \
 make.test \
 makej.test \
+maken.test \
+maken2.test \
+maken3.test \
+maken4.test \
 makevars.test \
 man.test \
 man2.test \
 man3.test \
+man4.test \
+man5.test \
 mclean.test \
 mdate.test \
 mdate2.test \
@@ -599,6 +720,18 @@ output12.test \
 output13.test \
 output-order.test \
 overrid.test \
+parallel-am.test \
+parallel-am2.test \
+parallel-am3.test \
+parallel-tests.test \
+parallel-tests2.test \
+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 \
@@ -667,8 +800,16 @@ req.test \
 reqd.test \
 reqd2.test \
 rulepat.test \
+sanity.test \
 scripts.test \
 seenc.test \
+silent.test \
+silent2.test \
+silent3.test \
+silent4.test \
+silent5.test \
+silent6.test \
+silent7.test \
 sinclude.test \
 srcsub.test \
 srcsub2.test \
@@ -680,6 +821,7 @@ specflg6.test       \
 specflg7.test  \
 specflg8.test  \
 specflg9.test  \
+specflg10.test \
 spell.test \
 spell2.test \
 spell3.test \
@@ -720,6 +862,7 @@ subpkg3.test \
 subst.test \
 subst2.test \
 subst3.test \
+subst4.test \
 substref.test \
 substre2.test \
 substtarg.test \
@@ -773,6 +916,7 @@ txinfo28.test \
 txinfo29.test \
 txinfo30.test \
 txinfo31.test \
+txinfo32.test \
 transform.test \
 transform2.test \
 unused.test \
@@ -784,6 +928,7 @@ vala1.test \
 vala2.test \
 vala3.test \
 vala4.test \
+vala5.test \
 vars.test \
 vars3.test \
 vartar.test \
@@ -802,6 +947,7 @@ werror.test \
 werror2.test \
 whoami.test \
 xsource.test \
+xz.test \
 yacc.test \
 yacc2.test \
 yacc3.test \
@@ -811,16 +957,18 @@ yacc6.test \
 yacc7.test \
 yacc8.test \
 yaccpp.test \
-yaccvpath.test
+yaccvpath.test \
+$(parallel_tests)
 
-EXTRA_DIST = ChangeLog-old $(TESTS)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
 
 # Each test case depends on defs, aclocal, and automake.
-check_SCRIPTS = defs aclocal-$(APIVERSION) automake-$(APIVERSION)
+check_SCRIPTS = defs defs-p aclocal-$(APIVERSION) automake-$(APIVERSION) 
$(parallel_tests)
 all: all-am
 
 .SUFFIXES:
-$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  $(am__configure_deps)
+.SUFFIXES: .html .log .test
+$(srcdir)/Makefile.in:  $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am 
$(am__configure_deps)
        @for dep in $?; do \
          case '$(am__configure_deps)' in \
            *$$dep*) \
@@ -829,9 +977,9 @@ $(srcdir)/Makefile.in:  $(srcdir)/Makefile.am  
$(am__configure_deps)
              exit 1;; \
          esac; \
        done; \
-       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu  tests/Makefile'; \
+       echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu tests/Makefile'; \
        $(am__cd) $(top_srcdir) && \
-         $(AUTOMAKE) --gnu  tests/Makefile
+         $(AUTOMAKE) --gnu tests/Makefile
 .PRECIOUS: Makefile
 Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
        @case '$?' in \
@@ -863,84 +1011,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 "$$failed" -eq 0; then \
-           if test "$$xfail" -eq 0; then \
-             banner="All $$all tests passed"; \
-           else \
-             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 \
-             banner="$$failed of $$all tests did not behave as expected 
($$xpass unexpected passes)"; \
-           fi; \
-         fi; \
-         dashes="$$banner"; \
-         skipped=""; \
-         if test "$$skip" -ne 0; then \
-           skipped="($$skip tests were not run)"; \
-           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
+.test.log:
+       @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
@@ -958,10 +1181,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" \
@@ -989,6 +1216,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:
 
@@ -999,13 +1230,14 @@ distclean-generic:
 maintainer-clean-generic:
        @echo "This command is intended for maintainers to use"
        @echo "it deletes files that may require special tools to rebuild."
+       -test -z "$(MAINTAINERCLEANFILES)" || rm -f $(MAINTAINERCLEANFILES)
 clean: clean-am
 
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
-distclean-am: clean-am distclean-generic distclean-local
+distclean-am: clean-am distclean-generic
 
 dvi: dvi-am
 
@@ -1013,6 +1245,8 @@ dvi-am:
 
 html: html-am
 
+html-am:
+
 info: info-am
 
 info-am:
@@ -1021,18 +1255,28 @@ install-data-am:
 
 install-dvi: install-dvi-am
 
+install-dvi-am:
+
 install-exec-am:
 
 install-html: install-html-am
 
+install-html-am:
+
 install-info: install-info-am
 
+install-info-am:
+
 install-man:
 
 install-pdf: install-pdf-am
 
+install-pdf-am:
+
 install-ps: install-ps-am
 
+install-ps-am:
+
 installcheck-am:
 
 maintainer-clean: maintainer-clean-am
@@ -1053,25 +1297,38 @@ ps-am:
 
 uninstall-am:
 
-.MAKE: 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 clean clean-generic \
-       distclean distclean-generic distclean-local 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 \
+.PHONY: all all-am check check-TESTS check-am check-html clean \
+       clean-generic clean-local 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
+       pdf-am ps ps-am recheck recheck-TESTS recheck-am recheck-html \
+       uninstall uninstall-am
+
+
+$(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
+       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+
+$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
+       input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+       sed 's,^\. \./defs,. ./defs-p,' < $(srcdir)/$$input > $@
+       chmod a+rx $@
 
+defs-p: defs Makefile.am
+       sed 's,^AM_INIT_AUTOMAKE$$,&([parallel-tests]),' < defs >$@
 
-distclean-local: check-clean-local
+clean-local: check-clean-local
 
 check-clean-local:
        -chmod -R u+rwx *.dir
-       -rm -rf *.dir
+       -rm -rf defs-p *.dir
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.
diff --git a/tests/README b/tests/README
index 4b63059..c4ff407 100644
--- a/tests/README
+++ b/tests/README
@@ -10,6 +10,9 @@ Running all tests
 
   make check
 
+  You can use `-jN' for faster completion (it even helps on a
+  uniprocessor system, due to unavoidable sleep delays, as
+  noted below).
 
 Interpretation
 --------------
@@ -30,10 +33,13 @@ Getting details from failures
 -----------------------------
 
   Each test is a script.  In a non-VPATH build you can run them
-  directly, they will be verbose.
+  directly, they will be verbose.  By default, verbose output of
+  a test foo.test is retained in the log file foo.log.  A summary
+  log is created in the file test-suite.log.
 
-  Otherwise, you can invoke make as follows, just replace the list
-  of tests by those you want to check.
+  You can limit the set of files using the TESTS variable, and
+  enable detailed test output at the end of the test run with the
+  VERBOSE variable:
 
     env VERBOSE=x TESTS='first.test second.test ...' make -e check
 
@@ -41,10 +47,10 @@ Getting details from failures
 Reporting failures
 ------------------
 
-  Send verbose output of failing tests to <address@hidden>,
-  along with the usual version numbers (which Automake, which
-  Autoconf, which operating system, which make version, which shell,
-  etc.)
+  Send verbose output, i.e., the contents of test-suite.log, of failing
+  tests to <address@hidden>, along with the usual version numbers
+  (which Automake, which Autoconf, which operating system, which make
+  version, which shell, etc.)
 
 
 
@@ -68,7 +74,10 @@ Do
 
   Use `required=...' for required tools.
 
-  Include ./defs (see other tests).
+  Include ./defs (see other tests) for normal tests, ./defs-p for tests
+  that use the `parallel-tests' option.  For the latter, use a name that
+  ends in `-p.test' and does not clash with any generated tests in the
+  suite.
 
   Use `set -e' to catch failures you might not have thought of.
 
@@ -87,11 +96,16 @@ Do
 
   Use `cat' or `grep' to display (part of) files that may be
   interesting for debugging, so that when a user send a verbose
-  output we don't have to ask him for more details.
+  output we don't have to ask him for more details.  Display stderr
+  output on the stderr file descriptor.  If some redirected command
+  is likely to fail, and `set -e' is in effect, display its output
+  even in the failure case, before exiting.
+
+  Use `Exit' rather than `exit' to abort a test.
 
   It's more important to make sure that a feature works, than
   make sure that Automake's output looks correct.  It might look
-  correct and still fails to work.  In other words, prefer
+  correct and still fail to work.  In other words, prefer
   running `make' over grepping `Makefile.in' (or do both).
 
   If you run $AUTOMAKE or $AUTOCONF several times in the same test
@@ -99,6 +113,7 @@ Do
     rm -rf autom4te.cache
   before the following runs.  On fast machines the new `configure.in'
   could otherwise have the same timestamp as the old `autom4te.cache'.
+  Alternatively, use `--force' for subsequent runs of the tools.
 
   Use filenames with two consecutive spaces when testing that some
   code preserves filenames with spaces.  This will catch errors like
@@ -112,7 +127,7 @@ Do
 Do not
 ------
 
-  Do not test an Automake error with `$AUTOMAKE && exit 1', or in three
+  Do not test an Automake error with `$AUTOMAKE && Exit 1', or in three
   years we'll discover that this test failed for some other bogus reason.
   This happened many times.  Better use something like
      AUTOMAKE_fails
diff --git a/tests/check10.test b/tests/check10.test
new file mode 100755
index 0000000..d0f1b60
--- /dev/null
+++ b/tests/check10.test
@@ -0,0 +1,87 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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/>.
+
+# Check singular and plural in test summaries.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = fail pass skip xfail xpass fail2 pass2 skip2 xfail2 xpass2
+XFAIL_TESTS = xfail xpass xfail2 xpass2
+END
+
+cat >>pass <<'END'
+#! /bin/sh
+exit 0
+END
+cat >>fail <<'END'
+#! /bin/sh
+exit 1
+END
+cat >>skip <<'END'
+#! /bin/sh
+exit 77
+END
+chmod a+x pass fail skip
+cp pass pass2
+cp pass xpass
+cp xpass xpass2
+cp fail xfail
+cp fail fail2
+cp xfail xfail2
+cp skip skip2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+unset TESTS || :
+
+./configure
+(
+  # Do not check for failure in this subshell
+  set +e
+  env TESTS=pass $MAKE -e check
+  env TESTS=fail $MAKE -e check
+  env TESTS=skip $MAKE -e check
+  env TESTS=xfail $MAKE -e check
+  env TESTS=xpass $MAKE -e check
+  env TESTS="pass pass2" $MAKE -e check
+  env TESTS="fail fail2" $MAKE -e check
+  env TESTS="skip skip2" $MAKE -e check
+  env TESTS="xfail xfail2" $MAKE -e check
+  env TESTS="xpass xpass2" $MAKE -e check
+  env TESTS='pass skip xfail' $MAKE -e check
+  $MAKE check
+  :
+) >stdout
+cat stdout
+
+grep '1 [tT]ests' stdout && Exit 1
+grep '[02-9] [tT]est ' stdout && Exit 1
+grep '1 .* were ' stdout && Exit 1
+grep '[02-9].* was .*run' stdout && Exit 1
+grep 'All 1 ' stdout && Exit 1
+$EGREP '1 (un)?expected (failures|passes)' stdout && Exit 1
+$EGREP '[^1] (un)?expected (failure|pass)\)' stdout && Exit 1
+
+:
diff --git a/tests/check11.test b/tests/check11.test
new file mode 100755
index 0000000..2ee1145
--- /dev/null
+++ b/tests/check11.test
@@ -0,0 +1,53 @@
+#! /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/>.
+
+# Check skip summary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS = skip skip2
+END
+
+cat >>skip <<'END'
+#! /bin/sh
+exit 77
+END
+chmod a+x skip
+cp skip skip2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+./configure
+env TESTS=skip $MAKE -e check >stdout
+cat stdout
+grep '1.*passed' stdout && Exit 1
+
+env TESTS="skip skip2" $MAKE -e check >stdout
+cat stdout
+grep '2.*passed' stdout && Exit 1
+
+:
diff --git a/tests/check8.test b/tests/check8.test
index 242be56..3e38ccf 100755
--- a/tests/check8.test
+++ b/tests/check8.test
@@ -67,14 +67,20 @@ $AUTOMAKE -a
 unset TESTS || :
 
 ./configure
-AM_COLOR_TESTS=always $MAKE -e check >stdout && { cat stdout; Exit 1; }
+AM_COLOR_TESTS=always $MAKE -e check >stdout 2>stderr &&
+  { cat stdout; cat stderr >&2; Exit 1; }
 cat stdout
+cat stderr >&2
 grep 'XPASS.* foo$' stdout
 grep '^[^X]*PASS.* sub/foo$' stdout
 grep '^[^X]*PASS.* bar$' stdout
 grep '^[^X]*PASS.* sub/bar$' stdout
 grep '^[^X]*FAIL.* baz$' stdout
 grep 'XFAIL.* sub/baz$' stdout
+# parallel-tests should not add circular dependencies.
+# Look for known warnings from a couple of `make' implementations.
+grep -i 'circular.*dependency' stderr && Exit 1
+grep -i 'graph cycles' stderr && Exit 1
 
 $MAKE distclean
 
diff --git a/tests/compile2.test b/tests/compile2.test
new file mode 100755
index 0000000..fdc583f
--- /dev/null
+++ b/tests/compile2.test
@@ -0,0 +1,85 @@
+#! /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/>.
+
+# Make sure `compile' deals correctly with w32 style paths.
+
+. ./defs || Exit 1
+
+set -e
+
+cp "$testsrcdir/../lib/compile" .
+
+cat >mycc <<'END'
+source_seen=no
+for arg
+do
+  test "X$arg" = X-o && exit 1
+  test "X$arg" = "X$amtest_source" && source_seen=yes
+done
+if test "$source_seen" != yes; then
+  echo "$0: no source file seen" >&2
+  exit 1
+fi
+if test ! -f "$amtest_source"; then
+  echo "$0: $amtest_source not readable" >&2
+  exit 1
+fi
+if test ! -d "$amtest_lock"; then
+  echo "$0: no lockdir $amtest_lock" >&2
+  exit 1
+fi
+touch "$amtest_obj"
+END
+
+chmod +x ./mycc
+
+# In case this test runs on a system with backslash directory separators:
+mkdir libltdl libltdl/libltdl
+
+# Backslashes in the input and the output name should be accepted.
+# Since this test might run on non-w32 systems, we need to be careful not
+# to use any backslash sequences which might be interpreted by `echo'.
+amtest_source='libltdl\libltdl\slist.c'
+amtest_object='libltdl\libltdl\libltdl_libltdl_la-slist.obj'
+amtest_obj='slist.o'
+amtest_lock='slist_o.d'
+export amtest_source amtest_object amtest_obj amtest_lock
+
+: > "$amtest_source"
+./compile ./mycc -c "$amtest_source" -o "$amtest_object"
+test -f "$amtest_object"
+
+
+# Absolute w32 paths should be accepted.
+# Do not actually run this test on anything that could be w32.
+test -d "C:\\" && Exit 77
+# This test is taken from Autoconf's _AS_PATH_SEPARATOR_PREPARE.
+(PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
+  (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
+    Exit 77
+}
+
+amtest_source='C:\libltdl\libltdl\slist.c'
+amtest_object='C:\libltdl\libltdl\libltdl_libltdl_la-slist.obj'
+amtest_obj='slist.o'
+amtest_lock='slist_o.d'
+export amtest_source amtest_object amtest_obj amtest_lock
+
+: > "$amtest_source"
+./compile ./mycc -c "$amtest_source" -o "$amtest_object"
+test -f "$amtest_object"
+
+:
diff --git a/tests/defs.in b/tests/defs.in
index 9172427..3193eed 100644
--- a/tests/defs.in
+++ b/tests/defs.in
@@ -2,7 +2,7 @@
 # @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007  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
@@ -40,9 +40,7 @@ test -f ./defs || {
    exit 1
 }
 
-# If srcdir is not set, then we are not running from `make check', be verbose.
 if test -z "$srcdir"; then
-   VERBOSE=x
    # compute $srcdir.
    srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
    test "$srcdir" = $0 && srcdir=.
@@ -56,12 +54,6 @@ test -f "$srcdir/defs.in" || {
 
 me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
 
-# See how redirections should work.  User can set VERBOSE to see all
-# output.
-test -z "$VERBOSE" && {
-   exec > /dev/null 2>&1
-}
-
 # Make sure we override the user shell.
 SHELL='@SHELL@'
 export SHELL
@@ -69,7 +61,7 @@ export SHELL
 test -z "$PERL" && PERL='@PERL@'
 test -z "$MAKE" && MAKE=make
 test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@AUTOHEADER@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
 test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
 test -z "$MISSING" && MISSING=`pwd`/../lib/missing
 # Use -Werror because this also turns some Perl warnings into error.
@@ -152,7 +144,7 @@ do
       CC=icc
       export CC
       # There is no way to ask *only* the compiler's version.
-      # This tool always want to do something (by default
+      # This tool always wants to do something (by default
       # it will try link *nothing* and complain it cannot find
       # main(); funny).  Use -help so it does not try linking anything.
       echo "$me: running $CC -V -help"
@@ -194,6 +186,16 @@ do
       rm -rf $ro_dir_temp
       test $create_status = 0 && exit 77
       ;;
+    rst2html)
+      # Try the variants that are tried in check.am.
+      while :; do
+       for r2h in $RST2HTML rst2html rst2html.py; do
+         echo "$me: running $r2h --version"
+         $r2h --version && break 2
+       done
+       exit 77
+      done
+      ;;
     runtest)
       # DejaGnu's runtest program. We rely on being able to specify
       # the program on the runtest command-line. This requires
@@ -292,6 +294,15 @@ unset MFLAGS
 unset MAKEFLAGS
 unset MAKELEVEL
 unset DESTDIR
+# Unset verbosity flag.
+unset V
+# Also unset variables that control our test driver.  While not
+# conceptually independent, they cause some changed semantics we
+# need to control (and test for) in some of the tests to ensure
+# backward-compatible behavior.
+unset DISABLE_HARD_ERRORS
+unset RECHECK_LOGS
+unset VERBOSE
 
 echo "=== Running test $0"
 
@@ -309,8 +320,8 @@ case $required in
     if test -f $aclocaldir/dirlist; then
        extra_includes=`
        <$aclocaldir/dirlist \
-       sed -ne 's/#.*//;s/[     ][      ]*$//g;s/..*/ -I &/p' |
-        tr -d '\n'`
+       sed  's/#.*//;s/[        ][      ]*$//g' \
+       | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
     else :; fi
 
     libtool_found=no
@@ -382,7 +393,7 @@ AUTOMAKE_run ()
   shift
   exitcode=0
   $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
-  cat stderr
+  cat stderr >&2
   cat stdout
   test $exitcode = $expected_exitcode || Exit 1
 }
@@ -396,10 +407,7 @@ AUTOMAKE_fails ()
   AUTOMAKE_run 1 ${1+"$@"}
 }
 
-# Turn on shell traces when VERBOSE is set.
-if test -n "$VERBOSE"; then
-  set -x
-else
-  :
-fi
+# Turn on shell traces.
+set -x
+
 pwd
diff --git a/tests/depend5.test b/tests/depend5.test
new file mode 100755
index 0000000..5644933
--- /dev/null
+++ b/tests/depend5.test
@@ -0,0 +1,71 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Check that _AM_OUTPUT_DEPENDENCY_COMMANDS works with eval-style
+# quoting in $CONFIG_FILES, done by newer Autoconf.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in << END
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h
+END
+
+cat >foo.c << END
+#include "foo.h"
+END
+: >foo.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure --enable-dependency-tracking
+if test -d .deps; then
+  depdir=.deps
+elif test -d _deps; then
+  depdir=_deps
+else
+  depdir=
+fi
+
+# For the fun of it, we should also cope with makefile
+# names that contain weird characters, with Autoconf 2.62
+# and newer.
+name='weird  name with $ `#() &! characters"'
+cp Makefile.in "$name.in"
+
+for arg in Makefile \
+  --file=Makefile \
+  "--file=$name"
+do
+  rm -rf .deps _deps
+  ./config.status "$arg" depfiles >stdout 2>stderr
+  cat stdout
+  cat stderr >&2
+  grep '[Nn]o such file' stderr && Exit 1
+
+  if test -n "$depdir"; then
+    test -d $depdir || Exit 1
+  fi
+done
+:
diff --git a/tests/depend6.test b/tests/depend6.test
new file mode 100755
index 0000000..7a1f722
--- /dev/null
+++ b/tests/depend6.test
@@ -0,0 +1,47 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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/>.
+
+# Check for _AM_OUTPUT_DEPENDENCY_COMMANDS grouping bug,
+# reported by Markus Duft.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in << END
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << END
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c foo.h
+END
+
+cat >foo.c << END
+#include "foo.h"
+END
+: >foo.h
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure --disable-dependency-tracking 2>stderr || {
+  stat=$?; cat stderr >&2; Exit $stat;
+}
+cat stderr >&2
+grep shift stderr && Exit 1
+:
diff --git a/tests/distcleancheck.test b/tests/distcleancheck.test
new file mode 100755
index 0000000..31ffec8
--- /dev/null
+++ b/tests/distcleancheck.test
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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/>.
+
+# Make sure the suggested `distcleancheck_listfiles' in the manual works.
+# The example Makefile.am we use is from the FAQ entry `distcleancheck'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+# This Makefile.am is bogus.  See @node{distcleancheck} in the manual
+# for how to fix it properly.
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c
+dist_man_MANS = foo.1
+
+# We write `./foo.1' inside the rule on purpose, to avoid VPATH rewriting
+# done by some `make' implementations.
+foo.1: foo$(EXEEXT)
+       echo man page for foo$(EXEEXT) > ./foo.1
+
+## Ignore warnings about overridden variables
+AUTOMAKE_OPTIONS = -Wno-override
+distcleancheck_listfiles = \
+  find . -type f -exec sh -c 'test -f $(srcdir)/$$1 || echo $$1' \
+       sh '{}' ';'
+END
+
+cat >foo.c <<'END'
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+$MAKE distcheck
+
+# Now ensure that we really needed the override.
+sed '/distcleancheck_listfiles/,$d' Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE
+./configure
+$MAKE
+$MAKE -e distcheck && Exit 1
+
+:
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/dollarvar.test b/tests/dollarvar.test
new file mode 100755
index 0000000..8dc54f7
--- /dev/null
+++ b/tests/dollarvar.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/>.
+
+# Test to make sure that -Wportability complains about recursive
+# variable expansions and variables containing `$', `$(...)', or
+# `${...}' in the name.  We support recursive variable expansions using
+# the latter two constructs for the `silent-rules' option, and they are
+# rather widely supported in practice.  OTOH variable definitions
+# containing a `$' on the left hand side of an assignment are not
+# portable in practice, even though POSIX allows them.  :-/
+
+. ./defs
+
+set -e
+
+cat >Makefile.am <<'EOF'
+x = 1
+foo$x = 1
+bar$(x) = 1
+baz${x} = 1
+bla = $(foo$x)
+bli = $(foo$(x))
+blo = $(foo${x})
+EOF
+
+$ACLOCAL
+AUTOMAKE_fails -Wportability
+grep 'Makefile.am:2' stderr
+grep 'Makefile.am:3' stderr
+grep 'Makefile.am:4' stderr
+grep 'Makefile.am:5' stderr
+grep 'Makefile.am:6' stderr
+grep 'Makefile.am:7' stderr
+
+# On the other hand, if we allow `silent-rules' mode, then we need to
+# allow recursive variable expansion, too.
+
+# This should work with the `--silent-rules' command line switch.
+AUTOMAKE_fails -Wportability --silent-rules
+grep 'Makefile.am:2' stderr
+grep 'Makefile.am:3' stderr
+grep 'Makefile.am:4' stderr
+grep 'Makefile.am:5' stderr
+grep 'Makefile.am:6' stderr && Exit 1
+grep 'Makefile.am:7' stderr && Exit 1
+
+# This should work with AUTOMAKE_OPTIONS.
+echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
+
+AUTOMAKE_fails -Wportability
+grep 'Makefile.am:2' stderr
+grep 'Makefile.am:3' stderr
+grep 'Makefile.am:4' stderr
+grep 'Makefile.am:5' stderr
+grep 'Makefile.am:6' stderr && Exit 1
+grep 'Makefile.am:7' stderr && Exit 1
+
+
+:
diff --git a/tests/dollarvar2.test b/tests/dollarvar2.test
new file mode 100755
index 0000000..676cde2
--- /dev/null
+++ b/tests/dollarvar2.test
@@ -0,0 +1,38 @@
+#!/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/>.
+
+# Test to make sure that -Wportability turns on portability-recursive,
+# likewise for -Wno-...
+
+. ./defs
+
+set -e
+
+cat >Makefile.am <<'EOF'
+x = 1
+bla = $(foo$(x))
+EOF
+
+$ACLOCAL
+
+# $AUTOMAKE already contains -Wall -Werror.
+AUTOMAKE_fails -Wportability
+$AUTOMAKE --force -Wno-all
+$AUTOMAKE --force -Wno-portability
+echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
+$AUTOMAKE --force
+
+:
diff --git a/tests/flavor.test b/tests/flavor.test
new file mode 100755
index 0000000..6c4756b
--- /dev/null
+++ b/tests/flavor.test
@@ -0,0 +1,61 @@
+#! /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/>.
+
+# Make sure flavors like `cygnus', `gnu', `gnits' and command line
+# options like `--ignore-deps' and `--silent-rules' are preserved across
+# automake reruns.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_MAINTAINER_MODE
+AC_OUTPUT
+END
+
+: > Makefile.am
+: > NEWS
+: > README
+: > AUTHORS
+: > ChangeLog
+: > THANKS
+
+$ACLOCAL
+$AUTOCONF
+# Order flavors so that all needed files are installed early.
+for flavor in --gnits --gnu --foreign --cygnus --ignore-deps --silent-rules
+do
+  $AUTOMAKE --add-missing $flavor
+  ./configure --enable-maintainer-mode
+  grep " $flavor" Makefile
+  $MAKE
+
+  # Two code paths in configure.am:
+  # - either a file in $(am__configure_deps) has been updated ...
+  $sleep
+  touch aclocal.m4
+  $MAKE
+  grep " $flavor" Makefile
+
+  # - ... or not; i.e., Makefile.am or an included file has.
+  $sleep
+  touch Makefile.am
+  $MAKE
+  grep " $flavor" Makefile
+done
+
+:
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/gen-parallel-tests b/tests/gen-parallel-tests
new file mode 100755
index 0000000..4a71a73
--- /dev/null
+++ b/tests/gen-parallel-tests
@@ -0,0 +1,26 @@
+#! /bin/sh
+# Generate parallel-tests.am.
+#
+# For each test in the TESTS list in this Makefile.am file, that itself
+# tests features of the TESTS automake interface, generate a sibling
+# test that does likewise, but with the option `parallel-tests' enabled.
+
+set -e
+
+tests=`sed -n '/^TESTS =/,/^$/s/\(.*\.test\).*/\1/p' Makefile.am`
+{
+  grep -l '^TESTS ' $tests
+  grep -l ' TESTS ' $tests
+} |
+grep -v '.-p\.test' |
+LC_ALL=C sort -u |
+while read tst; do
+  if grep '^[^#]*parallel-tests' $tst >/dev/null \
+     || grep '^\. \./defs-p' $tst >/dev/null
+  then :; else echo $tst; fi;
+done |
+{
+  echo "## Generated by gen-parallel-tests.  Edit Makefile.am instead of this."
+  echo "parallel_tests = \\"
+  sed 's,\.test$,-p.test,; $!s,$, \\,'
+}
diff --git a/tests/getopt.test b/tests/getopt.test
index 46fcb4e..8dc9512 100755
--- a/tests/getopt.test
+++ b/tests/getopt.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008  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
@@ -31,7 +31,7 @@ grep ':.*nonexistent' stderr && Exit 1
 
 
 # Similarly, this should fail ...
-AUTOMAKE_fails --nonexistent 2>stderr
+AUTOMAKE_fails --nonexistent
 grep ':.*nonexistent' stderr
 
 # ... but this should not.
diff --git a/tests/instdir-java.test b/tests/instdir-java.test
new file mode 100755
index 0000000..186871c
--- /dev/null
+++ b/tests/instdir-java.test
@@ -0,0 +1,60 @@
+#! /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 $(javadir) is the empty string, then nothing should be installed there.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_CHECK_PROG([HAS_JAVAC], [javac], [:], [exit])
+($HAS_JAVAC 77); $HAS_JAVAC 77
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+java_JAVA = foo.java
+END
+
+cat >foo.java <<'END'
+class foo {
+}
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+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/instdir-lisp.test b/tests/instdir-lisp.test
new file mode 100755
index 0000000..849b86a
--- /dev/null
+++ b/tests/instdir-lisp.test
@@ -0,0 +1,58 @@
+#! /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 $(lispdir) is the empty string, then nothing should be installed there.
+
+required=emacs
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+lisp_LISP = l.el
+END
+
+: >l.el
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+lispdir=
+export lispdir
+
+$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/instdir-python.test b/tests/instdir-python.test
new file mode 100755
index 0000000..d2cc586
--- /dev/null
+++ b/tests/instdir-python.test
@@ -0,0 +1,62 @@
+#! /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 $(pythondir) is the empty string, then nothing should be installed there.
+
+required=python
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AM_PATH_PYTHON
+AC_OUTPUT
+END
+
+mkdir sub
+
+cat >Makefile.am <<'END'
+python_PYTHON = one.py
+END
+
+cat >one.py <<'END'
+def one(): return 1
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+instdir=`pwd`/inst
+destdir=`pwd`/dest
+mkdir build
+cd build
+../configure --prefix="$instdir"
+$MAKE
+
+pythondir=
+export pythondir
+
+$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/instmany-mans.test b/tests/instmany-mans.test
index 3f331a6..773fa76 100755
--- a/tests/instmany-mans.test
+++ b/tests/instmany-mans.test
@@ -117,6 +117,8 @@ cd build
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+# Multiple uninstall should work, too.
+$MAKE uninstall
 $MAKE uninstall
 test `find "$instdir" -type f -print | wc -l` = 0
 
diff --git a/tests/instmany-python.test b/tests/instmany-python.test
index beace0c..9f65237 100755
--- a/tests/instmany-python.test
+++ b/tests/instmany-python.test
@@ -106,6 +106,8 @@ cd build
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+# Multiple uninstall should work, too.
+$MAKE uninstall
 $MAKE uninstall
 test `find "$instdir" -type f -print | wc -l` = 0
 
diff --git a/tests/instmany.test b/tests/instmany.test
index f67e6fa..31176d7 100755
--- a/tests/instmany.test
+++ b/tests/instmany.test
@@ -132,6 +132,8 @@ cd build
 $MAKE
 # Try whether native install (or install-sh) works.
 $MAKE install
+# Multiple uninstall should work, too.
+$MAKE uninstall
 $MAKE uninstall
 test `find "$instdir" -type f -print | wc -l` = 0
 
diff --git a/tests/libtoo11.test b/tests/libtoo11.test
new file mode 100755
index 0000000..030e2d3
--- /dev/null
+++ b/tests/libtoo11.test
@@ -0,0 +1,38 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Make sure config.lt is removed with Libtool 2.2.x's LT_OUTPUT.
+# Report by Charles Wilson.
+
+required=libtoolize
+. ./defs || Exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_LIBTOOL
+m4_ifdef([LT_OUTPUT], [LT_OUTPUT])
+AC_OUTPUT
+END
+
+: > Makefile.am
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+./configure
+$MAKE distcheck
+:
diff --git a/tests/license2.test b/tests/license2.test
new file mode 100755
index 0000000..f16ed00
--- /dev/null
+++ b/tests/license2.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Check that installing `COPYING' outputs a warning.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = gnu
+END
+
+: >AUTHORS
+: >NEWS
+: >README
+: >ChangeLog
+: >INSTALL
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'COPYING' stderr
+
+AUTOMAKE_run 0 --add-missing
+grep 'COPYING' stderr
+grep 'GNU General Public License' stderr
+grep 'Consider adding.*version control' stderr
+test -f COPYING
diff --git a/tests/lisp8.test b/tests/lisp8.test
index 578cd9c..3e4981c 100755
--- a/tests/lisp8.test
+++ b/tests/lisp8.test
@@ -39,7 +39,8 @@ $AUTOCONF
 $AUTOMAKE --add-missing
 ./configure
 
-$MAKE -j >stdout || { cat stdout; Exit 1; }
+: >stdout
+$MAKE -j >>stdout || { cat stdout; Exit 1; }
 
 cat stdout
 test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
@@ -51,7 +52,8 @@ test -f elc-stamp
 
 rm -f am-*.elc
 
-$MAKE -j >stdout
+: >stdout
+$MAKE -j >>stdout
 
 cat stdout
 test 1 -eq `grep 'Warnings can be ignored' stdout | wc -l`
diff --git a/tests/ltinstloc.test b/tests/ltinstloc.test
index d6122fd..db57e4f 100755
--- a/tests/ltinstloc.test
+++ b/tests/ltinstloc.test
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -43,9 +43,12 @@ $ACLOCAL
 $AUTOCONF
 AUTOMAKE_fails --add-missing
 
+# libtoolize might have installed config.guess and config.sub already,
+# and autom4te might warn about bugs in Libtool macro files, so filter
+# out warnings about Makefile.am only.  We don't care in this test
+# whether automake installs config.guess and config.sub.
+
 cat >expected <<'END'
-configure.in:5: installing `./config.guess'
-configure.in:5: installing `./config.sub'
 Makefile.am:5: sub/liba2.la multiply defined in condition COND
 Makefile.am:5: `sub/liba2.la' should be installed below `lib' in condition 
COND ...
 Makefile.am:2: ... and should also be installed in `lib' in condition COND.
@@ -55,7 +58,7 @@ Makefile.am:2: ... and should also be installed in `lib' in 
condition COND.
 Makefile.am:2: Libtool libraries can be built for only one destination.
 END
 
-diff stderr expected
+grep '^Makefile.am' stderr | diff - expected
 
 sed 's/#//' < Makefile.am > t
 mv -f t Makefile.am
diff --git a/tests/maken.test b/tests/maken.test
new file mode 100755
index 0000000..8219ec6
--- /dev/null
+++ b/tests/maken.test
@@ -0,0 +1,61 @@
+#! /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/>.
+
+# Ensure that `make -n dist' and `make -n distcheck' do not change files
+# on disk, due to GNU make executing rules containing `$(MAKE)'.
+
+# Please keep this test in sync with sister test maken2.test.
+
+. ./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
+distcheck-hook:
+       @: > stamp-distcheck-hook
+test-no-distdir:
+       test ! -d $(distdir)
+       test ! -f stamp-distcheck-hook
+       test ! -f sub/stamp-sub-dist-hook
+END
+cat >sub/Makefile.am <<'END'
+dist-hook:
+       @: > stamp-sub-dist-hook
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$sleep
+echo stamp > stampfile
+$sleep
+for target in dist distcheck; do
+  $MAKE -n $target
+  $MAKE test-no-distdir
+  test `ls -1t | sed 1q` = stampfile
+done
+
+Exit 0
diff --git a/tests/maken2.test b/tests/maken2.test
new file mode 100755
index 0000000..4569375
--- /dev/null
+++ b/tests/maken2.test
@@ -0,0 +1,63 @@
+#! /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/>.
+
+# Ensure that `make -n dist' and `make -n distcheck' show what would happen.
+# This currently works for GNU make only.
+
+# Please keep this test in sync with sister test maken.test.
+
+required=GNUmake
+. ./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
+distcheck-hook:
+       @: > stamp-distcheck-hook
+test-no-distdir:
+       test ! -d $(distdir)
+       test ! -f stamp-distcheck-hook
+       test ! -f sub/stamp-sub-dist-hook
+END
+cat >sub/Makefile.am <<'END'
+dist-hook:
+       @: > stamp-sub-dist-hook
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$sleep
+echo stamp > stampfile
+$sleep
+for target in dist distcheck; do
+  $MAKE -n $target
+  $MAKE test-no-distdir
+  $MAKE -n $target | grep stamp-sub-dist-hook
+  test `ls -1t | sed 1q` = stampfile
+done
+
+Exit 0
diff --git a/tests/maken3.test b/tests/maken3.test
new file mode 100755
index 0000000..7810649
--- /dev/null
+++ b/tests/maken3.test
@@ -0,0 +1,167 @@
+#! /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/>.
+
+# Test `make -n' for various targets, to ensure that no files or
+# directories are created.
+#
+# This test exercises the GCS-mandated targets (except for dist)
+# as well as tags, TAGS.
+
+# Please keep this test in sync with sister test maken4.test.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub sub2
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = foo.test
+SUBDIRS = sub sub2
+##BUILT_SOURCES = foo
+foo:
+foo.test:
+all-local:
+       @: > stamp-all
+install-data-local:
+       @: > stamp-install
+uninstall-local:
+       @: > stamp-uninstall
+clean-local:
+       @: > stamp-clean
+distclean-local:
+       @: > stamp-distclean
+info-local:
+       @: > stamp-info
+html-local:
+       @: > stamp-html
+dvi-local:
+       @: > stamp-dvi
+ps-local:
+       @: > stamp-ps
+pdf-local:
+       @: > stamp-pdf
+check-local:
+       @: > stamp-check
+installcheck-local:
+       @: > stamp-installcheck
+mostlyclean-local:
+       @: > stamp-mostlyclean
+maintainer-clean-local:
+       @: > stamp-maintainer-clean
+END
+cat >sub/Makefile.am <<'END'
+all-local:
+       @: > stamp-all-sub
+install-data-local:
+       @: > stamp-install-sub
+uninstall-local:
+       @: > stamp-uninstall-sub
+clean-local:
+       @: > stamp-clean-sub
+distclean-local:
+       @: > stamp-distclean-sub
+info-local:
+       @: > stamp-info-sub
+html-local:
+       @: > stamp-html-sub
+dvi-local:
+       @: > stamp-dvi-sub
+ps-local:
+       @: > stamp-ps-sub
+pdf-local:
+       @: > stamp-pdf-sub
+check-local:
+       @: > stamp-check-sub
+installcheck-local:
+       @: > stamp-installcheck-sub
+tags:
+       @: > stamp-tags-sub
+TAGS:
+       @: > stamp-TAGS-sub
+mostlyclean-local:
+       @: > stamp-mostlyclean-sub
+maintainer-clean-local:
+       @: > stamp-maintainer-clean-sub
+END
+cat >sub2/Makefile.am <<'END'
+all install uninstall clean check:
+       @: > address@hidden
+info dvi pdf ps:
+       @: > address@hidden
+html:
+       @: > address@hidden
+install-info install-html install-dvi install-pdf install-ps:
+       @: > address@hidden
+installcheck installdirs tags TAGS mostlyclean:
+       @: > address@hidden
+## These targets cannot be overridden like this:
+## install-strip distclean maintainer-clean
+END
+
+$ACLOCAL
+$AUTOCONF
+
+check_targets ()
+{
+  set -e
+  for target in \
+    all install install-strip uninstall clean distclean check \
+    info html dvi pdf ps \
+    install-info install-html install-dvi install-pdf install-ps \
+    installcheck installdirs tags TAGS mostlyclean maintainer-clean
+  do
+    $MAKE -n $target >stdout || { cat stdout; Exit 1; }
+    cat stdout
+    case $target in
+    install-* | installdirs | tags | TAGS ) ;;
+    *)
+      test ! -f "stamp-$target$" || Exit 1
+      ;;
+    esac
+    case $target in
+    install-* | installdirs ) ;;
+    *)
+      test ! -f "sub/stamp-$target-sub" || Exit 1
+      ;;
+    esac
+    case $target in
+    distclean | maintainer-clean ) ;;
+    *)
+      test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
+      ;;
+    esac
+  done
+}
+
+$AUTOMAKE -Wno-override
+./configure
+check_targets || Exit 1
+
+# Now, introduce BUILT_SOURCES into the toplevel Makefile
+# TODO: add BUILT_SOURCES to sub2, fix fallout.
+sed 's/##//' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -Wno-override --force Makefile
+./configure
+check_targets || Exit 1
+
+Exit 0
diff --git a/tests/maken4.test b/tests/maken4.test
new file mode 100755
index 0000000..689a3a9
--- /dev/null
+++ b/tests/maken4.test
@@ -0,0 +1,172 @@
+#! /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/>.
+
+# Test `make -n' for various targets, to ensure that stdout output is
+# sufficiently complete.  This currently only works for GNU make and
+# BSD make implementations that support the `.MAKE' special target.
+#
+# This test exercises the GCS-mandated targets (except for dist)
+# as well as tags, TAGS.
+
+# Please keep this test in sync with sister test maken3.test.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub sub2
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+TESTS = foo.test
+SUBDIRS = sub sub2
+##BUILT_SOURCES = foo
+foo:
+foo.test:
+all-local:
+       @: > stamp-all
+install-data-local:
+       @: > stamp-install
+uninstall-local:
+       @: > stamp-uninstall
+clean-local:
+       @: > stamp-clean
+distclean-local:
+       @: > stamp-distclean
+info-local:
+       @: > stamp-info
+html-local:
+       @: > stamp-html
+dvi-local:
+       @: > stamp-dvi
+ps-local:
+       @: > stamp-ps
+pdf-local:
+       @: > stamp-pdf
+check-local:
+       @: > stamp-check
+installcheck-local:
+       @: > stamp-installcheck
+mostlyclean-local:
+       @: > stamp-mostlyclean
+maintainer-clean-local:
+       @: > stamp-maintainer-clean
+END
+cat >sub/Makefile.am <<'END'
+all-local:
+       @: > stamp-all-sub
+install-data-local:
+       @: > stamp-install-sub
+uninstall-local:
+       @: > stamp-uninstall-sub
+clean-local:
+       @: > stamp-clean-sub
+distclean-local:
+       @: > stamp-distclean-sub
+info-local:
+       @: > stamp-info-sub
+html-local:
+       @: > stamp-html-sub
+dvi-local:
+       @: > stamp-dvi-sub
+ps-local:
+       @: > stamp-ps-sub
+pdf-local:
+       @: > stamp-pdf-sub
+check-local:
+       @: > stamp-check-sub
+installcheck-local:
+       @: > stamp-installcheck-sub
+tags:
+       @: > stamp-tags-sub
+TAGS:
+       @: > stamp-TAGS-sub
+mostlyclean-local:
+       @: > stamp-mostlyclean-sub
+maintainer-clean-local:
+       @: > stamp-maintainer-clean-sub
+END
+cat >sub2/Makefile.am <<'END'
+all install uninstall clean check:
+       @: > address@hidden
+info dvi pdf ps:
+       @: > address@hidden
+html:
+       @: > address@hidden
+install-info install-html install-dvi install-pdf install-ps:
+       @: > address@hidden
+installcheck installdirs tags TAGS mostlyclean:
+       @: > address@hidden
+## These targets cannot be overridden like this:
+## install-strip distclean maintainer-clean
+END
+
+$ACLOCAL
+$AUTOCONF
+
+check_targets ()
+{
+  set -e
+  for target in \
+    all install install-strip uninstall clean distclean check \
+    info html dvi pdf ps \
+    install-info install-html install-dvi install-pdf install-ps \
+    installcheck installdirs tags TAGS mostlyclean maintainer-clean
+  do
+    $MAKE -n $target >stdout || { cat stdout; Exit 1; }
+    cat stdout
+    case $target in
+    install-* | installdirs | tags | TAGS ) ;;
+    *)
+      grep "stamp-$target$" stdout || Exit 1
+      test ! -f "stamp-$target$" || Exit 1
+      ;;
+    esac
+    case $target in
+    install-* | installdirs ) ;;
+    *)
+      grep "stamp-$target-sub" stdout || Exit 1
+      test ! -f "sub/stamp-$target-sub" || Exit 1
+      ;;
+    esac
+    case $target in
+    distclean | maintainer-clean ) ;;
+    *)
+      grep "should-not-be-executed" stdout || Exit 1
+      test ! -f "sub2/sub2-$target-should-not-be-executed" || Exit 1
+      ;;
+    esac
+  done
+}
+
+$AUTOMAKE -Wno-override
+./configure
+check_targets || Exit 1
+
+# Now, introduce BUILT_SOURCES into the toplevel Makefile
+# TODO: add BUILT_SOURCES to sub2, fix fallout.
+sed 's/##//' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -Wno-override --force Makefile
+./configure
+check_targets || Exit 1
+
+Exit 0
diff --git a/tests/man4.test b/tests/man4.test
new file mode 100755
index 0000000..558c880
--- /dev/null
+++ b/tests/man4.test
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Ensure `make dist' fails when help2man replacement man pages are created.
+#
+# The assumption here is the following: if the developer uses help2man to
+# generate man pages from --help output, then these man pages may not be
+# stored in VCS.  However, they should be distributed, so that the end user
+# that receives the tarball doesn't have to install help2man.  If they are
+# not distributed, then the developer should make help2man a prerequisite
+# to building the package from a tarball, e.g., with a configure check for
+# help2man that errors out if it is unavailable.  In both cases it is
+# sufficient to check only distributed man pages.
+#
+# Idea of this whole shenanigan is to allow somebody to check out sources from
+# a VCS and build and install them without needing help2man installed.  The
+# installed man pages will be bogus in this case.  Typically, this happens
+# when developers ask users to try out a fix from VCS; the developers 
themselves
+# will usually have help2man installed (or should install it).
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+dist_man_MANS = $(srcdir)/foo.1 bar.1
+dist_bin_SCRIPTS = foo bar
+$(srcdir)/foo.1:
+       $(HELP2MAN) --output=$@ $(srcdir)/foo
+bar.1:
+       $(HELP2MAN) --output=$(srcdir)/bar.1 $(srcdir)/bar
+
+## It is a bug that we need to list $(srcdir)/bar.1 explicitly here.
+MAINTAINERCLEANFILES = $(dist_man_MANS) $(srcdir)/bar.1
+END
+
+cat >>configure.in <<'END'
+AM_MISSING_PROG([HELP2MAN], [help2man])
+AC_OUTPUT
+END
+
+cat > foo <<'END'
+#! /bin/sh
+while test $# -gt 0; do
+  case $1 in
+    -h | --help) echo "usage: $0 [OPTIONS]..."; exit 0;;
+    -v | --version) echo "$0 1.0"; exit 0;;
+  esac
+  shift
+done
+END
+
+cp foo bar
+
+cat > help2man <<'END'
+#! /bin/sh
+# fake help2man script that lets `missing' think it is not installed
+exit 127
+END
+
+chmod +x foo bar help2man
+save_PATH=$PATH
+PATH=`pwd`:$PATH
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+./configure
+$MAKE
+$MAKE dist && Exit 1
+$MAKE distcheck && Exit 1
+$MAKE distclean
+
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE dist 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'install help2man' stderr
+$MAKE distcheck 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'install help2man' stderr
+
+rm -f ../help2man
+PATH=$save_PATH
+export PATH
+
+# If help2man is installed, then ensure that the recommendation works.
+if (help2man --version) >/dev/null 2>&1; then
+  $MAKE maintainer-clean
+  ../configure
+  $MAKE
+  $MAKE distcheck
+fi
+:
diff --git a/tests/man5.test b/tests/man5.test
new file mode 100755
index 0000000..626602a
--- /dev/null
+++ b/tests/man5.test
@@ -0,0 +1,67 @@
+#! /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/>.
+
+# Make sure to extract the correct mansection from files in man_MANS.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >> configure.in
+
+cat > Makefile.am << 'END'
+man_MANS = foo-1.4.5/foo.2 foo-1.4.5/bar.3 baz-1.4.2
+notrans_man_MANS = foo-1.4.5/nfoo.2 foo-1.4.5/nbar.3 nbaz-1.4.2
+END
+
+mkdir foo-1.4.5
+
+: > foo-1.4.5/foo.2
+: > foo-1.4.5/nfoo.2
+: > foo-1.4.5/bar.3
+: > foo-1.4.5/nbar.3
+: > baz-1.4.2
+: > nbaz-1.4.2
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Let's play with $DESTDIR too, it shouldn't hurt.
+./configure --mandir=/man
+DESTDIR="`pwd`/_inst" $MAKE -e install
+
+test -f ./_inst/man/man2/foo.2
+test -f ./_inst/man/man2/nfoo.2
+test -f ./_inst/man/man2/baz-1.4.2
+test -f ./_inst/man/man2/nbaz-1.4.2
+test -f ./_inst/man/man3/bar.3
+test -f ./_inst/man/man3/nbar.3
+
+test ! -d ./_inst/man/man1
+test ! -d ./_inst/man/man4
+test ! -d ./_inst/man/man5
+
+DESTDIR="`pwd`/_inst" $MAKE -e uninstall
+
+test ! -f ./_inst/man/man2/foo.2
+test ! -f ./_inst/man/man2/nfoo.2
+test ! -f ./_inst/man/man2/baz-1.4.2
+test ! -f ./_inst/man/man2/nbaz-1.4.2
+test ! -f ./_inst/man/man3/bar.3
+test ! -f ./_inst/man/man3/nbar.3
+
+:
diff --git a/tests/missing.test b/tests/missing.test
index 7d54183..911a552 100755
--- a/tests/missing.test
+++ b/tests/missing.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2008  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
@@ -43,6 +44,16 @@ $sleep
 echo 'AC_PREREQ(9999)' >> aclocal.m4
 $MAKE distdir
 
+# Try version number suffixes if we can add them safely.
+case $MYAUTOCONF in *autoconf)
+  ./configure AUTOCONF="${MYAUTOCONF}6789"
+  $MAKE
+  $sleep
+  # Hopefully the install version of Autoconf cannot compete with this one...
+  echo 'AC_PREREQ(9999)' >> aclocal.m4
+  $MAKE distdir
+esac
+
 # Run again, but without missing, to ensure that timestamps were updated.
 export AUTOMAKE ACLOCAL
 ./configure AUTOCONF="$MYAUTOCONF"
diff --git a/tests/mmodely.test b/tests/mmodely.test
index fd11ac2..2173523 100755
--- a/tests/mmodely.test
+++ b/tests/mmodely.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 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
@@ -39,18 +39,26 @@ zardoz_SOURCES = zardoz.y joe.l
 LDADD = @LEXLIB@
 END
 
-# The point of this test is that it is not dependant on a working lex or yacc.
+# The point of this test is that it is not dependent on a working lex or yacc.
 cat > joe.c <<EOF
 int joe (int arg)
 {
     return arg * 2;
 }
 EOF
+# On systems which link in libraries non-lazily and whose linkers
+# complain about unresolved symbols by default, such as Solaris, an
+# yylex function needs to be defined to avoid an error due to an
+# unresolved symbol.
 cat > zardoz.c <<EOF
 int joe (int arg);
+int yylex (void)
+{
+    return 0;
+}
 int main (int argc, char **argv)
 {
-    exit (joe (argc));
+    return joe (argc);
 }
 EOF
 
diff --git a/tests/parallel-am.test b/tests/parallel-am.test
new file mode 100755
index 0000000..e2101e5
--- /dev/null
+++ b/tests/parallel-am.test
@@ -0,0 +1,104 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Test parallel automake execution.
+
+# There are several hypotheses to be tested:  Independently of the number
+# of threads used by automake,
+# 0) the generated Makefile.in files must be identical without --add-missing,
+# 1) the Makefile.in that distributes auxiliary files must be generated
+#    after all other ones, so all installed aux files are caught,
+# 2) normal automake output should have identical content and be ordered
+#    in the same way, when --add-missing is not passed, or when
+#    --add-missing is passed but there are no concurrent file requirements
+#    (i.e., two Makefile.am files call for the same needed aux file)
+# 3) normal automake output should be identical and ordered in the same way
+#    with --add-missing, even with concurrent file requirements, and the
+#    installation of aux files should be race-free,
+# 4) warning and normal error output should be identical, in that duplicate
+#    warnings should be omitted in the same way as without threads,
+# 5) fatal error and debug messages could be identical.  This is not
+#    intended, though.
+#
+# This test checks (0), (1), and (2).  See sister tests for further coverage.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([parallel-am], [1.0])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PATH_LISPDIR
+AM_PATH_PYTHON
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS =
+END
+
+list='1 2 3 4 5 6 7 8 9'
+for i in $list; do
+  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.in
+  echo "SUBDIRS += sub$i" >> Makefile.am
+  mkdir sub$i
+  echo > sub$i/Makefile.am
+done
+# Use an include chain to cause a nontrivial location object to be
+# serialized through a thread queue.
+echo 'include foo.am' >> sub7/Makefile.am
+echo 'include bar.am' > sub7/foo.am
+echo 'python_PYTHON = foo.py' > sub7/bar.am
+echo 'lisp_LISP = foo.el' >> sub8/Makefile.am
+echo 'bin_PROGRAMS = p' >> sub9/Makefile.am
+
+rm -f install-sh missing depcomp
+mkdir build-aux
+
+$ACLOCAL
+
+# This test may have to be run several times in order to expose the
+# race that, when the last Makefile.in (the toplevel one) is created
+# before the other ones have finished, not all auxiliary files may
+# be installed yet, thus some may not be distributed.
+#
+# Further, automake output should be stable.
+
+# Generate expected output using the non-threaded code.
+unset AUTOMAKE_JOBS || :
+AUTOMAKE_run 0 --add-missing
+mv stderr expected
+Makefile_ins=`find . -name Makefile.in`
+for file in $Makefile_ins; do
+  mv $file $file.exp
+done
+
+AUTOMAKE_JOBS=5
+export AUTOMAKE_JOBS
+
+for run in 1 2 3 4 5 6 7; do
+  rm -f build-aux/* sub*/Makefile.in
+  AUTOMAKE_run 0 --add-missing
+  diff stderr expected
+  for file in $Makefile_ins; do
+    diff $file $file.exp
+  done
+done
+
+:
diff --git a/tests/parallel-am2.test b/tests/parallel-am2.test
new file mode 100755
index 0000000..9e002ba
--- /dev/null
+++ b/tests/parallel-am2.test
@@ -0,0 +1,78 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Test parallel automake execution.
+
+# This tests:
+# 4) warning and normal error output should be identical, in that duplicate
+#    warnings should be omitted in the same way as without threads,
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = main
+main_SOURCES = sub/main.c
+SUBDIRS =
+END
+
+list='1 2 3'
+for i in $list; do
+  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.in
+  echo "SUBDIRS += sub$i" >> Makefile.am
+  mkdir sub$i sub$i/sub
+  cat > sub$i/Makefile.am << END
+AUTOMAKE_OPTIONS = subdir-objects
+bin_PROGRAMS = sub$i
+sub${i}_SOURCES = sub/main$i.c
+END
+done
+
+mkdir build-aux
+
+$ACLOCAL
+
+# Independently of the number of worker threads, automake output
+# should be
+# - stable (multiple runs should produce the same output),
+# - properly uniquified,
+# - complete (output from worker threads should not be lost).
+#
+# The parts output by --add-missing are unstable not only wrt. order
+# but also wrt. content: any of the Makefile.am files may cause the
+# depcomp script to be installed (or several of them).
+# Thus we install the auxiliary files in a prior step.
+
+# Generate expected output using non-threaded code.
+unset AUTOMAKE_JOBS || :
+rm -f install-sh missing depcomp
+AUTOMAKE_fails --add-missing
+mv stderr expected
+
+AUTOMAKE_JOBS=5
+export AUTOMAKE_JOBS
+
+for i in 1 2 3 4 5 6 7 8; do
+  rm -f install-sh missing depcomp
+  AUTOMAKE_fails --add-missing
+  diff expected stderr
+done
+
+:
diff --git a/tests/parallel-am3.test b/tests/parallel-am3.test
new file mode 100755
index 0000000..11e4706
--- /dev/null
+++ b/tests/parallel-am3.test
@@ -0,0 +1,75 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Test parallel automake execution.
+
+# This tests:
+# 3) normal automake output should be identical and ordered in the same way
+#    with --add-missing, even with concurrent file requirements, and the
+#    installation of aux files should be race-free,
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([parallel-am], [1.0])
+AC_CONFIG_AUX_DIR([build-aux])
+AM_INIT_AUTOMAKE
+AC_PROG_CC
+AM_PATH_LISPDIR
+AM_PATH_PYTHON
+AC_CONFIG_FILES([Makefile])
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS =
+END
+
+list='1 2 3'
+for i in $list; do
+  echo "AC_CONFIG_FILES([sub$i/Makefile])" >> configure.in
+  echo "SUBDIRS += sub$i" >> Makefile.am
+  mkdir sub$i
+  cat > sub$i/Makefile.am <<END
+python_PYTHON = foo$i.py
+lisp_LISP = foo$i.el
+bin_PROGRAMS = p$i
+END
+done
+
+rm -f install-sh missing depcomp
+mkdir build-aux
+
+$ACLOCAL
+
+# Generate expected output using the non-threaded code.
+unset AUTOMAKE_JOBS || :
+AUTOMAKE_run 0 --add-missing
+mv stderr expected
+mv Makefile.in Makefile.in.exp
+
+AUTOMAKE_JOBS=3
+export AUTOMAKE_JOBS
+
+for run in 1 2 3 4 5 6 7; do
+  rm -f build-aux/* sub*/Makefile.in
+  AUTOMAKE_run 0 --add-missing
+  diff stderr expected
+  diff Makefile.in Makefile.in.exp
+done
+
+:
diff --git a/tests/parallel-tests.test b/tests/parallel-tests.test
new file mode 100755
index 0000000..056ab2f
--- /dev/null
+++ b/tests/parallel-tests.test
@@ -0,0 +1,142 @@
+#! /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/>.
+
+# Check parallel-tests features:
+# - VERBOSE
+# - clean
+# - TEST_SUITE_LOG
+# - dependencies between tests
+# - DISABLE_HARD_ERRORS
+# - RECHECK_LOGS
+
+. ./defs-p || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TEST_SUITE_LOG = mylog.log
+TESTS = foo.test bar.test baz.test
+XFAIL_TESTS = bar.test
+foo.log: bar.log
+bar.log: baz.log
+END
+
+cat >>foo.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+cat >>bar.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 99
+END
+cat >>baz.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 1
+END
+chmod a+x foo.test bar.test baz.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+./configure
+# No hard errors: all tests should be run, there should be one failure.
+env DISABLE_HARD_ERRORS=yes $MAKE -e check >stdout && { cat stdout; Exit 1; }
+cat stdout
+test `grep -c '^FAIL' stdout` -eq 1
+test -f mylog.log
+test `grep -c '^FAIL' mylog.log` -eq 1
+test -f baz.log
+test -f bar.log
+test -f foo.log
+# The summary should be formatted correctly.
+grep 'failedn' stdout && Exit 1
+
+# clean should remove all log files (but not more).
+: > unrelated.log
+$MAKE clean
+test ! -f baz.log
+test ! -f bar.log
+test ! -f foo.log
+test ! -f mylog.log
+test -f unrelated.log
+
+$MAKE clean
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+# Now, there should be two errors: bar.test is a hard error.
+test `grep -c '^FAIL' stdout` -eq 2
+test `grep -c '^FAIL' mylog.log` -eq 2
+
+# Check dependencies: baz.test needs to run before bar.test,
+# but foo.test is not needed.
+# Note that this usage has a problem: the summary will only
+# take bar.log into account, because the $(TEST_SUITE_LOG) rule
+# does not "see" baz.log.  Hmm.
+$MAKE clean
+env TESTS='bar.test' $MAKE -e check && Exit 1
+test -f baz.log
+test -f bar.log
+test ! -f foo.log
+test -f mylog.log
+
+# Upon a lazy rerun, foo.test should be run, but the others shouldn't.
+# Note that the lazy rerun still exits with a failure, due to the previous
+# test failures.
+# 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 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
+
+# Now, explicitly retry with all test logs already updated, and ensure
+# that the summary is still displayed.
+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
+grep 'this is.*bar.test' stdout
+grep 'this is.*baz.test' stdout
+
+:
diff --git a/tests/parallel-tests2.test b/tests/parallel-tests2.test
new file mode 100755
index 0000000..f9e2a3c
--- /dev/null
+++ b/tests/parallel-tests2.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/>.
+
+# Check parallel-tests features:
+# - check-html
+# - recheck-html
+
+required=rst2html
+. ./defs-p || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TEST_SUITE_LOG = mylog.log
+TESTS = foo.test bar.test baz.test
+END
+
+cat >>foo.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+cat >>bar.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 99
+END
+cat >>baz.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 1
+END
+chmod a+x foo.test bar.test baz.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$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-tests3.test b/tests/parallel-tests3.test
new file mode 100755
index 0000000..362f369
--- /dev/null
+++ b/tests/parallel-tests3.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/>.
+
+# Check parallel-tests features:
+# - concurrent parallel execution
+
+required=GNUmake
+. ./defs-p || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS =
+END
+
+for i in 1 2 3 4 5 6 7 8; do
+  echo "TESTS += foo$i.test" >> Makefile.am
+  cat >foo$i.test <<'END'
+#! /bin/sh
+echo "this is $0"
+# hack around maintainer-check check:
+sleep='sleep '1
+$sleep
+exit 0
+END
+  chmod a+x foo$i.test
+done
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+for build in serial parallel; do
+  mkdir $build
+  cd $build
+  ../configure
+  $MAKE
+  cd ..
+done
+
+cd serial
+$MAKE -j1 check &
+cd ../parallel
+$sleep
+# Use append mode here to avoid dropping output.
+# Yes, this actually happens.
+: >stdout
+$MAKE -j4 check >> stdout
+cd ..
+kill $!
+cat parallel/stdout
+test `grep -c PASS parallel/stdout` -eq 8
+:
diff --git a/tests/parallel-tests4.test b/tests/parallel-tests4.test
new file mode 100755
index 0000000..ca3e18b
--- /dev/null
+++ b/tests/parallel-tests4.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/>.
+
+# Check parallel-tests features:
+# - suffix rules
+
+. ./defs-p || Exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+## Note that automake should not match the '/test' part
+## of 'sub/test' as '.test' suffix.
+TESTS = foo.chk bar.test $(check_PROGRAMS) sub/test
+check_PROGRAMS = baz bla.test bli.suff
+TEST_EXTENSIONS = .chk .test
+END
+
+mkdir sub
+
+cat >foo.chk << 'END'
+#! /bin/sh
+exit 0
+END
+chmod a+x foo.chk
+cp foo.chk bar.test
+cp foo.chk sub/test
+
+cat >baz.c << 'END'
+int main (void)
+{
+  return 0;
+}
+END
+cp baz.c bla.c
+cp baz.c bli.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+./configure
+$MAKE
+$MAKE check
+test -f foo.log
+test -f bar.log
+test -f baz.log
+test -f bla.log
+test -f bli.suff.log
+test -f sub/test.log
+:
diff --git a/tests/parallel-tests5.test b/tests/parallel-tests5.test
new file mode 100755
index 0000000..f109cc2
--- /dev/null
+++ b/tests/parallel-tests5.test
@@ -0,0 +1,68 @@
+#! /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/>.
+
+# 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.  :-)
+
+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 =
+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'
+#! /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
+
+unset TESTS || :
+
+./configure
+$MAKE -j4 check
+$MAKE distcheck
+:
diff --git a/tests/parallel-tests6.test b/tests/parallel-tests6.test
new file mode 100755
index 0000000..59a0b0e
--- /dev/null
+++ b/tests/parallel-tests6.test
@@ -0,0 +1,43 @@
+#! /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/>.
+
+# Check parallel-tests features:
+# - empty TESTS
+# BSD make will expand `$(TESTS:=.log)' to `.log' unless overridden.
+
+. ./defs-p || Exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TESTS =
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+./configure
+$MAKE check >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep '0 tests' stdout
+
+Exit 0
diff --git a/tests/parallel-tests7.test b/tests/parallel-tests7.test
new file mode 100755
index 0000000..ea9c2d4
--- /dev/null
+++ b/tests/parallel-tests7.test
@@ -0,0 +1,91 @@
+#! /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/>.
+
+# Check parallel-tests features:
+# - per-extension test drivers
+
+. ./defs-p || Exit 1
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+## Note that automake should not match the '/test' part
+## of 'sub/test' as '.test' suffix.
+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
+LOG_COMPILER = ./noext-driver
+AM_CHK_LOG_FLAGS = 1
+CHK_LOG_FLAGS = 2
+AM_TEST_LOG_FLAGS = 3
+TEST_LOG_FLAGS = 4
+AM_LOG_FLAGS = 5
+LOG_FLAGS = 6
+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
+cp chk-driver noext-driver
+
+cat >foo.chk << 'END'
+#! /bin/sh
+exit 0
+END
+chmod a+x foo.chk
+cp foo.chk bar.test
+cp foo.chk sub/test
+
+cat >baz.c << 'END'
+int main (void)
+{
+  return 0;
+}
+END
+cp baz.c bla.c
+cp baz.c bli.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+unset TESTS || :
+
+./configure
+$MAKE
+$MAKE check
+grep 'chk-driver  *1  *2' foo.log
+grep 'test-driver  *3  *4' bar.log
+grep 'noext-driver  *5  *6' baz.log
+grep 'test-driver  *3  *4' bla.log
+grep 'noext-driver  *5  *6' bli.suff.log
+grep 'noext-driver  *5  *6' sub/test.log
+:
diff --git a/tests/parallel-tests8.test b/tests/parallel-tests8.test
new file mode 100755
index 0000000..309a2cf
--- /dev/null
+++ b/tests/parallel-tests8.test
@@ -0,0 +1,75 @@
+#! /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/>.
+
+# Check parallel-tests features:
+# - 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.  :-/
+
+. ./defs-p || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+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
+
+cat >>foo.in <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+
+$ACLOCAL
+$AUTOCONF
+AUTOMAKE_fails -a
+grep '(srcdir.*bar' stderr
+grep 'top_srcdir.*baz' stderr
+
+sed '/srcdir/d' < Makefile.am > t
+mv -f t Makefile.am
+$AUTOMAKE -a
+
+./configure
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+mkdir build
+cd build
+../configure
+$MAKE check
+test ! -f ../foo.log
+$MAKE distcheck
+
+:
diff --git a/tests/parallel-tests9.test b/tests/parallel-tests9.test
new file mode 100755
index 0000000..7c935d9
--- /dev/null
+++ b/tests/parallel-tests9.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/>.
+
+# Check parallel-tests features:
+# - recheck
+
+. ./defs-p || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+TEST_SUITE_LOG = mylog.log
+TESTS = foo.test bar.test baz.test
+END
+
+cat >>foo.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 0
+END
+cat >>bar.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 99
+END
+cat >>baz.test <<'END'
+#! /bin/sh
+echo "this is $0"
+exit 1
+END
+chmod a+x foo.test bar.test baz.test
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE check >stdout && { cat stdout; Exit 1; }
+cat stdout
+
+$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
+
+:
diff --git a/tests/postproc.test b/tests/postproc.test
index 254c936..dff60fc 100755
--- a/tests/postproc.test
+++ b/tests/postproc.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 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
@@ -40,7 +40,7 @@ mv myMakefile.in myMakefile.old
 echo '# Post-processed by post-processor 3.14.' > myMakefile.in
 cat myMakefile.old >> myMakefile.in
 
-./configure || Exit 1
+./configure || Exit $?
 
 test -f .deps/fred.Po || test -f _deps/fred.Po || Exit 1
 
diff --git a/tests/pr243.test b/tests/pr243.test
index 1a66e8e..516665e 100755
--- a/tests/pr243.test
+++ b/tests/pr243.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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
@@ -40,6 +40,6 @@ END
 $ACLOCAL || Exit 1
 $AUTOMAKE || Exit 1
 $AUTOCONF || Exit 1
-./configure || Exit 1
+./configure || Exit $?
 
 test -f .deps/fx64.Po
diff --git a/tests/pr266.test b/tests/pr266.test
index e3fd582..2b4ca1f 100755
--- a/tests/pr266.test
+++ b/tests/pr266.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 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
@@ -38,6 +38,6 @@ END
 $ACLOCAL || Exit 1
 $AUTOMAKE || Exit 1
 $AUTOCONF || Exit 1
-./configure || Exit 1
+./configure || Exit $?
 
 test -f .deps/fx64.Po
diff --git a/tests/pr300-ltlib.test b/tests/pr300-ltlib.test
index 99c03da..63078bb 100755
--- a/tests/pr300-ltlib.test
+++ b/tests/pr300-ltlib.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
@@ -48,7 +48,7 @@ $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
 ./configure --prefix "`pwd`/inst"
-$MAKE >stdout
+$MAKE V=1 >stdout
 cat stdout
 
 grep 'liba.la .*-rpath .*lib' stdout
diff --git a/tests/sanity.test b/tests/sanity.test
new file mode 100755
index 0000000..0d3830d
--- /dev/null
+++ b/tests/sanity.test
@@ -0,0 +1,49 @@
+#! /bin/sh
+# Copyright (C) 2008 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/>.
+
+# Unsafe absolute directory names should be diagnosed.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir 'unsafe$'
+cd 'unsafe$'
+
+cat > configure.in << 'END'
+AC_INIT([sanity], [1.0])
+AM_INIT_AUTOMAKE([foreign])
+AC_OUTPUT(Makefile)
+END
+
+cp ../install-sh ../missing .
+
+: > Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr
+grep 'unsafe absolute working directory' stderr
+
+cd ..
+mkdir build
+cd build
+../unsafe$/configure 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr
+grep 'unsafe srcdir' stderr
+:
diff --git a/tests/silent.test b/tests/silent.test
new file mode 100755
index 0000000..b39d49c
--- /dev/null
+++ b/tests/silent.test
@@ -0,0 +1,92 @@
+#!/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/>.
+
+# Check silent-rules mode, without libtool, standard depmode case.
+
+# Please keep this file in sync with silent2.test.
+
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar
+bar_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla
+bla_CFLAGS = $(AM_CFLAGS)
+EOF
+
+cat > foo.c <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cp foo.c bar.c
+cp foo.c sub/baz.c
+cp foo.c sub/bla.c
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout && Exit 1
+grep ' -o foo' stdout && Exit 1
+grep mv stdout && Exit 1
+grep 'CC .*foo\.' stdout
+grep 'CC .*bar\.' stdout
+grep 'CC .*baz\.' stdout
+grep 'CC .*bla\.' stdout
+grep 'CCLD .*foo' stdout
+grep 'CCLD .*bar' stdout
+grep 'CCLD .*baz' stdout
+grep 'CCLD .*bla' stdout
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout
+grep ' -o foo' stdout
+grep 'CC .*foo\.' stdout && Exit 1
+grep 'CC .*bar\.' stdout && Exit 1
+grep 'CC .*baz\.' stdout && Exit 1
+grep 'CC .*bla\.' stdout && Exit 1
+grep 'CCLD .*foo' stdout && Exit 1
+grep 'CCLD .*bar' stdout && Exit 1
+grep 'CCLD .*baz' stdout && Exit 1
+grep 'CCLD .*bla' stdout && Exit 1
+
+:
diff --git a/tests/silent2.test b/tests/silent2.test
new file mode 100755
index 0000000..a1149f4
--- /dev/null
+++ b/tests/silent2.test
@@ -0,0 +1,94 @@
+#!/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/>.
+
+# Check silent-rules mode, without libtool, non-fastdep case
+# (so that, with GCC, we also cover the other code paths in depend2).
+
+# Please keep this file in sync with silent.test.
+
+required=gcc
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar
+bar_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla
+bla_CFLAGS = $(AM_CFLAGS)
+EOF
+
+cat > foo.c <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cp foo.c bar.c
+cp foo.c sub/baz.c
+cp foo.c sub/bla.c
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure am_cv_CC_dependencies_compiler_type=gcc
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout && Exit 1
+grep ' -o foo' stdout && Exit 1
+grep mv stdout && Exit 1
+grep 'CC .*foo\.' stdout
+grep 'CC .*bar\.' stdout
+grep 'CC .*baz\.' stdout
+grep 'CC .*bla\.' stdout
+grep 'CCLD .*foo' stdout
+grep 'CCLD .*bar' stdout
+grep 'CCLD .*baz' stdout
+grep 'CCLD .*bla' stdout
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout
+grep ' -o foo' stdout
+grep 'CC .*foo\.' stdout && Exit 1
+grep 'CC .*bar\.' stdout && Exit 1
+grep 'CC .*baz\.' stdout && Exit 1
+grep 'CC .*bla\.' stdout && Exit 1
+grep 'CCLD .*foo' stdout && Exit 1
+grep 'CCLD .*bar' stdout && Exit 1
+grep 'CCLD .*baz' stdout && Exit 1
+grep 'CCLD .*bla' stdout && Exit 1
+
+:
diff --git a/tests/silent3.test b/tests/silent3.test
new file mode 100755
index 0000000..5e2ecda
--- /dev/null
+++ b/tests/silent3.test
@@ -0,0 +1,95 @@
+#!/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/>.
+
+# Check silent-rules mode, with libtool, standard depmode case.
+
+# Please keep this file in sync with silent4.test.
+
+required=libtoolize
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules
+# Need generic and non-generic rules.
+lib_LTLIBRARIES = libfoo.la libbar.la
+libbar_la_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules subdir-objects
+# Need generic and non-generic rules.
+lib_LTLIBRARIES = libbaz.la libbla.la
+libbla_la_CFLAGS = $(AM_CFLAGS)
+EOF
+
+cat > libfoo.c <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cp libfoo.c libbar.c
+cp libfoo.c sub/libbaz.c
+cp libfoo.c sub/libbla.c
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout && Exit 1
+grep ' -o libfoo' stdout && Exit 1
+grep mv stdout && Exit 1
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep ' CC .*baz\.' stdout
+grep ' CC .*bla\.' stdout
+grep ' CCLD .*foo' stdout
+grep ' CCLD .*bar' stdout
+grep ' CCLD .*baz' stdout
+grep ' CCLD .*bla' stdout
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout
+grep ' -o libfoo' stdout
+grep ' CC .*foo\.' stdout && Exit 1
+grep ' CC .*bar\.' stdout && Exit 1
+grep ' CC .*baz\.' stdout && Exit 1
+grep ' CC .*bla\.' stdout && Exit 1
+grep ' CCLD .*foo' stdout && Exit 1
+grep ' CCLD .*bar' stdout && Exit 1
+grep ' CCLD .*baz' stdout && Exit 1
+grep ' CCLD .*bla' stdout && Exit 1
+
+:
diff --git a/tests/silent4.test b/tests/silent4.test
new file mode 100755
index 0000000..7ed8922
--- /dev/null
+++ b/tests/silent4.test
@@ -0,0 +1,98 @@
+#!/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/>.
+
+# Check silent-rules mode, with libtool, non-fastdep case
+# (so that, with GCC, we also cover the other code paths in depend2).
+
+# Please keep this file in sync with silent3.test.
+
+required="libtoolize gcc"
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules
+# Need generic and non-generic rules.
+lib_LTLIBRARIES = libfoo.la libbar.la
+libbar_la_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules subdir-objects
+# Need generic and non-generic rules.
+lib_LTLIBRARIES = libbaz.la libbla.la
+libbla_la_CFLAGS = $(AM_CFLAGS)
+EOF
+
+cat > libfoo.c <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cp libfoo.c libbar.c
+cp libfoo.c sub/libbaz.c
+cp libfoo.c sub/libbla.c
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure am_cv_CC_dependencies_compiler_type=gcc
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout && Exit 1
+grep ' -o libfoo' stdout && Exit 1
+grep mv stdout && Exit 1
+grep ' CC .*foo\.' stdout
+grep ' CC .*bar\.' stdout
+grep ' CC .*baz\.' stdout
+grep ' CC .*bla\.' stdout
+grep ' CCLD .*foo' stdout
+grep ' CCLD .*bar' stdout
+grep ' CCLD .*baz' stdout
+grep ' CCLD .*bla' stdout
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep ' -c' stdout
+grep ' -o libfoo' stdout
+grep ' CC .*foo\.' stdout && Exit 1
+grep ' CC .*bar\.' stdout && Exit 1
+grep ' CC .*baz\.' stdout && Exit 1
+grep ' CC .*bla\.' stdout && Exit 1
+grep ' CCLD .*foo' stdout && Exit 1
+grep ' CCLD .*bar' stdout && Exit 1
+grep ' CCLD .*baz' stdout && Exit 1
+grep ' CCLD .*bla' stdout && Exit 1
+
+$MAKE distclean
+
+:
diff --git a/tests/silent5.test b/tests/silent5.test
new file mode 100755
index 0000000..90e21b9
--- /dev/null
+++ b/tests/silent5.test
@@ -0,0 +1,162 @@
+#!/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/>.
+
+# Check silent-rules mode, languages other than C.
+
+required='g++ gfortran flex bison'
+. ./defs
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_F77
+AC_PROG_FC
+AC_PROG_LEX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar
+bar_CFLAGS = $(AM_CFLAGS)
+foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
+SUBDIRS = sub
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = foo6.h
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = silent-rules subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla
+bla_CFLAGS = $(AM_CFLAGS)
+baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = baz6.h
+EOF
+
+cat > foo1.cpp <<'EOF'
+int main ()
+{
+  return 0;
+}
+EOF
+cat > foo2.f90 <<'EOF'
+      subroutine foo2
+      return
+      end
+EOF
+cat > foo3.f <<'EOF'
+      subroutine foo3
+      return
+      end
+EOF
+cat > foo5.l <<'EOF'
+%%
+"END"   return EOF;
+.
+%%
+EOF
+cat > foo6.y <<'EOF'
+%{
+void yyerror (char *s) {}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo1.cpp bar.c
+cp foo1.cpp sub/baz.c
+cp foo1.cpp sub/bla.c
+cp foo1.cpp sub/baz1.cpp
+cp foo2.f90 sub/baz2.f90
+cp foo3.f sub/baz3.f
+cp foo5.l sub/baz5.l
+cp foo6.y sub/baz6.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# configure once for fastdep, once for non-fastdep
+for config_args in '' am_cv_CC_dependencies_compiler_type=gcc
+do
+  ./configure $config_args
+  $MAKE >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  grep ' -c' stdout && Exit 1
+  grep ' -o ' stdout && Exit 1
+  grep mv stdout && Exit 1
+
+  grep 'CXX .*foo1\.' stdout
+  grep 'CXX .*baz1\.' stdout
+  grep 'FC .*foo2\.' stdout
+  grep 'FC .*baz2\.' stdout
+  grep 'F77 .*foo3\.' stdout
+  grep 'F77 .*baz3\.' stdout
+  grep 'LEX .*foo5\.' stdout
+  grep 'LEX .*baz5\.' stdout
+  grep ' CC .*foo5\.' stdout
+  grep ' CC .*baz5\.' stdout
+  grep 'YACC .*foo6\.' stdout
+  grep 'YACC .*baz6\.' stdout
+  grep ' CC .*foo6\.' stdout
+  grep ' CC .*baz6\.' stdout
+
+  grep 'CXXLD .*foo' stdout
+  grep 'CCLD .*bar' stdout
+  grep 'CXXLD .*baz' stdout
+  grep 'CCLD .*bla' stdout
+
+  $MAKE clean
+  $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+  cat stdout
+  grep ' -c' stdout
+  grep ' -o ' stdout
+
+  grep 'CXX .*foo1\.' stdout && Exit 1
+  grep 'CXX .*baz1\.' stdout && Exit 1
+  grep 'FC .*foo2\.' stdout && Exit 1
+  grep 'FC .*baz2\.' stdout && Exit 1
+  grep 'F77 .*foo3\.' stdout && Exit 1
+  grep 'F77 .*baz3\.' stdout && Exit 1
+  grep 'LEX .*foo5\.' stdout && Exit 1
+  grep 'LEX .*baz5\.' stdout && Exit 1
+  grep ' CC .*foo5\.' stdout && Exit 1
+  grep ' CC .*baz5\.' stdout && Exit 1
+  grep 'YACC .*foo6\.' stdout && Exit 1
+  grep 'YACC .*baz6\.' stdout && Exit 1
+  grep ' CC .*foo6\.' stdout && Exit 1
+  grep ' CC .*baz6\.' stdout && Exit 1
+
+  grep 'CXXLD .*foo' stdout && Exit 1
+  grep 'CCLD .*bar' stdout && Exit 1
+  grep 'CXXLD .*baz' stdout && Exit 1
+  grep 'CCLD .*bla' stdout && Exit 1
+  $MAKE clean
+  $MAKE maintainer-clean
+done
+
+:
diff --git a/tests/silent6.test b/tests/silent6.test
new file mode 100755
index 0000000..b0cacc8
--- /dev/null
+++ b/tests/silent6.test
@@ -0,0 +1,98 @@
+#!/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/>.
+
+# Check user extensibility of silent-rules mode.
+
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+# Layering violation: this conditional should be decided
+# by the package author, not the user.  We just do it here
+# for testing convenience.
+AM_CONDITIONAL([SILENT], [test "$silent_rules" = yes])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+if SILENT
+my_verbose = $(my_verbose_$(V))
+my_verbose_ = $(my_verbose_0)
+my_verbose_0 = @echo GEN $@;
+endif
+
+all-local: foo
+
+foo: foo.in
+       $(my_verbose)cp $(srcdir)/foo.in $@
+EXTRA_DIST = foo.in
+CLEANFILES = foo
+EOF
+
+: >foo.in
+
+$ACLOCAL
+$AUTOMAKE --add-missing --silent-rules
+$AUTOCONF
+
+./configure silent_rules=yes
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout
+grep 'cp ' stdout && Exit 1
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout && Exit 1
+grep 'cp ' stdout
+
+$MAKE distclean
+
+./configure silent_rules=no
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN foo' stdout && Exit 1
+grep 'cp ' stdout
+
+$MAKE distclean
+
+# Things should also work with -Wall in AM_INIT_AUTOMAKE.
+cat > configure.in <<'END'
+AC_INIT([silent6], [1.0])
+AM_INIT_AUTOMAKE([-Wall])
+AM_CONDITIONAL([SILENT], [:])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+$ACLOCAL
+AUTOMAKE_fails --force
+$AUTOMAKE --force -Wno-error
+grep ' --silent-rules' Makefile.in && Exit 1
+$AUTOMAKE --force --silent-rules
+grep ' --silent-rules' Makefile.in
+$AUTOMAKE --force -Wno-all -Wportability --silent-rules
+grep ' --silent-rules' Makefile.in
+
+echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
+$AUTOMAKE --force
+grep 'AM_V_GEN' Makefile.in
+$AUTOMAKE --force -Wno-all -Wportability
+grep 'AM_V_GEN' Makefile.in
+
+:
diff --git a/tests/silent7.test b/tests/silent7.test
new file mode 100755
index 0000000..68a0e89
--- /dev/null
+++ b/tests/silent7.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/>.
+
+# Check user extensibility of silent-rules mode.
+
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+all-local: foo
+
+## And here's how you should do it in your own code:
+foo: foo.in
+       $(AM_V_GEN)cp $(srcdir)/foo.in $@
+       $(AM_V_at)echo more >> $@
+
+EXTRA_DIST = foo.in
+CLEANFILES = foo
+EOF
+
+: >foo.in
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout && Exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+$MAKE distclean
+
+echo 'AUTOMAKE_OPTIONS = silent-rules' >> Makefile.am
+$AUTOMAKE
+
+./configure
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout
+grep 'cp ' stdout && Exit 1
+grep 'echo ' stdout && Exit 1
+
+$MAKE clean
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'GEN.*foo' stdout && Exit 1
+grep 'cp ' stdout
+grep 'echo ' stdout
+
+:
diff --git a/tests/specflg10.test b/tests/specflg10.test
new file mode 100755
index 0000000..b7d8442
--- /dev/null
+++ b/tests/specflg10.test
@@ -0,0 +1,88 @@
+#! /bin/sh
+# Copyright (C) 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
+# 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/>.
+
+# AM_DEFAULT_SOURCE_EXT
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_CXX
+AC_CONFIG_FILES([sub/Makefile sub2/Makefile])
+AM_CONDITIONAL([COND], [:])
+AC_OUTPUT
+END
+
+mkdir sub sub2
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub sub2
+bin_PROGRAMS = foo
+END
+
+cat > sub/Makefile.am << 'END'
+bin_PROGRAMS = bar baz
+AM_DEFAULT_SOURCE_EXT = .cpp
+END
+
+cat > sub2/Makefile.am << 'END'
+bin_PROGRAMS = bla
+if COND
+AM_DEFAULT_SOURCE_EXT = .foo .quux
+endif
+SUFFIXES = .foo .c
+.foo.c:
+       cat $< >$@
+BUILT_SOURCES = bla.c
+CLEANFILES = bla.c
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cp foo.c sub/bar.cpp
+cp foo.c sub/baz.cpp
+cp foo.c sub2/bla.foo
+
+$ACLOCAL
+$AUTOCONF
+
+# Conditional AM_DEFAULT_SOURCE_EXT does not work yet  :-(
+# (this limitation could be lifted).
+AUTOMAKE_fails --add-missing
+grep 'defined conditionally' stderr
+
+sed '/^if/d; /^endif/d' sub2/Makefile.am > t
+mv -f t sub2/Makefile.am
+
+# AM_DEFAULT_SOURCE_EXT can only assume one value
+# (lifting this limitation is not such a good idea).
+AUTOMAKE_fails --add-missing
+grep 'at most one value' stderr
+
+sed 's/ \.quux//' sub2/Makefile.am > t
+mv -f t sub2/Makefile.am
+
+$AUTOMAKE --add-missing
+
+./configure
+$MAKE
+$MAKE distcheck
+
+:
diff --git a/tests/subst4.test b/tests/subst4.test
new file mode 100755
index 0000000..02e46bd
--- /dev/null
+++ b/tests/subst4.test
@@ -0,0 +1,46 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Test AM_SUBST_NOTMAKE.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in <<'EOF'
+myrule="\
+foo: bar
+       echo making \$@ from bar
+       echo \$@ > \$@
+"
+AC_SUBST([myrule])
+AM_SUBST_NOTMAKE([myrule])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
address@hidden@
+EOF
+: > bar
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE foo
+test -f foo
+:
diff --git a/tests/txinfo18.test b/tests/txinfo18.test
index f847b63..bc66918 100755
--- a/tests/txinfo18.test
+++ b/tests/txinfo18.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
@@ -62,4 +62,4 @@ $AUTOMAKE --add-missing
 $AUTOCONF
 
 ./configure
-$MAKE distcheck
+TAR_OPTIONS= $MAKE distcheck
diff --git a/tests/txinfo26.test b/tests/txinfo26.test
index 52a7f78..87b4ba6 100755
--- a/tests/txinfo26.test
+++ b/tests/txinfo26.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2007, 2008  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
@@ -64,3 +64,6 @@ test -f _inst/info/main.info
 $MAKE uninstall
 test ! -f _inst/info/main.info
 test -f ../main.info
+
+# multiple uninstall should not fail.
+$MAKE uninstall
diff --git a/tests/txinfo32.test b/tests/txinfo32.test
new file mode 100755
index 0000000..267c0e9
--- /dev/null
+++ b/tests/txinfo32.test
@@ -0,0 +1,42 @@
+#! /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/>.
+
+# Make sure the documentation targets work as required with BSD make,
+# even in the presence of subdirs (requires presence of default *-am rules).
+
+. ./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
+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
+
+Exit 0
diff --git a/tests/vala.test b/tests/vala.test
index c9b12af..a0e97ad 100755
--- a/tests/vala.test
+++ b/tests/vala.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -54,9 +54,6 @@ grep 'am_zardoz_OBJECTS' Makefile.in
 grep 'am_libzardoz_la_OBJECTS' Makefile.in
 grep 'zardoz_vala.stamp' Makefile.in
 grep 'libzardoz_la_vala.stamp' Makefile.in
-grep ' --library=libzardoz' Makefile.in
 grep 'zardoz\.c' Makefile.in
-grep 'zardoz\.h' Makefile.in
 grep 'zardoz-foo\.c' Makefile.in
-grep 'zardoz-foo\.h' Makefile.in
 
diff --git a/tests/vala1.test b/tests/vala1.test
index 69edb15..158adcf 100755
--- a/tests/vala1.test
+++ b/tests/vala1.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -54,8 +54,5 @@ grep 'src_zardoz_OBJECTS' Makefile.in
 grep 'src_libzardoz_la_OBJECTS' Makefile.in
 grep 'src_zardoz_vala.stamp' Makefile.in
 grep 'src_libzardoz_la_vala.stamp' Makefile.in
-grep ' --library=libzardoz' Makefile.in
 grep 'zardoz\.c' Makefile.in
-grep 'zardoz\.h' Makefile.in
 grep 'src/zardoz-foo\.c' Makefile.in
-grep 'src/zardoz-foo\.h' Makefile.in
diff --git a/tests/vala2.test b/tests/vala2.test
index ce568d5..6209aa6 100755
--- a/tests/vala2.test
+++ b/tests/vala2.test
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006, 2008  Free Software Foundation,
-# Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -19,36 +19,59 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Test to make foo_PKGNAME variables are considered.
+# Test to make sure compiling Vala code really works with recursive make.
 
-required="libtool"
+required="libtool libtoolize pkg-config valac gcc"
 . ./defs || Exit 1
 
 set -e
 
+mkdir src
+
 cat >> 'configure.in' << 'END'
 AC_PROG_CC
+AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
 AM_PROG_VALAC
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+AC_CONFIG_FILES([src/Makefile])
 AC_OUTPUT
 END
 
 cat > 'Makefile.am' <<'END'
-lib_LTLIBRARIES = src/libzardoz.la
-src_libzardoz_la_SOURCES = src/zardoz-foo.vala src/zardoz-bar.vala
-src_libzardoz_la_PKGNAME = zardoz+-3.0
+SUBDIRS = src
+END
+
+cat > 'src/Makefile.am' <<'END'
+bin_PROGRAMS = zardoz
+zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+zardoz_LDADD = $(GOBJECT_LIBS)
+zardoz_SOURCES = zardoz.vala
 END
 
-: > ltmain.sh
-: > config.sub
-: > config.guess
+cat > 'src/zardoz.vala' <<'END'
+using GLib;
+
+public class Zardoz {
+  public static void main () {
+    stdout.printf ("Zardoz!\n");
+  }
+}
+END
+
+libtoolize
 
 $ACLOCAL
+$AUTOCONF
 $AUTOMAKE -a
 
-grep 'VALAC' Makefile.in
-grep 'src_libzardoz_la_OBJECTS' Makefile.in
-grep 'src_libzardoz_la_vala.stamp' Makefile.in
-grep ' --library=zardoz+-3.0' Makefile.in
-grep 'src/zardoz-foo\.c' Makefile.in
-grep 'src/zardoz-foo\.h' Makefile.in
+./configure
+$MAKE
+$MAKE distcheck
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE distcheck
+
diff --git a/tests/vala3.test b/tests/vala3.test
index 41b083d..7815393 100755
--- a/tests/vala3.test
+++ b/tests/vala3.test
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +19,7 @@
 # the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 # Boston, MA 02110-1301, USA.
 
-# Test to make sure compiling Vala code really works.
+# Test to make sure compiling Vala code really works with non-recursive make.
 
 required="libtool libtoolize pkg-config valac gcc"
 . ./defs || Exit 1
@@ -31,18 +32,11 @@ cat >> 'configure.in' << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_LIBTOOL
-AM_PROG_VALAC
-PKG_CHECK_MODULES(GOBJECT,gobject-2.0 >= 2.10)
+AM_PROG_VALAC([0.7.0])
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
 AC_OUTPUT
 END
 
-cat > 'Makefile.am' <<'END'
-bin_PROGRAMS = src/zardoz
-src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
-src_zardoz_LDADD = $(GOBJECT_LIBS)
-src_zardoz_SOURCES = src/zardoz.vala
-END
-
 cat > 'src/zardoz.vala' <<'END'
 using GLib;
 
@@ -53,12 +47,57 @@ public class Zardoz {
 }
 END
 
+cat > 'Makefile.am' <<'END'
+bin_PROGRAMS = src/zardoz
+src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+src_zardoz_LDADD = $(GOBJECT_LIBS)
+src_zardoz_SOURCES = src/zardoz.vala
+END
+
 libtoolize
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
-./configure
+./configure || Exit 77
 $MAKE
+$MAKE distcheck
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE distcheck
+
+cd ..
+rm -rf build
+
+# Try again with subdir-objects.
+
+cat > 'Makefile.am' <<'END'
+AUTOMAKE_OPTIONS = subdir-objects
+
+bin_PROGRAMS = src/zardoz
+src_zardoz_CFLAGS = $(GOBJECT_CFLAGS)
+src_zardoz_LDADD = $(GOBJECT_LIBS)
+src_zardoz_SOURCES = src/zardoz.vala
+END
+
+libtoolize
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure || Exit 77
+$MAKE
+$MAKE distcheck
+$MAKE distclean
+mkdir build
+cd build
+../configure
+$MAKE
+$MAKE distcheck
+
 
diff --git a/tests/vala4.test b/tests/vala4.test
index a2e8c96..1f9d2ca 100755
--- a/tests/vala4.test
+++ b/tests/vala4.test
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2008  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
diff --git a/tests/vala5.test b/tests/vala5.test
new file mode 100755
index 0000000..7369186
--- /dev/null
+++ b/tests/vala5.test
@@ -0,0 +1,74 @@
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2006, 2008, 2009
+# Free Software Foundation, Inc.
+#
+# This file is part of GNU Automake.
+#
+# GNU Automake 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.
+#
+# GNU Automake 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 Automake; see the file COPYING.  If not, write to
+# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+# Boston, MA 02110-1301, USA.
+
+# Test per-target flags, expected to fail.
+
+required="libtool libtoolize pkg-config valac gcc"
+. ./defs || Exit 1
+
+set -e
+
+mkdir src
+
+cat >> 'configure.in' << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_LIBTOOL
+AM_PROG_VALAC
+PKG_CHECK_MODULES([GOBJECT],[gobject-2.0 >= 2.10])
+AC_CONFIG_FILES([src/Makefile])
+AC_OUTPUT
+END
+
+cat > 'Makefile.am' <<'END'
+SUBDIRS = src
+END
+
+cat > 'src/Makefile.am' <<'END'
+bin_PROGRAMS = foo bar
+foo_CFLAGS = $(GOBJECT_CFLAGS)
+foo_LDADD = $(GOBJECT_LIBS)
+foo_SOURCES = baz.vala
+bar_SOURCES = baz.vala
+bar_VALAFLAGS = -D BAR
+bar_CFLAGS = $(GOBJECT_CFLAGS)
+bar_LDADD = $(GOBJECT_LIBS)
+END
+
+cat > 'src/baz.vala' <<'END'
+void main () {
+#if BAR
+  stdout.printf ("bar\n");
+#else
+  stdout.printf ("foo\n");
+#endif
+}
+END
+
+libtoolize
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+
diff --git a/tests/xz.test b/tests/xz.test
new file mode 100755
index 0000000..299ce1f
--- /dev/null
+++ b/tests/xz.test
@@ -0,0 +1,41 @@
+#! /bin/sh
+# Copyright (C) 2008  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/>.
+
+# Check support for no-dist-gzip with xz
+
+required=xz
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([xz], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-xz])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+       test $(DIST_ARCHIVES) = xz-1.0.tar.xz
+       test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test


hooks/post-receive
--
GNU Automake




reply via email to

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