Merge branch 'msvc'
authorPeter Rosin <peda@lysator.liu.se>
Mon, 16 Aug 2010 08:00:23 +0000 (10:00 +0200)
committerPeter Rosin <peda@lysator.liu.se>
Mon, 16 Aug 2010 08:00:23 +0000 (10:00 +0200)
182 files changed:
.gitignore
ChangeLog
ChangeLog.09
HACKING
Makefile.am
Makefile.in
NEWS
THANKS
aclocal.in
aclocal.m4
automake.in [changed mode: 0755->0644]
bootstrap
configure
configure.ac
doc/Makefile.am
doc/Makefile.in
doc/automake.texi
lib/Automake/ChannelDefs.pm
lib/Automake/Channels.pm
lib/Automake/Condition.pm
lib/Automake/Configure_ac.pm
lib/Automake/Location.pm
lib/Automake/Makefile.am
lib/Automake/Makefile.in
lib/Automake/Options.pm
lib/Automake/Rule.pm
lib/Automake/RuleDef.pm
lib/Automake/VarDef.pm
lib/Automake/Variable.pm
lib/Automake/Wrap.pm
lib/Automake/XFile.pm
lib/Automake/tests/Cond2.pl [new file with mode: 0644]
lib/Automake/tests/Cond3.pl [new file with mode: 0644]
lib/Automake/tests/Condition-t.pl
lib/Automake/tests/Condition.pl
lib/Automake/tests/DisjCon2.pl [new file with mode: 0644]
lib/Automake/tests/DisjCon3.pl [new file with mode: 0644]
lib/Automake/tests/DisjConditions-t.pl
lib/Automake/tests/DisjConditions.pl
lib/Automake/tests/Makefile.am
lib/Automake/tests/Makefile.in
lib/Automake/tests/Version.pl
lib/Automake/tests/Version2.pl [new file with mode: 0644]
lib/Automake/tests/Version3.pl [new file with mode: 0644]
lib/Automake/tests/Wrap.pl
lib/Makefile.in
lib/am/Makefile.in
lib/am/check.am
lib/am/dejagnu.am
lib/am/distdir.am
lib/am/progs.am
lib/am/tags.am
lib/am/texibuild.am
lib/am/texinfos.am
lib/config.guess
lib/config.sub
lib/gnupload
lib/texinfo.tex
m4/Makefile.in
m4/amversion.m4
tests/.gitignore
tests/Makefile.am
tests/Makefile.in
tests/README
tests/acloca14.test
tests/acloca18.test
tests/acloca19.test
tests/acloca23.test [new file with mode: 0755]
tests/aclocal.test
tests/aclocal5.test
tests/aclocal6.test
tests/aclocal8.test
tests/all.test
tests/all2.test [new file with mode: 0755]
tests/ar.test
tests/ar2.test
tests/asm.test
tests/asm2.test
tests/asm3.test
tests/candist.test [new file with mode: 0755]
tests/colon.test
tests/colon2.test
tests/colon3.test
tests/colon4.test
tests/colon5.test
tests/colon6.test
tests/colon7.test
tests/comment5.test
tests/cond46.test [new file with mode: 0755]
tests/cond5.test
tests/condd.test
tests/condhook.test
tests/condhook2.test [new file with mode: 0755]
tests/condinc2.test
tests/condman.test
tests/condman2.test
tests/condman3.test [new file with mode: 0755]
tests/confdeps.test
tests/conff.test
tests/conff2.test
tests/confh.test
tests/confh4.test
tests/confh5.test
tests/confh6.test [moved from tests/config.test with 84% similarity]
tests/confh7.test [moved from tests/conf2.test with 83% similarity]
tests/configure.test
tests/confincl.test
tests/conflnk.test
tests/conflnk2.test
tests/conflnk3.test
tests/conflnk4.test
tests/confsub.test
tests/confvar.test
tests/confvar2.test
tests/cscope.test [new file with mode: 0755]
tests/cscope2.test [moved from tests/fpinst2.test with 65% similarity]
tests/cscope3.test [new file with mode: 0755]
tests/defs.in
tests/depcomp.test
tests/depcomp2.test
tests/depcomp3.test
tests/depcomp4.test
tests/depcomp5.test
tests/depcomp6.test
tests/depcomp7.test
tests/distcom7.test
tests/ext3.test [new file with mode: 0755]
tests/extra9.test [new file with mode: 0755]
tests/gen-parallel-tests
tests/link_override.test [new file with mode: 0755]
tests/location.test
tests/ltinstloc.test
tests/lzip.test [moved from tests/fpinstall.test with 64% similarity]
tests/oldvars.test [new file with mode: 0755]
tests/parallel-am.test
tests/parallel-am2.test
tests/parallel-am3.test
tests/pluseq5.test
tests/pluseq9.test
tests/pr2.test
tests/pr204.test
tests/pr211.test
tests/pr220.test
tests/pr224.test
tests/pr229.test
tests/pr243.test
tests/pr266.test
tests/pr279-2.test
tests/pr279.test
tests/pr287.test
tests/pr300-lib.test
tests/pr300-ltlib.test
tests/pr300-prog.test
tests/pr307.test
tests/pr401.test
tests/pr401b.test
tests/pr401c.test
tests/pr72.test
tests/pr87.test
tests/pr9.test
tests/prefix.test
tests/primary.test
tests/primary2.test
tests/primary3.test
tests/proginst.test
tests/silent8.test [new file with mode: 0755]
tests/subobj.test
tests/subobj10.test
tests/subobj2.test
tests/subobj3.test
tests/subobj4.test
tests/subobj5.test
tests/subobj6.test
tests/subobj7.test
tests/subobj8.test
tests/subobj9.test
tests/subobjname.test
tests/subst5.test [new file with mode: 0755]
tests/tags2.test [new file with mode: 0755]
tests/vars3.test
tests/warnopts.test
tests/werror4.test [new file with mode: 0755]

index 81e5a98..716ef8b 100644 (file)
@@ -7,5 +7,9 @@ config.log
 config.status
 config.status.lineno
 configure.lineno
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
 tags
 TAGS
index 0f90bd0..73123f0 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
        through to the wrapped archiver.
        * tests/ar-lib.test: Test the above.
 
+2010-08-10  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak and/or extend some `acloca*.test' tests.
+       * tests/aclocal8.test:  Ensure verbose printing of captured
+       output.
+       * tests/aclocal.test: Likewise.  Also, add trailing `:'
+       command.
+       * tests/acloca19.test: Likewise.
+       * tests/aclocal5.test: Add trailing `:' command, and prefer
+       `$me' over hard-coded test name.
+       * tests/aclocal6.test: Likewise.
+       * tests/aclocal18.test: Add trailing `:' command, and make
+       some grepping slighty stricter.
+       * tests/acloca14.test: Likewise.  Also, prefer `diff' over
+       `cmp', and add some "cosmetic" blank lines.
+
+2010-08-09  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak and extend tests `pr[!0-9]*.test'.
+       * tests/primary3.test: Add trailing `:' command.
+       * tests/primary.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/primary2.test: Likewise.
+       * tests/prefix.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.
+       * tests/proginst.test: Likewise.
+
+       Modernize, improve and extend tests for PR (`pr[0-9]*.test').
+       * tests/pr2.test: Add trailing `:' command.
+       * tests/pr229.test: Likewise.
+       * tests/pr401.test: Likewise.
+       * tests/pr401b.test: Likewise.
+       * tests/pr401c.test: Likewise.
+       * tests/pr300-prog.test: Likewise, plus cosmetic changes in
+       spacing.
+       * tests/pr300-lib.test: Likewise.
+       * tests/pr300-ltlib.test: Likewise, and ensure verbose printing
+       of captured make stdout.
+       * tests/pr211.test: Add trailing `:' command.  Also, use the
+       `configure.in' stub created by ./defs, rather than writing it
+       from scratch.
+       * tests/pr204.test: Likewise, plus cosmetic spacing changes.
+       * tests/pr287.test: Likewise, and move setting of `errexit' shell
+       flag earlier in the script (just after inclusion of ./defs).
+       * tests/pr220.test: Make grepping of Automake's stderr stricter.
+       Also, add trailing `:' command, and cosmetic changes in spacing.
+       * tests/pr224.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Do not export
+       `CC=gcc' to configure explicitly (it's already exported globally
+       in ./defs, since we have "gcc" in $required).  Use the stub for
+       `configure.in' created by ./defs, rather than writing it from
+       scratch.  Do not create dummy files required by "gnu" mode (e.g.
+       README, NEWS), since we run automake in foreign mode anyway.
+       * tests/pr72.test: Enable `errexit' shell flags, and related
+       changes.  Extend existing checks a bit.
+       * tests/pr9.test: Likewise.  Also, avoid obolescent constructs in
+       the generated `configure.in', and extend existing checks over the
+       generated tarball a bit.
+       * tests/pr87.test: Enable `errexit' shell flags, and related
+       changes.  Add a trailing `:' command.  Also, do not create dummy
+       files required by "gnu" mode (e.g. README, NEWS), since we run
+       automake in foreign mode anyway.
+       * tests/pr243.test: Avoid obolescent constructs in the generated
+       `configure.in'.  Enable the `errexit' shell flag, and related
+       changes.  Cosmetic changes to spacing, add trailing `:' command,
+       and add a "FIXME" comment.
+       * tests/pr266.test: Likewise, and add explicit command line switch
+       `--enable-dependecy-tracking' to the ./configure call.
+       * tests/pr279.test: Avoid obolescent constructs in the generated
+       `configure.in'; also, use the `configure.in' stub created by
+       ./defs, rather than writing it from scratch.  Enable `errexit'
+       shell flag, and related changes.  Add trailing `:' command.
+       * tests/pr279-2.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/pr307.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Escape literal
+       dots in grep regular expressions.  Also, add a trailing `:'
+       command, and cosmetic changes to spacing.
+
+       Tests for PR: add excerpts from original bug report, for clarity.
+       * tests/pr2.test: Ditto.
+       * tests/pr9.test: Likewise.
+       * tests/pr72.test: Likewise.
+       * tests/pr87.test: Likewise.
+       * tests/pr211.test: Likewise.
+       * tests/pr220.test: Likewise.
+       * tests/pr224.test: Likewise.
+       * tests/pr229.test: Likewise.
+       * tests/pr243.test: Likewise.
+       * tests/pr266.test: Likewise.
+       * tests/pr279.test: Likewise, and tell to keep it in sync
+       with its sister test.
+       * tests/pr279-2.test: Likewise.
+
+2010-08-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Tweak, extend and improve tests `cond[a-z]*.test'.
+       * tests/condd.test: Add trailing `:' command.  Typofix in
+       comment.
+       * tests/condhook.test: Make sure target `install-data-hook' is
+       not called by `make install', but that data files are installed.
+       Use proper m4 quoting in configure.in. Add trailing `:' command.
+       * tests/condhook2.test: New test, sister test of condhook, with
+       inverted semantic.
+       * tests/condinc2.test: Use proper m4 quoting in configure.in.
+       Prefer trailing `:' command over trailing `Exit 0'.
+       * tests/condman2.test: Enable errexit shell flag, and related
+       changes.  Add trailing `:' command.
+       * tests/condman.test: Likewise.  Also, do not create useless
+       dummy manpages, and use proper m4 quoting in configure.in.
+       * tests/condman3.test: New test, similar to condman.test, but
+       it also runs ./configure and "make install", and check the
+       installed files.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and/or extend tests `colon*.test.
+       * tests/colon.test: Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.  Do not create
+       a useless dummy file.  Add trailing `:' command.
+       * tests/colon4.test: Enable the `errexit' shell flag, and
+       related changes.  Rely on the `configure.in' stub created by
+       `./defs', rather than writing one from scratch.
+       * tests/colon7.test: Enable `errexit' shell flag, and related
+       changes.  Improve the generated `configure.in' file.  Add
+       trailing `:' command.
+       * tests/colon2.test: Likewise.  Also, add some new checks.
+       * tests/colon5.test: Improve the generated `configure.in' file.
+       Add new, much deeper checks.  Add trailing `:' command.
+       * tests/colon6.test: Likewise.
+       * tests/colon3.test: Add trailing `:' command.  Remove useless
+       comments and echos.  Improve the generated `configure.in' file.
+       make some grepping tests stricter.  Add a "FIXME" comments about
+       planned improvements.
+
+       Improve and extend tests `asm*.test'.
+       * tests/asm.test: Use configure.in stub generated by ./defs,
+       and avoid obsoleted autoconf constructs.  Make grepping of
+       Automake stderr stricter.  Do not create useless source file.
+       Improve verbose messages.  Minor cosmetic changes.  Tell to
+       keep it in sync with other sister tests asm*.test.
+       * tests/asm2.test: Likewise.
+       * tests/asm3.test: Likewise.
+
+       Modernize, improve and/or extend test scripts `conf*.test'.
+       * tests/confh5.test: Cosmetic changes.
+       * tests/conff.test: Likewise.
+       * tests/confdeps.test: Likewise.
+       * tests/conflnk.test: Likewise.
+       * tests/conflnk2.test: Likewise.
+       * tests/confsub.test: Likewise.
+       * tests/confvar.test: Likewise, and make grepping of Makefile.in
+       stricter.
+       * tests/confvar2.test: Likewise.
+       * tests/conflnk3.test: Cosmetic changes, and re-enable a temporarly
+       disabled test (which didn't work with autoconf <= 2.59, but now we
+       are requiring autoconf 2.62, so...)
+       * tests/conflnk4.test: Cosmetic changes, and extend existing tests
+       accordingly to "TODO" comments.
+       * tests/conff2.test: Make grepping of Automake's stderr stricter.
+       Add some comments explaining why we don't use the `configure.in'
+       stub preset be ./defs.
+       * tests/confh.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch, and do not call AC_OUTPUT.
+       Enable `errexit' shell flag, and related changes.  Prefer diff over
+       cmp to compare text files. Prefer perl over sed to fetch the value
+       of $(DIST_COMMON) from Makefile.in.  Make grepping of the contents
+       of $(DIST_COMMON) stricter.
+       * tests/confh4.test: Use the `configure.in' stub created by ./defs,
+       rather than writing one from scratch.  Make grepping of Makefile.in
+       stricter.
+       * tests/confh5.test: Make grepping of `config.h' stricter.  Add a
+       comment.
+       * tests/configure.test: Avoid obsolescent constructs in generated
+       `configure.ac'.  Do not write `configure.in' two times.  Escape
+       literal dots in grep regular expressions.
+       * tests/confincl.test:  Enable `errexit' shell flag, and related
+       changes.  Prefer fgrep over grep.  Other cosmetic changes.
+       * tests/config.test: Renamed to ...
+       * tests/confh6.test: ... this.  Fix m4 quoting in `configure.in',
+       and make grepping of `config.h' and `config.h.in' stricter.
+       * tests/conf2.test: Renamed ...
+       * tests/confh7.test: ... to this.  Use the `configure.in' stub
+       created by ./defs, rather than writing one from scratch.  Try to
+       run the checks both with and without AC_PROG_CC and AC_OUTPUT in
+       `configure.in'.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Minor improvements and fixes in tests `depcomp*.test'.
+       * tests/depcomp.test: Do not create useless dummy source files.
+       Add a trailing `:' command.
+       * tests/depcomp2.test: Use `unset' on the CFLAG variable to ensure
+       it's not in in the environment, rather tthan exporting it with an
+       empty value.  Do not pass CC=gcc to configure, as that's already
+       done in ./defs since we have gcc in $required.  Ensure verbose
+       printing of captured stderr, and normalize its checking.  Add a
+       trailing `:' command.
+       * tests/depcomp3.test: Quote literal dots and dollar characters in
+       grep regexps.  Always use `: >' rather than `touch' to create empty
+       files.  Explicitly declare phony targets as such in the created
+       Makefile.am.  Add a trailing `:' command.
+       * tests/depcomp4.test: Quote literal dots and dollar characters in
+       grep regexp.  Explicitly declare phony targets as such in the
+       created Makefile.am.  Ensure verbose printing of captured makes'
+       stoud/stderr.  Add a trailing `:' command.
+       * tests/depcomp5.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Quote literal dots
+       and dollar characters in grep regexps.  Explicitly declare phony
+       targets as such in the created Makefile.am.  Add a trailing `:'
+       command.
+       * tests/depcomp6.test: Consistenty use m4 quoting in the generated
+       configure.in.  Cosmetic fixes to spacing.  Make the "dummy" `if'
+       statement required by OpenBSD's sh `set -e' more robust, and add
+       explanatory comments to it.
+       * tests/depcomp7.test: Likewise, and add  a trailing `:' command.
+
+       Separate failing part of test `all.test'.
+       * tests/all.test: Keep only (x)failing part of the test.  Working
+       checks moved out to ...
+       * tests/all2.test: ... this new test.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Modernize, improve and extend tests `subobj*.test'.
+       * tests/subobjname.test:  Add trailing `:' command.
+       * tests/subobj.test: Make grepping of `Makefile.in' stricter.
+       Escape literal dots in grep regexps.
+       * tests/subobj2.test:  Add trailing `:' command.  Do not use the
+       unportable fgrep option `-e'.
+       * tests/subobj3.test: Add trailing `:' command.
+       (configure.in): Use proper m4 quoting, and avoid obsolescent
+       constructs.
+       * tests/subobj8.test: Likewise.  Also, enable `errexit' shell
+       flag, with related changes
+       * tests/subobj4.test: Likewise.  Also, make grepping of
+       `Makefile.in' stricter.
+       * tests/subobj5.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj6.test: Add trailing `:' command.  Move setting of
+       `errexit' shell flag earlier in the script (just after inclusion
+       of ./defs).  Do not create useless dummy ac-init file `f'.
+       * tests/subobj7.test: Do not create useless dummy ac-init file
+       `f'.
+       (configure.in): Use the stub created by `./defs', rather than
+       writing it from scratch, and avoid obsolescent constructs.
+       * tests/subobj9.test: Move setting of `errexit' shell flag earlier
+       in the script (just after inclusion of ./defs).  Fail the test if
+       `make distcheck' fails.  Ensure verbose printing of captured make
+       stdout.  Avoid uselsss fork by doing simple grep instead of using
+       test -n "`COMMAND | grep ...`".
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+       (Makefile.am): Explicitly mark target "print" as phony.
+       * tests/subobj10.test: Removed duplicated call to `set -e'.  Add
+       trailing `:' command.
+       (configure.in): Normalize the call to AC_INIT w.r.t. other tests.
+
+       Remove a couple of obsoleted tests.
+       * tests/fpinstall.test: Removed.
+       * tests/fpinst2.test: Likewise.
+       * tests/Makefile.am (TESTS): Updated.
+
+       Bootstrap: updated HACKING entry.
+       * HACKING ("Working with git"): Explain how to override the
+       autoconf and autom4te programs used by the bootstrap process.
+
+       Bootstrap: fixlet.
+       * bootstrap: Do not remove `lib/Automake/Config.pm' anymore,
+       since we don't generate it.  Correctly quote arguments of
+       `eval' builtin.  Fixed a botched error message.  Removed an
+       extra blank line.
+
+       Bootstrap: don't search perl in $PATH.
+       * bootstrap: Do not explicitly search perl in $PATH anymore.
+       ($PATH_SEPARATOR): Removed, it's no more needed.
+
+       Bootstrap: let the user choose which autoconf to use.
+       * bootstrap ($AUTOCONF): New variable, from the environment.
+       ($AUTOM4TE): Likewise, for clarity.
+       Use "$AUTOCONF" instead of calling "autoconf" directly.
+
+       Minor improvements to tests ar*.test.
+       * tests/ar.test: Add trailing `:' command.
+       * tests/ar2.test: Likewise, and make grepping of generated
+       Makefile.in stricter.
+
 2010-08-06  Peter Rosin  <peda@lysator.liu.se>
 
        Add new auxiliary 'ar-lib' script, wrapping Microsoft lib.
        * lib/compile (func_file_conv): Use `!' not `^' for pattern
        negation.
 
+2010-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix maintainer-check failure.
+       * tests/cond5.test: Quote sleep argument, this isn't about
+       time stamp differences.
+
+       Sync auxiliary files from upstream.
+       * lib/config.guess, lib/config.sub, lib/texinfo.tex:
+       Sync from upstream.
+
+2010-08-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Work around a nasty bug (segfault) of Solaris make.
+       * lib/am/check.am (recheck, recheck-html): Trim trailing spaces
+       from $list, to avoid triggering a nasty bug (potential segfault)
+       on Solaris make.
+
+2010-08-06  Peter Rosin  <peda@lysator.liu.se>
+
+       Make cond5.test more robust on MSYS.
+       * tests/cond5.test: Add delay before the first kill attempt to
+       cater for problems with MSYS bash.
+
 2010-08-01  Peter Rosin  <peda@lysator.liu.se>
 
        Wrap some MSVC options in the compile script.
        the background automake process, but poll it every 10 seconds for
        at most 30 times (this makes the test both faster on good machines,
        and more resilient to spurious timeout-due failures when in low
-       priority or on havily-loaded systems).
+       priority or on heavily-loaded systems).
        Check also that automake writes the expected error messages on the
        standard error.
        Enable `errexit' flag, and related changes.
        * tests/ext.test: Add a comment explaining why an apparently
        useless `if' statement is indeed required.
 
+2010-06-13  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Add useful comment in test script obsolete.test.
        * tests/obsolte.test: Add a comment explaining why we need
        an indirection in adding $AUTOUPDATE to $required.
        * tests/Makefile.am (TESTS): Use only spaces, not tabs, in the
        definition of this variable.
 
+       Parallel tests generation: improve comments (tiny change).
+       * tests/Makefile.am ($(parallel_tests)): Added useful comment to
+       generated tests.
+
+       Tests defs: truly get rid of `$am_defs_included' (unused variable)
+        * tests/defs.in ($am_defs_included): Remove, its now unused.  It
+       should have been removed in a previous changeset, but the removal
+       was done only partially (oversight).
+
 2010-06-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Remove a couple of unneeded conditionals from tests.
        * tests/pluseq9.test: Slighty extended w.r.t. the grepping of
        Automake stderr.  Some unrelated cosmetic changes.
 
+2010-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       cscope.test: ensure verbose printing of captured stderr.
+       * tests/cscope.test: Print captured stderr before failing.
+
+2010-06-12  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
        Testsuite: ensure verbose printing of captured stderr.
        * tests/acloca18.test: Print captured stderr before either failing
        or grepping it.  Be sure to send captured stderr to stderr, not to
        Enable `errexit' shell flag.
 
 2010-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix error in generation of parallel tests.
+       * tests/defs.in ($am_skip_defs): New variable, to be used when
+       ./defs must be sourced multiple times.  If set, unset it and
+       only define $srcdir; otherwise, also go through the rest of
+       the script.
+       ($am_defs_included): Remove, no more needed.
+       * tests/Makefile.am ($(parallel_tests)): Update accordingly,
+       using only $srcdir from defs.
+       Fixes potential test failures of tests that use $required.
+
+2010-06-08  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Enable `errexit' shell flag in some test scripts.
        * tests/subcond.test: Enabled `errexit' shell flag, and related
        * tests/version2.test: Likewise, and avoid deprecated constructs
        in the generated `configure.in'.
 
+2010-06-07  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Improve declaration of dependencies in the testsuite.
+       * tests/Makefile.am (check_SCRIPTS): Remove.  Instead, let ...
+       ($(TEST_LOGS)): ... all test logs depend on the scripts.
+       * test/gen-parallel-tests: For each parallel test foo-p.test,
+       let `foo-p.log' also depend on `foo.test', since it is sourced.
+
+2010-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Coverage for TAGS_DEPENDENCIES warning.
+       * tests/tags2.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for use of anachronistic variables.
+       * tests/oldvars.test: New test.
+       * tests/Makefile.am: Update.
+
+       Testsuite coverage for bogus macro file serial numbers.
+       * tests/acloca18.test: Also test ill-formed serial numbers
+       and serial numbers after macro definitions.
+
+       Coverage for aclocal diagnosing underquoted macros.
+       * tests/acloca23.test: New test.
+       * tests/Makefile.am: Update.
+
 2010-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        Prefer AUTOMAKE_fails over `$AUTOMAKE | grep' in tests.
        * tests/mdate.test: Likewise.
        Prompted by Stefano Lattarini's change to discover.test.
 
+2010-06-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       More minor message fixes.
+       * aclocal.in (scan_file): Fix recommended info command line.
+       * automake.in (handle_lib_objects): No need to prepend function
+       name to prog_error message.
+       (handle_tags): Add missing word and missing space in error
+       message.
+       (handle_dist): Add missing closing single quote in message.
+       Line-wrap one long message for readability.
+
+2010-06-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix distcheck failure with distributed generated parallel tests.
+       * tests/Makefile.am ($(parallel_tests)): Cope with $(srcdir)
+       being different from the value at developer `make dist' time.
+       * tests/defs.in: Protect against mutiple inclusion, by using ...
+       ($am_defs_included): ... this new variable.
+       ($srcdir): Do not compute, but simply define to `@abs_srcdir@'
+       as substituted by configure.
+       Report, suggestions and first fix by Ralf Wildenhues, final
+       patch by Stefano Lattarini.
+
 2010-06-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Improve tests link*.test (enable `errexit' shell flag).
 
 2010-06-06  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
+       Tiny fix in silent8.test (display output of `make' command).
+       * tests/silent8.test: Make sure that the captured output of `make'
+       command is always displayed.
+
        Make tests on user extensibility of silent-rules mode stricter.
        * tests/silent6.test: Made stricter w.r.t. the grepping of the
        output produced by `make'.
        * tests/silent5.test: Likewise.
        * tests/silent9.test: Likewise.
 
-2010-01-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
-
-       Fix silent-rules output for disabled dependency tracking.
-       * lib/am/depend2.am [!%FASTDEP%]: Rework silent-rules variable
-       expansion code to also work in the case where %AMDEP% expands
-       to FALSE at config.status time, using new substitution string
-       %VERBOSE-NODEP%.
-       * automake.in (verbose_nodep_flag): New function, appending
-       `@am__nodep@' to the verbose-variable name.
-       (handle_languages): If dependencies are not disabled, use it to
-       set %VERBOSE-NODEP%.
-       * m4/depend.m4: Substitute am__nodep as '_no', so the second
-       verbose-variable will always expand to an empty string, if
-       dependencies are enabled.
-       * tests/silent5.test: Also test --disable-dependency-tracking;
-       also test per-target flags for non-C language files.
-       * tests/silent9.test: New test, like silent4.test but disable
-       dependency tracking.
-       * tests/Makefile.am: Adjust.
-       * NEWS, THANKS: Update.
-       Report by Dmitry V. Levin <ldv@altlinux.org>.
-
 2010-05-23  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Extend test on `nostdinc' automake option.
 
 2010-05-23  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Fix truncated comment in Makefile.am.
+       * Makefile.am (sc_tests_logs_duplicate_prefixes): Fix unfinished
+       sentence in comment.
+       Report by Stefano Lattarini.
+
+       Relax silent8.test for NetBSD make.
+       * tests/silent8.test: Accept ./foo.info in output as well.
+
        Fix unportable sed script in maintainer-check test.
        * Makefile.am (sc_tests_Exit_not_exit): Rewrite sed script to
        not contain semicolon after 'b' or brace commands, for NetBSD.
 
 2010-04-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Warning and error message formatting cleanups.
+       * aclocal.in (parse_arguments, main): Remove trailing period or
+       newline in error or warning messages, avoid capitalization of
+       the first word of a message.
+       * automake.in (check_user_variables, handle_languages)
+       (handle_ltlibraries, scan_aclocal_m4, scan_autoconf_config_files)
+       (scan_autoconf_files, cond_stack_if, require_file_internal)
+       (usage, generate_makefile, parse_arguments): Likewise.
+       * lib/Automake/ChannelDefs.pm (set_strictness): Likewise.
+       * lib/Automake/Configure_ac.pm (find_configure_ac): Likewise.
+       * lib/Automake/Options.pm (set_strictness): Likewise.
+       * lib/Automake/Rule.pm (define): Likewise.
+       * lib/Automake/Variable.pm (define, variables_dump): Likewise.
+       * tests/ltinstloc.test, tests/suffix11.test: Adjust expected
+       error message.
+       * lib/Automake/Channels.pm (setup_channel): Reword error message
+       to be the same as in msg.
+
+       Fix placing of ellipses in English text and synopses.
+       * Makefile.am: Be sure to add a space before `...' in natural
+       language text.
+       * automake.in (scan_autoconf_traces): Likewise.
+       * lib/Automake/Rule.pm (define): Likewise.
+       * lib/Automake/Variable.pm (define): Likewise.
+       * lib/am/dejagnu.am: Likewise.
+       * lib/am/progs.am: Likewise.
+       * lib/gnupload (dprint, upload): Likewise.
+       * tests/confdeps.test: Likewise.
+       * tests/location.test: Adjust expected output.
+       * automake.in (usage): In synopsis, use singular for OPTION,
+       * remove space before ellipsis.
+       * aclocal.in (usage): Likewise.  Also, fix indentation.
+
+       Fix more duplicate message prefixes.
+       * lib/Automake/XFile.pm (seek): Do not prepend $me.
+       ($me): Remove now-unused package-global.
+       * aclocal.in (check_acinclude): Remove duplicate 'warning: '
+       prefix.
+
        Fix typo in manual.
        * doc/automake.texi (Simple Tests using parallel-tests): Add
        missing closing parenthesis.
        * automake.in (read_main_am_file): Call variables_dump, not
        macros_dump.  Print actual error before list of variables.
 
-2010-04-25  Stefano Lattarini  <stefano.lattarini@gmail.com>
+2010-04-22  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Minor improvements in comments of test `silent3.test'.
        * tests/silent3.test: Tell to keep it in sync with `silent9.test'
 
 2010-04-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Print 'warnings are treated as errors' note if needed.
+       * lib/Automake/Channels.pm: Fix typo in comment.
+       (_print_message): If -Werror is enabled, print a 'warnings are
+       treated as errors' note before the first such warning.
+       * tests/warnopts.test: Adjust comment to mention expected warning.
+       Adjust code to ignore 'warnings are treated as errors' note.
+       * tests/location.test: Adjust expected output with -Werror.
+       * tests/werror4.test: New test.
+       * tests/Makefile.am: Update.
+       * NEWS: Update.
+
+       Ensure we don't print 'warning:' or 'error:' twice.
+       * Makefile.am (sc_ensure_testsuite_has_run): New helper rule.
+       (sc_tests_logs_duplicate_prefixes): New rule, to check for
+       wrong-looking warning and error messages in the test suite logs.
+       * aclocal.in (scan_configure_dep, scan_file): Remove duplicate
+       `warning: ' prefix.
+       * tests/vars3.test: Rename variable to avoid false positive.
+
+       Prepend type to warning, error, and fatal messages.
+       For the first part of messages of types `error' or `fatal',
+       prepend `error: ' to the message.  Prepend `warning: ' to
+       warning messages, whatever the setting of -Werror.
+       * lib/Automake/Channels.pm (partial): Move up definition.
+       (_format_message): Emit `header' and `footer' strings only with
+       the first resp. last part of a set of partial messages.
+       * lib/Automake/ChannelDefs.pm: Add missing '1;' statement at the
+       end of the module.
+       (Automake::ChannelDefs): Setup warning channels with header
+       `warning: ', error and fatal messages with header `error: '.
+       * tests/condinc2.test, tests/ltinstloc.test: Adjust expected
+       error messages.
+       * tests/comment5.test: Likewise.  Also, include stack notes
+       should not start with `error:'.
+       * tests/location.test: Likewise.  Also, try both -Werror and
+       -Wno-error.
+       * NEWS: Update.
+       Report by Bruno Haible.
+
+       Fix capitalization of error messages, reword one message.
+       * lib/Automake/Variable.pm (define): Do not capitalize the first
+       word in the error message.
+       * automake.in (require_file_internal): Likewise.  Also, reword
+       and line-wrap for better readability.
+       * tests/distcom7.test, tests/pluseq5.test, tests/pluseq9.test:
+       Adjust tests.
+
+       Fix connected warnings about obsolete exeext override.
+       * lib/Automake/Rule.pm (define): Merge two warnings that belong
+       together, by setting the 'partial' flag for the first one.
+
        Fix per-Makefile.am setting of -Werror.
        Before this patch, 'AUTOMAKE_OPTIONS = -Werror' in one
        Makefile.am would carry over to other Makefile.am files
        * NEWS, THANKS: Update.
        Report by Pavel Sanda.
 
+2010-04-11  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Avoid possible false negatives in cond46.test.
+       * tests/cond46.test: Enable shell `errexit' flag (and bumped
+       copyright years).  Due to this change, the testcase should now
+       fail on unexpected failures in calls to $ACLOCAL/$AUTOMAKE (whose
+       outcomes were previously unchecked), and on failures in grepping
+       the expected diagnostic in Automake stderr.
+
+2010-04-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Generated tests are now just a thin layer around other tests.
+       * tests/Makefile.am: Rewrite the rule to generate the `*-p.test'
+       test scripts so that any of them simply includes the corresponding
+       `*.test' script (after setting `$parallel_tests' to `yes').
+       * tests/.gitignore: Add wildcard for temporary files used in the
+       generation of `*-p.test' tests.
+
 2010-03-30  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Avoid an unportable use of `$status' shell variable.
        * tests/parallel-tests6.test: Likewise.
        * tests/parallel-tests7.test: Likewise.
 
+2010-03-01  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix cscope test on systems without working Fortran compiler.
+       * tests/cscope.test: Skip remainder of test if `$MAKE all' fails.
+       * THANKS: Update.
+       Report by Peter Johansson.
+
+2010-02-24  Antonio Diaz Diaz  <ant_diaz@teleline.es>  (tiny change)
+           Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Add lzip compression support.
+       * automake.in (handle_dist): Recognize dist-lzip.
+       (make_paragraphs): Map LZIP to dist-lzip.
+       * doc/automake.texi (Dist): Add dist-lzip.
+       (Options): Likewise.
+       * lib/Automake/Options.pm (_process_option_list): Add dist-lzip.
+       * lib/am/distdir.am
+       (dist dist-all): Add command to create an lzip-compressed tarball.
+       (distcheck): Handle lzip-compressed tarballs just like the others.
+       * tests/defs.in: Test for lzip, too.
+       * tests/lzip.test: New file, based on nogzip.test.
+       * tests/Makefile.am (TESTS): Add lzip.test.
+       * NEWS: Update.
+
 2010-02-22  Karl Berry  <karl@gnu.org>
 
        Improve help message of mdate-sh.
        Fix some typos in the manual
        * doc/automake.texi (Nested Packages, Rebuilding): Fix typos.
 
+2010-01-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix silent-rules output for disabled dependency tracking.
+       * lib/am/depend2.am [!%FASTDEP%]: Rework silent-rules variable
+       expansion code to also work in the case where %AMDEP% expands
+       to FALSE at config.status time, using new substitution string
+       %VERBOSE-NODEP%.
+       * automake.in (verbose_nodep_flag): New function, appending
+       `@am__nodep@' to the verbose-variable name.
+       (handle_languages): If dependencies are not disabled, use it to
+       set %VERBOSE-NODEP%.
+       * m4/depend.m4: Substitute am__nodep as '_no', so the second
+       verbose-variable will always expand to an empty string, if
+       dependencies are enabled.
+       * tests/silent5.test: Also test --disable-dependency-tracking;
+       also test per-target flags for non-C language files.
+       * tests/silent9.test: New test, like silent4.test but disable
+       dependency tracking.
+       * tests/Makefile.am: Adjust.
+       * NEWS, THANKS: Update.
+       Report by Dmitry V. Levin <ldv@altlinux.org>.
+
 2010-01-17  Stefano Lattarini  <stefano.lattarini@gmail.com>
 
        Slighty improve tests acoutbs.test and acoutbs2.test.
index 063c06b..7b07c36 100644 (file)
        * lib/gnupload: Mention ncftpput in `--help' output.
        Report by Bruce Korb.
 
+2009-12-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       * NEWS: Update.
+
 2009-12-05  Antonio Diaz Diaz  <ant_diaz@teleline.es>
 
        Replace unlzma, gunzip, bunzip2 with pack tool -d invocation.
        current directory.  Use it instead of `pwd` command substitution,
        to avoid Heirloom/Solaris Sh bug with `set -e'.
 
+2009-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fix requirements of silent8.test.
+       * tests/silent8.test: Require makeinfo --html, tex, texi2dvi -o,
+       dvips.
+
+2009-12-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       File `automake.in' is not meant to be executed (only to be
+       preprocessed into `automake'), so don't leave it executable.
+       * automake.in: Remove executable bit.
+
+2009-12-04  Stefano Lattarini  <stefano.lattarini@gmail.com>
+
+       Don't make the generated Automake's Config.pm executable.
+       * lib/Automake/Makefile.am (Config.pm): Don't make the generated
+       `Config.pm' file executable.
+
 2009-11-28  Jim Meyering  <meyering@redhat.com>
 
        do not put world-writable directories in distribution tarballs
        * Makefile.am (EXTRA_DIST): Add bootstrap.
        Report by Jan Engelhardt.
 
+2009-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Coverage for corner cases in derive_suffix.
+       Ensure unrelatex SUFFIXES entries and unrelated inference rules
+       are ignored silently.
+       * tests/ext3.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for user-provided _LINK variables.
+       * tests/link_override.test: New test.
+       * tests/Makefile.am: Adjust.
+
+       Coverage: warn about substitutions that need EXTRA_PRIMARY.
+       * tests/extra9.test: New test.
+       * tests/Makefile.am: Adjust.
+
+       Coverage: warn about configure substitution in EXTRA_PRIMARY.
+       * tests/subst5.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for syntax errors with conditionals in included fragments.
+       * tests/condinc2.test: Amend test.
+
+       Coverage: diagnose variables with forbidden dist_ prefix.
+       * tests/candist.test: New test.
+       * tests/Makefile.am: Update.
+
+       Coverage for conditional `else' and `endif' arguments.
+       * tests/cond46.test: New test.
+       * tests/Makefile.am: Update.
+
 2009-10-31  Jim Meyering  <meyering@redhat.com>
            Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
        * tests/subdir10.test: New test.
        * tests/Makefile.am: Update.
 
+2009-10-18  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Simplify Variable::_check_ambiguous_condition.
+       * lib/Automake/Variable.pm (_check_ambiguous_condition): No need
+       to check for $def since ambiguous_p returns an empty $message if
+       there is no other condition which is ambiguous to $cond.
+
+       Coverage for DisjConditions.pm.
+       * lib/Automake/tests/DisjConditions.pl (test_basics): Increase
+       test coverage: test ->human, ->merge, ->simplify, ->multiply.
+       * lib/Automake/tests/DisjConditions-t.pl (test_basics): Likewise
+       changes, but including state copies across thread creation.
+       * lib/Automake/tests/DisjCon2.pl: New test.
+       * lib/Automake/tests/DisjCon3.pl: Likewise.
+       * lib/Automake/tests/Makefile.am (TESTS, XFAIL_TESTS): Adjust.
+
+       Coverage and fixes for Condition.pm.
+       * lib/Automake/Condition.pm (new): Catch common programming
+       errors better by checking type of passed argument before
+       munging them to all be strings through split.
+       * lib/Automake/tests/Condition.pl (test_basics): Also test
+       ->human.
+       (test_merge): New function, test ->merge, ->merge_conds,
+       ->strip.
+       * lib/Automake/tests/Condition-t.pl (test_basics, test_merge):
+       Likewise changes, but including state copies across thread
+       creation.
+       * lib/Automake/tests/Cond2.pl: New test for programming error.
+       * lib/Automake/tests/Cond3.pl: Likewise.
+       * lib/Automake/tests/Makefile.am (TESTS, XFAIL_TESTS): Update.
+
+       Coverage for Wrap.pm.
+       * lib/Automake/tests/Wrap.pl (@tests): Add test for word with
+       trailing space.
+       (test_makefile_wrap, @makefile_tests): New function, new list of
+       tests, to test makefile_wrap.
+
+       Coverage for Version.pm.
+       * lib/Automake/tests/Version.pl (test_version_compare): Also
+       try Automake::Version::check for the version pairs, taking into
+       account the special-case naming of code forks.
+       (@tests): Add more test cases.
+       (test_bad_versions, @bad_versions): New function, new test cases,
+       to ensure bad version strings are rejected.
+       * lib/Automake/tests/Version2.pl: New test.
+       * lib/Automake/tests/Version3.pl: Likewise.
+       * lib/Automake/tests/Makefile.am (TESTS): Add tests here ...
+       (XFAIL_TESTS): ... and here, new.
+
+       Pod coverage for Perl modules.
+       * lib/Automake/ChannelDefs.pm (parse_warnings): Fix
+       typo in Pod documentation.
+       * lib/Automake/Condition.pm: Add a couple of missing `=back'
+       lines.
+       (_has): Renamed from ...
+       (has): ... this, as this is an internal method.
+       (strip, false, true_when): Adjust callers.
+       * lib/Automake/Configure_ac.pm: Add Pod `Functions' section with
+       documentation for find_configure_ac and require_configure_ac.
+       * lib/Automake/Location.pm: Fix typo in Pod.  Add `Methods'
+       section, document methods.
+       * lib/Automake/RuleDef.pm: New `Methods' Pod section.
+       * lib/Automake/VarDef.pm: Document `raw_value'.
+       * lib/Automake/Wrap.pm (_tab_length): Rename from ...
+       (tab_length): ... this, as this is an internal method.
+       (wrap): Adjust callers.
+       * lib/Automake/XFile.pm: Reorganize Pod a bit, add `Methods'
+       section.
+
 2009-10-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Perl coverage support using Devel::Cover.
+       This introduces makefile rules to run the testsuite with Perl
+       coverage enabled.  It skips tests that use perl ithreads, by
+       unsetting AUTOMAKE_JOBS and setting WANT_NO_THREADS to make the
+       threaded tests skip.
+       * Makefile.am (PERL_COVERAGE_DB, PERL_COVERAGE_FLAGS)
+       (PERL_COVER): New variables.
+       (check-coverage, recheck-coverage, clean-coverage): New phony
+       targets.
+       (check-coverage-run, recheck-coverage-run): New phony helper
+       targets.
+       (clean-local): New, depend on clean-coverage.
+       * lib/Automake/tests/Condition-t.pl: Skip if WANT_NO_THREADS is
+       set.
+       * lib/Automake/tests/DisjConditions-t.pl: Likewise.
+       * tests/defs.in: New required entry 'perl-threads'.
+       * tests/parallel-am.test: Use it to skip if WANT_NO_THREADS is
+       set.
+       * tests/parallel-am2.test: Likewise.
+       * tests/parallel-am3.test: Likewise.
+
+       Add convenience `recheck' target to our toplevel Makefile.am.
+       * Makefile.am (recheck): New convenience target.
+       * tests/README: Give examples for running only failed or
+       outdated or otherwise selected tests.
+
+       dist: allow running several compressors in parallel.
+       * lib/am/distdir.am (am__post_remove_distdir): New internal
+       variable.
+       (DIST_TARGETS): New variable, set to list of chosen distribution
+       formats.  Order formats by expected duration, slowest first, for
+       better parallelism.
+       (dist-gzip, dist-bzip2, dist-lzma, dist-xz, dist-tarZ)
+       (dist-shar, dist-zip): Use $(am__post_remove_distdir).
+       (dist, dist-all): Do not depend on distdir.  Instead of
+       replicating each compression command, use a recursive invocation
+       to allow running all $(DIST_TARGETS) in parallel.
+       * NEWS: Update.
+       Report by Peter Breitenlohner.
+
+       Fix license headers of cscope tests to be GPLv2+.
+       * tests/cscope.test: Revert to GPL version 2.
+       * tests/cscope2.test: Likewise.
+       * tests/cscope3.test: Likewise.
+
        Sync auxiliary files from upstream.
        * INSTALL, lib/INSTALL, lib/config.guess, lib/config.sub,
        lib/texinfo.tex: Sync from upstream.
        `--no-function-argzero', since the latter does not work with
        versions 3.x of Zsh.
 
+2009-09-26  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Fixups and tests for cscope functionality.
+       It seems cscope is not able to take into account relative
+       file names of included cscope.files files, but it is able to
+       canonicalize file names containing '../' sequences.
+       This patch makes the cscope references relative again, and
+       fixes some corner cases.
+       * NEWS: Reword a bit.
+       * THANKS: Update.
+       * automake.in (handle_tags): Use $(am__cd).  Provide default
+       empty rule for the `cscope' target, for empty sources.
+       * lib/am/tags.am (cscopelist): Construct relative path to files
+       in $(srcdir) if $(srcdir) is relative.
+       [TOPDIR_P] (cscope): Do not depend on cscope-clean.  Only invoke
+       $(CSCOPE) if cscope.files is nonemtpy.
+       (clean-cscope): Rename from ...
+       (cscopeclean): ... this.
+       (cscope.files): Depend on clean-cscope.
+       (distclean-tags) [!TOPDIR_P]: No need to remove cscope files
+       here.
+       * tests/cscope.test, tests/cscope2.test, tests/cscope3.test: New
+       tests.
+       * tests/Makefile.am: Adjust.
+
+2009-09-25  Debarshi Ray  <rishi@gnu.org>
+
+       New target to generate cscope database.
+       * automake.in (handle_tags): Handle cscope.
+       * doc/automake.texi (Tags): Document cscope.
+       * lib/am/tags.am (CSCOPE): New macro.
+       [TOPDIR_P] (AM_RECURSIVE_TARGETS): Add cscope.
+       (cscope): New target.
+       (cscopeclean): Likewise.
+       (cscope.files): Likewise.
+       (cscopelist): Likewise.
+       (distclean-tags): Remove `cscope.out', `cscope.in.out',
+       `cscope.po.out' and `cscope.files'.
+       * NEWS: Update.
+       Based upon earlier patch from Jesse Barnes.
+
+2009-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
+       Use silent-rules for building the Automake package.
+       * configure.ac (AM_INIT_AUTOMAKE): Add silent-rules option.
+       * Makefile.am (automake, aclocal, INSTALL): Add silencing
+       variables to recipe.
+       * doc/Makefile.am (update_mans, $(srcdir)/aclocal.1)
+       ($(srcdir)/automake.1, $(srcdir)/amhello-1.0.tar.gz): Likewise.
+       * lib/Automake/Makefile.am (Config.pm): Likewise.
+       * tests/Makefile.am ($(srcdir)/parallel-tests.am)
+       ($(parallel_tests), defs-p): Likewise.
+
+2009-09-25  Jack Kelly  <endgame.dos@gmail.com>
+
+       Add silent rules support for texinfo outputs.
+       * automake.in (define_verbose_texinfo): Define several new verbose
+       tagvars and verbose vars.
+       (define_verbose_tagvar): Increase spacing to 8 to accommodate
+       MAKEINFO, TEXI2DVI, TEXI2PDF.
+       (handle_texinfo): Additional substitution for silencing dvips.
+       (output_texinfo_build_rules): Additional substitutions for
+       silencing texi2dvi and texi2pdf.
+       * lib/am/texibuild.am: Add silencing to makeinfo, makeinfo --html,
+       texi2dvi and texi2pdf rules.
+       * lib/am/texinfos.am: Add silencing to .dvi.ps rule.
+       * tests/Makefile.am: Add silent8.test.
+       * tests/silent8.test: New test: tests that silent texinfo rules
+       produce quiet messages.
+       * NEWS: Update.
+
 2009-09-18  Peter Johansson  <trojkan@gmail.com>  (tiny change)
 
        Fix link to "Recursive Make Considered Harmful" paper.
 
 2009-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
 
+       Post-release version bump.
+       * configure.ac, NEWS: Bump version to 1.11a.
+
+2009-05-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
+
        Automake 1.11.
        * configure.ac: Bump version to 1.11.
        * doc/automake.texi (Releases): Add line for 1.11.  Remove line
diff --git a/HACKING b/HACKING
index f25a0e0..34f2b39 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -7,7 +7,6 @@
 * Don't put this file into the distribution.  Don't mention it in the
   ChangeLog.
 
-
 ================================================================
 = Administrivia
 
@@ -33,8 +32,8 @@
       texinfo.tex (bug-texinfo@gnu.org),
   Most of them are updated before release with `make fetch'.
 
-* Changes other than bug fixes must be mentioned in NEWS
-
+* Changes other than bug fixes must be mentioned in NEWS.  Important
+  bug fixes should be mentioned in NES, too.
 
 ================================================================
 = Naming
@@ -60,7 +59,7 @@
 * Use `##' comments liberally.  Comment anything even remotely
   unusual.
 
-* Never use basename or dirname.  Instead use sed
+* Never use basename or dirname.  Instead use sed.
 
 * Do not use `cd' within back-quotes, use `$(am__cd)' instead.
   Otherwise the directory name may be printed, depending on CDPATH.
@@ -73,7 +72,6 @@
   "important" command it runs.  The printed commands should be preceded
   by a single space.
 
-
 ================================================================
 = Editing automake.in and aclocal.in
 
@@ -90,7 +88,6 @@
 
 * Perl 5 is now OK.
 
-
 ================================================================
 = Working with git
 
   tree, so the resulting files (aclocal.m4 and Makefile.in) should
   be the same as you would get if you install this version of
   automake and use it to generate those files.  Be sure to have the
-  latest stable version of Autoconf installed.
+  latest stable version of Autoconf installed.  If such version is
+  not installed as "autoconf", pass it explicitly (along with the
+  accompanying "autom4te") when calling `bootstrap' and `configure'.
+  For example:
+    $ AUTOCONF=autoconf2.65 AUTOM4TE=autom4te2.65 ./bootstrap
+    $ ./configure AUTOCONF=autoconf2.65 AUTOM4TE=autom4te2.65
 
 * Dependent files aclocal.m4, configure and Makefile.in in all
   directories should be up to date in the git repository, so that
 ================================================================
 = Test suite
 
-* Use "make check" and "make maintainer-check" liberally
+* Use "make check" and "make maintainer-check" liberally.
 
-* Make sure each test file is executable
+* Make sure each test file is executable.
 
 * Use `keep_testdirs=yes' to keep test directories for successful
   tests also.
 
+* Use perl coverage information to ensure your new code is thoroughly
+  tested by your new tests.
+
+* See file `tests/README' for more information.
+
 ================================================================
 = Release procedure
 
index 3aead75..3dd2a18 100644 (file)
@@ -86,17 +86,34 @@ do_subst = sed \
 automake: automake.in
 aclocal: aclocal.in
 automake aclocal: Makefile
-       rm -f $@ $@.tmp
-       $(do_subst) $(srcdir)/$@.in >$@.tmp
-       chmod +x $@.tmp
-       chmod a-w $@.tmp
-       mv -f $@.tmp $@
+       $(AM_V_GEN)rm -f $@ $@.tmp
+       $(AM_V_at)$(do_subst) $(srcdir)/$@.in >$@.tmp
+       $(AM_V_at)chmod +x $@.tmp
+       $(AM_V_at)chmod a-w $@.tmp
+       $(AM_V_at)mv -f $@.tmp $@
 
 ## The master location for INSTALL is lib/INSTALL.
 ## This is where `make fetch' will install new versions.
 ## Make sure we also update this copy.
 INSTALL: lib/INSTALL
-       cp $(srcdir)/lib/INSTALL $@
+       $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+
+## recheck: convenience proxy target for the test suites.
+TEST_SUBDIRS = lib/Automake/tests tests
+
+.PHONY: recheck
+recheck:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       for subdir in $(TEST_SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+       done; \
+       test -z "$$fail"
 
 ################################################################
 ##
@@ -108,6 +125,41 @@ INSTALL: lib/INSTALL
 dist-hook:
        cd $(distdir)/tests && chmod a+rx *.test
 
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
+
+check-coverage-run recheck-coverage-run: all
+       $(mkinstalldirs) $(PERL_COVERAGE_DB)
+       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+         echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+         echo "Please run \`make check-coverage' first" >&2; \
+         exit 1; \
+       fi
+       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+       rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+       recheck-coverage-run check-coverage-report clean-coverage
+
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
 syntax_check_rules = \
@@ -140,6 +192,7 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_logs_duplicate_prefixes \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -409,6 +462,24 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+## Rule to ensure that the testsuite has been run before.  We don't depend on `check'
+## here, because that would be very wasteful in the common case.  We could run
+## `make check RECHECK_LOGS=' and avoid toplevel races with AM_RECURSIVE_TARGETS.
+sc_ensure_testsuite_has_run:
+       @if test ! -f tests/test-suite.log; then \
+         echo "Run \`make check' before \`maintainer-check'" >&2; \
+         exit 1; \
+       fi
+.PHONY: sc_ensure_testsuite_has_run
+
+## Ensure our warning and error messages do not contain duplicate 'warning:' prefixes.
+## This test actually depends on the testsuite having been run before.
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+       @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+         echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
@@ -527,7 +598,7 @@ fetch:
                  >>Fetchdir/update.patch 2>/dev/null; then :; \
          else \
            stat=1; \
-           echo "Updating $(srcdir)/lib/$$file..."; \
+           echo "Updating $(srcdir)/lib/$$file ..."; \
            cp Fetchdir/$$file $(srcdir)/lib/$$file; \
          fi; \
        done; \
index 528b80e..3a89eba 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,9 +59,9 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \
@@ -92,6 +92,12 @@ am__base_list = \
   sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
 am__installdirs = "$(DESTDIR)$(bindir)"
 SCRIPTS = $(bin_SCRIPTS)
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -105,9 +111,10 @@ 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
+       cscope distdir dist dist-all distcheck
 ETAGS = etags
 CTAGS = ctags
+CSCOPE = cscope
 DIST_SUBDIRS = $(SUBDIRS)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 distdir = $(PACKAGE)-$(VERSION)
@@ -116,6 +123,7 @@ am__remove_distdir = \
   { test ! -d "$(distdir)" \
     || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
          && rm -fr "$(distdir)"; }; }
+am__post_remove_distdir = $(am__remove_distdir)
 am__relativize = \
   dir0=`pwd`; \
   sed_first='s,^\([^/]*\)/.*$$,\1,'; \
@@ -143,10 +151,12 @@ am__relativize = \
   reldir="$$dir2"
 DIST_ARCHIVES = $(distdir).tar.gz $(distdir).tar.bz2
 GZIP_ENV = --best
+DIST_TARGETS = dist-bzip2 dist-gzip
 distuninstallcheck_listfiles = find . -type f -print
 distcleancheck_listfiles = find . -type f -print
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -265,6 +275,12 @@ do_subst = sed \
   -e 's,[@]configure_input[@],Generated from $@.in; do not edit by hand.,g' \
   -e 's,[@]datadir[@],$(datadir),g'
 
+TEST_SUBDIRS = lib/Automake/tests tests
+
+# Perl coverage statistics.
+PERL_COVERAGE_DB = $(abs_top_builddir)/cover_db
+PERL_COVERAGE_FLAGS = -MDevel::Cover=-db,$(PERL_COVERAGE_DB),-silent,on,-summary,off
+PERL_COVER = cover
 
 # Some simple checks, and then ordinary check.  These are only really
 # guaranteed to work on my machine.
@@ -298,6 +314,7 @@ sc_tests_required_after_defs \
 sc_tests_overriding_macros_on_cmdline \
 sc_tests_plain_sleep \
 sc_tests_plain_egrep_fgrep \
+sc_tests_logs_duplicate_prefixes \
 sc_mkdir_p \
 sc_perl_at_substs \
 sc_unquoted_DESTDIR \
@@ -459,6 +476,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -522,8 +543,32 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+       -rm -f cscope.files
+
+cscope.files: clean-cscope cscopelist-recursive cscopelist
+
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
 
 distdir: $(DISTFILES)
        $(am__remove_distdir)
@@ -602,36 +647,39 @@ distdir: $(DISTFILES)
        else :; fi
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
+
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+       $(am__post_remove_distdir)
 
 dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-shar: distdir
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
-dist dist-all: distdir
-       tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+dist dist-all:
+       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+       $(am__post_remove_distdir)
 
 # This target untars the dist file and tries a VPATH configuration.  Then
 # it guarantees that the distribution is self-contained by making another
@@ -644,6 +692,8 @@ distcheck: dist
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
@@ -686,7 +736,7 @@ distcheck: dist
          && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \
          && cd "$$am__cwd" \
          || exit 1
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
@@ -744,7 +794,7 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-recursive
 
-clean-am: clean-generic mostlyclean-am
+clean-am: clean-generic clean-local mostlyclean-am
 
 distclean: distclean-recursive
        -rm -f $(am__CONFIG_DISTCLEAN_FILES)
@@ -813,26 +863,27 @@ ps-am:
 uninstall-am: uninstall-binSCRIPTS
        @$(NORMAL_INSTALL)
        $(MAKE) $(AM_MAKEFLAGS) uninstall-hook
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-exec-am install-strip tags-recursive \
-       uninstall-am
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive 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-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
+       all all-am am--refresh check check-am clean clean-cscope \
+       clean-generic clean-local cscope cscopelist \
+       cscopelist-recursive ctags ctags-recursive dist dist-all \
+       dist-bzip2 dist-gzip dist-hook dist-lzip 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:
@@ -855,14 +906,28 @@ uninstall-hook:
 automake: automake.in
 aclocal: aclocal.in
 automake aclocal: Makefile
-       rm -f $@ $@.tmp
-       $(do_subst) $(srcdir)/$@.in >$@.tmp
-       chmod +x $@.tmp
-       chmod a-w $@.tmp
-       mv -f $@.tmp $@
+       $(AM_V_GEN)rm -f $@ $@.tmp
+       $(AM_V_at)$(do_subst) $(srcdir)/$@.in >$@.tmp
+       $(AM_V_at)chmod +x $@.tmp
+       $(AM_V_at)chmod a-w $@.tmp
+       $(AM_V_at)mv -f $@.tmp $@
 
 INSTALL: lib/INSTALL
-       cp $(srcdir)/lib/INSTALL $@
+       $(AM_V_GEN)cp $(srcdir)/lib/INSTALL $@
+
+.PHONY: recheck
+recheck:
+       @failcom='exit 1'; \
+       for f in x $$MAKEFLAGS; do \
+         case $$f in \
+           *=* | --[!k]*);; \
+           *k*) failcom='fail=yes';; \
+         esac; \
+       done; \
+       for subdir in $(TEST_SUBDIRS); do \
+         (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) || eval $$failcom; \
+       done; \
+       test -z "$$fail"
 
 ################################################################
 
@@ -870,6 +935,35 @@ INSTALL: lib/INSTALL
 dist-hook:
        cd $(distdir)/tests && chmod a+rx *.test
 
+check-coverage-run recheck-coverage-run: all
+       $(mkinstalldirs) $(PERL_COVERAGE_DB)
+       PERL5OPT="$$PERL5OPT $(PERL_COVERAGE_FLAGS)"; export PERL5OPT; \
+       WANT_NO_THREADS=yes; export WANT_NO_THREADS; unset AUTOMAKE_JOBS; \
+       $(MAKE) $(AM_MAKEFLAGS) `echo $@ | sed 's/-coverage-run//'`
+
+check-coverage-report:
+       @if test ! -d "$(PERL_COVERAGE_DB)"; then \
+         echo "No coverage database found in \`$(PERL_COVERAGE_DB)'." >&2; \
+         echo "Please run \`make check-coverage' first" >&2; \
+         exit 1; \
+       fi
+       $(PERL_COVER) $(PERL_COVER_FLAGS) "$(PERL_COVERAGE_DB)"
+
+# We don't use direct dependencies here because we'd like to be able
+# to invoke the report even after interrupted check-coverage.
+check-coverage: check-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+recheck-coverage: recheck-coverage-run
+       $(MAKE) $(AM_MAKEFLAGS) check-coverage-report
+
+clean-coverage:
+       rm -rf "$(PERL_COVERAGE_DB)"
+clean-local: clean-coverage
+
+.PHONY: check-coverage recheck-coverage check-coverage-run \
+       recheck-coverage-run check-coverage-report clean-coverage
+
 .PHONY: $(syntax_check_rules)
 $(syntax_check_rules): automake aclocal
 maintainer-check: $(syntax_check_rules)
@@ -1090,6 +1184,19 @@ sc_tests_plain_egrep_fgrep:
          exit 1; \
        fi
 
+sc_ensure_testsuite_has_run:
+       @if test ! -f tests/test-suite.log; then \
+         echo "Run \`make check' before \`maintainer-check'" >&2; \
+         exit 1; \
+       fi
+.PHONY: sc_ensure_testsuite_has_run
+
+sc_tests_logs_duplicate_prefixes: sc_ensure_testsuite_has_run
+       @if grep -E '(warning|error):.*(warning|error):' tests/*.log; then \
+         echo 'Duplicate warning/error message prefixes seen in above tests.' >&2; \
+         exit 1; \
+       fi
+
 sc_mkdir_p:
        @if grep 'mkdir_p' $(srcdir)/automake.in \
              $(srcdir)/lib/am/*.am $(srcdir)/tests/*.test; then \
@@ -1175,7 +1282,7 @@ fetch:
                  >>Fetchdir/update.patch 2>/dev/null; then :; \
          else \
            stat=1; \
-           echo "Updating $(srcdir)/lib/$$file..."; \
+           echo "Updating $(srcdir)/lib/$$file ..."; \
            cp Fetchdir/$$file $(srcdir)/lib/$$file; \
          fi; \
        done; \
diff --git a/NEWS b/NEWS
index 6971bd7..c0f3ebd 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,14 +1,31 @@
-New in 1.11.0a:
+New in 1.11a:
+
+* Changes to automake:
+
+  - automake now generates silenced rules for texinfo outputs.
+
+* New targets:
+
+  - New `cscope' target to build a cscope database for the source tree.
 
 * Miscellaneous changes:
 
+  - The `dist' and `dist-all' targets now can run compressors in parallel.
+
   - The `lzma' compression scheme and associated automake option `dist-lzma'
     is obsoleted by `xz' and `dist-xz' due to upstream changes.
 
+  - "make dist" can now create lzip-compressed tarballs.
+
+  - Messages of types warning or error from `automake' and `aclocal' are now
+    prefixed with the respective type, and presence of -Werror is noted.
+
   - The `compile' script now converts some options for MSVC for a better
     user experience.  Similarly, the new `ar-lib' script wraps Microsoft lib.
 
-Bugs fixed in 1.11.0a:
+Bugs fixed in 1.11a:
+
+  - Lots of minor bugfixes.
 
 * Bugs introduced by 1.11:
 
@@ -39,6 +56,11 @@ Bugs fixed in 1.11.0a:
   - AM_PROG_GCJ uses AC_CHECK_TOOLS to look for `gcj' now, so that prefixed
     tools are preferred in a cross-compile setup.
 
+  - The distribution is tarred up with mode 755 now by the `dist*' targets.
+    This fixes a race condition where untrusted users could modify files
+    in the $(PACKAGE)-$(VERSION) distdir before packing if the toplevel
+    build directory was world-searchable.  This is CVE-2009-4029.
+
   - Several scripts as well as the parallel-tests testsuite driver now
     exit with the right exit status upon receiving a signal.
 
diff --git a/THANKS b/THANKS
index b3ceae6..810a700 100644 (file)
--- a/THANKS
+++ b/THANKS
@@ -67,6 +67,7 @@ danbp                 danpb@nospam.postmaster.co.uk
 Daniel Jacobowitz      drow@false.org
 Daniel Kahn Gillmor    dkg@fifthhorseman.net
 Daniel Richard G.      danielg@teragram.com
+Debarshi Ray           rishi@gnu.org
 Dave Brolley           brolley@redhat.com
 Dave Korn              dave.korn.cygwin@googlemail.com
 Dave Morrison          dave@bnl.gov
@@ -271,6 +272,7 @@ Per Oyvind Hvidsten poeh@enter.vg
 Peter Breitenlohner    peb@mppmu.mpg.de
 Peter Eisentraut       peter_e@gmx.net
 Peter Gavin            pgavin@debaser.kicks-ass.org
+Peter Johansson                trojkan@gmail.com
 Peter Mattis           petm@scam.XCF.Berkeley.EDU
 Peter Muir             iyhi@yahoo.com
 Peter O'Gorman         peter@pogma.com
index b5c2c41..4c81a47 100644 (file)
@@ -183,8 +183,7 @@ sub check_acinclude ()
   foreach my $key (keys %map)
     {
       # FIXME: should print line number of acinclude.m4.
-      msg ('syntax', "warning: macro `$key' defined in "
-          . "acinclude.m4 but never used")
+      msg ('syntax', "macro `$key' defined in acinclude.m4 but never used")
        if $map{$key} eq 'acinclude.m4' && ! exists $macro_seen{$key};
     }
 }
@@ -435,7 +434,7 @@ sub scan_configure_dep ($)
          # Make this just a warning, because we do not know whether
          # the macro is actually used (it could be called conditionally).
          msg ('unsupported', "$file:$line",
-              "warning: macro `$2' not found in library");
+              "macro `$2' not found in library");
        }
     }
 
@@ -507,7 +506,7 @@ sub scan_file ($$$)
          if ($number !~ /$serial_number_rx/go)
            {
              msg ('syntax', "$file:$.",
-                  "warning: ill-formed serial number `$number', "
+                  "ill-formed serial number `$number', "
                   . "expecting a version string with only digits and dots");
            }
          elsif ($defun_seen)
@@ -559,8 +558,8 @@ sub scan_file ($$$)
          $defun_seen = 1;
          if (! defined $1)
            {
-             msg ('syntax', "$file:$.", "warning: underquoted definition of $2"
-                  . "\n  run info '(automake)Extending aclocal'\n"
+             msg ('syntax', "$file:$.", "underquoted definition of $2"
+                  . "\n  run info Automake 'Extending aclocal'\n"
                   . "  or see http://sources.redhat.com/automake/"
                   . "automake.html#Extending-aclocal")
                unless $underquoted_manual_once;
@@ -870,14 +869,14 @@ sub usage ($)
 {
   my ($status) = @_;
 
-  print "Usage: aclocal [OPTIONS] ...
+  print "Usage: aclocal [OPTION]...
 
 Generate `aclocal.m4' by scanning `configure.ac' or `configure.in'
 
 Options:
       --acdir=DIR           directory holding config files (for debugging)
       --diff[=COMMAND]      run COMMAND [diff -u] on M4 files that would be
-                              changed (implies --install and --dry-run)
+                            changed (implies --install and --dry-run)
       --dry-run             pretend to, but do not actually update any file
       --force               always update output file
       --help                print this help, then exit
@@ -985,13 +984,13 @@ sub parse_arguments ()
        }
       if (exists $argopts{$ARGV[0]})
        {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
+         fatal ("option `$ARGV[0]' requires an argument.\n"
+                . "Try `$0 --help' for more information");
        }
       else
        {
          fatal ("unrecognized option `$ARGV[0]'\n"
-                . "Try `$0 --help' for more information.");
+                . "Try `$0 --help' for more information");
        }
     }
 
@@ -1012,7 +1011,7 @@ sub parse_arguments ()
   if ($install && !@user_includes)
     {
       fatal ("--install should copy macros in the directory indicated by the"
-            . "\nfirst -I option, but no -I was supplied.");
+            . "\nfirst -I option, but no -I was supplied");
     }
 
   if (! -d $system_includes[0])
@@ -1063,7 +1062,7 @@ my $loop = 0;
 while (1)
   {
     ++$loop;
-    prog_error "Too many loops." if $loop > 2;
+    prog_error "too many loops" if $loop > 2;
 
     reset_maps;
     scan_m4_files;
index d7cbc11..6cbae15 100644 (file)
@@ -1,4 +1,4 @@
-# generated automatically by aclocal 1.11 -*- Autoconf -*-
+# generated automatically by aclocal 1.11a -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
 # 2005, 2006, 2007, 2008, 2009, 2010  Free Software Foundation, Inc.
@@ -13,8 +13,8 @@
 
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
-m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.65],,
-[m4_warning([this file was generated for autoconf 2.65.
+m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.67],,
+[m4_warning([this file was generated for autoconf 2.67.
 You have another version of autoconf.  It may work, but is not guaranteed to.
 If you have problems, you may need to regenerate the build system entirely.
 To do so, use the procedure documented by the package, typically `autoreconf'.])])
@@ -29,6 +29,7 @@ m4_include([m4/mkdirp.m4])
 m4_include([m4/options.m4])
 m4_include([m4/runlog.m4])
 m4_include([m4/sanity.m4])
+m4_include([m4/silent.m4])
 m4_include([m4/strip.m4])
 m4_include([m4/substnot.m4])
 m4_include([m4/tar.m4])
old mode 100755 (executable)
new mode 100644 (file)
index 8fd6869..c0c5289
@@ -1207,11 +1207,25 @@ sub define_verbose_tagvar ($)
     my ($name) = @_;
     if (option 'silent-rules')
       {
-       define_verbose_var ($name, '@echo "  '. $name . ' ' x (6 - length ($name)) . '" $@;');
+       define_verbose_var ($name, '@echo "  '. $name . ' ' x (8 - length ($name)) . '" $@;');
        define_verbose_var ('at', '@');
       }
 }
 
+# define_verbose_texinfo
+# ----------------------
+# Engage the needed `silent-rules' machinery for assorted texinfo commands.
+sub define_verbose_texinfo ()
+{
+  my @tagvars = ('DVIPS', 'MAKEINFO', 'INFOHTML', 'TEXI2DVI', 'TEXI2PDF');
+  foreach my $tag (@tagvars)
+    {
+      define_verbose_tagvar($tag);
+    }
+  define_verbose_var('texinfo', '-q');
+  define_verbose_var('texidevnull', '> /dev/null');
+}
+
 # define_verbose_libtool
 # ----------------------
 # Engage the needed `silent-rules' machinery for `libtool --silent'.
@@ -1313,7 +1327,7 @@ sub check_user_variables (@)
                  msg_cond_var ('gnu', $cond, $flag,
                                "`$flag' is a user variable, "
                                . "you should not override it;\n"
-                               . "use `AM_$flag' instead.");
+                               . "use `AM_$flag' instead");
                }
            }
        }
@@ -1573,7 +1587,7 @@ sub handle_languages
            my $srcdir = dirname ($source);
            if ($lang->ansi && $obj =~ /\$U/)
              {
-               prog_error "`$obj' contains \$U, but `$source' doesn't."
+               prog_error "`$obj' contains \$U, but `$source' doesn't"
                  if $source !~ /\$U/;
 
                (my $source_ = $source) =~ s/\$U/_/g;
@@ -2303,9 +2317,9 @@ sub handle_lib_objects
   my ($xname, $varname) = @_;
 
   my $var = var ($varname);
-  prog_error "handle_lib_objects: `$varname' undefined"
+  prog_error "`$varname' undefined"
     unless $var;
-  prog_error "handle_lib_objects: unexpected variable name `$varname'"
+  prog_error "unexpected variable name `$varname'"
     unless $varname =~ /^(.*)(?:LIB|LD)ADD$/;
   my $prefix = $1 || 'AM_';
 
@@ -2338,7 +2352,7 @@ sub handle_lib_objects
               # FIXME: should display a stack of nested variables
               # as context when $var != $subvar.
               err_var ($var, "linker flags such as `$val' belong in "
-                       . "`${prefix}LDFLAGS");
+                       . "`${prefix}LDFLAGS'");
             }
           return ();
         }
@@ -2880,7 +2894,7 @@ sub handle_ltlibraries
 
                   my $onlyone = ($dir ne $adir) ?
                     ("\nLibtool libraries can be built for only one "
-                     . "destination.") : "";
+                     . "destination") : "";
 
                   error ($liblocations{$val}{$acond},
                          "... and should also be $adirtxt$adircond.$onlyone");
@@ -3245,6 +3259,9 @@ sub output_texinfo_build_rules ($$$@)
 
   $output_rules .= file_contents ('texibuild',
                                  new Automake::Location,
+                                  AM_V_MAKEINFO    => verbose_flag('MAKEINFO'),
+                                  AM_V_TEXI2DVI    => verbose_flag('TEXI2DVI'),
+                                  AM_V_TEXI2PDF    => verbose_flag('TEXI2PDF'),
                                  DEPS             => "@deps",
                                  DEST_PREFIX      => $dpfx,
                                  DEST_INFO_PREFIX => $dipfx,
@@ -3254,12 +3271,15 @@ sub output_texinfo_build_rules ($$$@)
                                  GENERIC_INFO     => $generic_info,
                                  INSRC            => $insrc,
                                  MAKEINFOFLAGS    => $makeinfoflags,
+                                  SILENT           => silent_flag(),
                                  SOURCE           => ($generic
                                                       ? '$<' : $source),
                                  SOURCE_INFO      => ($generic_info
                                                       ? '$<' : $source),
                                  SOURCE_REAL      => $source,
                                  SOURCE_SUFFIX    => $ssfx,
+                                  TEXIQUIET        => verbose_flag('texinfo'),
+                                  TEXIDEVNULL      => verbose_flag('texidevnull'),
                                  );
   return ($dirstamp, "$dpfx.dvi", "$dpfx.pdf", "$dpfx.ps", "$dpfx.html");
 }
@@ -3568,6 +3588,7 @@ sub handle_texinfo ()
   my ($mostlyclean, $clean, $maintclean) = ('', '', '');
   if ($info_texinfos)
     {
+      define_verbose_texinfo;
       ($mostlyclean, $clean, $maintclean) = handle_texinfo_helper ($info_texinfos);
       chomp $mostlyclean;
       chomp $clean;
@@ -3576,10 +3597,12 @@ sub handle_texinfo ()
 
   $output_rules .=  file_contents ('texinfos',
                                   new Automake::Location,
+                                   AM_V_DVIPS    => verbose_flag('DVIPS'),
                                   MOSTLYCLEAN   => $mostlyclean,
                                   TEXICLEAN     => $clean,
                                   MAINTCLEAN    => $maintclean,
-                                  'LOCAL-TEXIS' => !!$info_texinfos);
+                                  'LOCAL-TEXIS' => !!$info_texinfos,
+                                   TEXIQUIET     => verbose_flag('texinfo'));
 }
 
 
@@ -3736,6 +3759,7 @@ sub handle_tags
 {
     my @tag_deps = ();
     my @ctag_deps = ();
+    my @cscope_deps = ();
     if (var ('SUBDIRS'))
     {
        $output_rules .= ("tags-recursive:\n"
@@ -3759,6 +3783,17 @@ sub handle_tags
        push (@ctag_deps, 'ctags-recursive');
        &depend ('.PHONY', 'ctags-recursive');
        &depend ('.MAKE', 'ctags-recursive');
+
+       $output_rules .= ("cscopelist-recursive:\n"
+                         . "\tlist=\'\$(SUBDIRS)\'; for subdir in \$\$list; do \\\n"
+                         # Never fail here if a subdir fails; it
+                         # isn't important.
+                         . "\t  test \"\$\$subdir\" = . || (\$(am__cd) \$\$subdir"
+                         . " && \$(MAKE) \$(AM_MAKEFLAGS) cscopelist); \\\n"
+                         . "\tdone\n");
+       push (@cscope_deps, 'cscopelist-recursive');
+       &depend ('.PHONY', 'cscopelist-recursive');
+       &depend ('.MAKE', 'cscopelist-recursive');
     }
 
     if (&saw_sources_p (1)
@@ -3781,13 +3816,14 @@ sub handle_tags
                                         new Automake::Location,
                                         CONFIG    => "@config",
                                         TAGSDIRS  => "@tag_deps",
-                                        CTAGSDIRS => "@ctag_deps");
+                                        CTAGSDIRS => "@ctag_deps",
+                                        CSCOPEDIRS => "@cscope_deps");
 
        set_seen 'TAGS_DEPENDENCIES';
     }
     elsif (reject_var ('TAGS_DEPENDENCIES',
-                      "doesn't make sense to define `TAGS_DEPENDENCIES'"
-                      . "without\nsources or `ETAGS_ARGS'"))
+                      "it doesn't make sense to define `TAGS_DEPENDENCIES'"
+                      . " without\nsources or `ETAGS_ARGS'"))
     {
     }
     else
@@ -3796,8 +3832,9 @@ sub handle_tags
        # Otherwise, it would be possible for a top-level "make TAGS"
        # to fail because some subdirectory failed.
        $output_rules .= "tags: TAGS\nTAGS:\n\n";
-       # Ditto ctags.
+       # Ditto ctags and cscope.
        $output_rules .= "ctags: CTAGS\nCTAGS:\n\n";
+       $output_rules .= "cscope cscopelist:\n\n";
     }
 }
 
@@ -3907,9 +3944,9 @@ sub handle_dist ()
     {
       my $archive_defined = option 'no-dist-gzip' ? 0 : 1;
       $archive_defined ||=
-       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzma xz);
+       grep { option "dist-$_" } qw(shar zip tarZ bzip2 lzip lzma xz);
       error (option 'no-dist-gzip',
-            "no-dist-gzip specified but no dist-* specified, "
+            "no-dist-gzip specified but no dist-* specified,\n"
             . "at least one archive format must be enabled")
        unless $archive_defined;
     }
@@ -4096,7 +4133,7 @@ sub scan_aclocal_m4 ()
       push (@ac_deps, '$(ACLOCAL_M4_SOURCES)');
       msg_var ('obsolete', 'ACLOCAL_M4_SOURCES',
               "`ACLOCAL_M4_SOURCES' is obsolete.\n"
-              . "It should be safe to simply remove it.");
+              . "It should be safe to simply remove it");
     }
 
   # Note that it might be possible that aclocal.m4 doesn't exist but
@@ -5188,8 +5225,8 @@ sub scan_autoconf_config_files ($$)
       my ($local, @rest) = split (/:/);
       @rest = ("$local.in",) unless @rest;
       msg ('portability', $where,
-         "Omit leading `./' from config file names such as `$local',"
-         . "\nas not all make implementations treat `file' and `./file' equally.")
+         "omit leading `./' from config file names such as `$local',"
+         . "\nas not all make implementations treat `file' and `./file' equally")
        if ($local =~ /^\.\//);
       my $input = locate_am @rest;
       if ($input)
@@ -5313,7 +5350,7 @@ sub scan_autoconf_traces ($)
          if ($seen_init_automake)
            {
              error ($where, "AC_CONFIG_AUX_DIR must be called before "
-                    . "AM_INIT_AUTOMAKE...", partial => 1);
+                    . "AM_INIT_AUTOMAKE ...", partial => 1);
              error ($seen_init_automake, "... AM_INIT_AUTOMAKE called here");
            }
          $config_aux_dir = $args[1];
@@ -5549,7 +5586,7 @@ sub scan_autoconf_files ()
              . "should verify that $configure_ac invokes AM_INIT_AUTOMAKE,"
              . "\nthat aclocal.m4 is present in the top-level directory,\n"
              . "and that aclocal.m4 was recently regenerated "
-             . "(using aclocal).");
+             . "(using aclocal)");
     }
   else
     {
@@ -5560,7 +5597,7 @@ sub scan_autoconf_files ()
              error ($seen_init_automake,
                     "your implementation of AM_INIT_AUTOMAKE comes from " .
                     "an\nold Automake version.  You should recreate " .
-                    "aclocal.m4\nwith aclocal and run automake again.\n",
+                    "aclocal.m4\nwith aclocal and run automake again",
                     # $? = 63 is used to indicate version mismatch to missing.
                     exit_code => 63);
            }
@@ -5568,9 +5605,9 @@ sub scan_autoconf_files ()
            {
              error ($seen_init_automake,
                     "no proper implementation of AM_INIT_AUTOMAKE was " .
-                    "found,\nprobably because aclocal.m4 is missing...\n" .
+                    "found,\nprobably because aclocal.m4 is missing.\n" .
                     "You should run aclocal to create this file, then\n" .
-                    "run automake again.\n");
+                    "run automake again");
            }
        }
     }
@@ -6365,7 +6402,7 @@ sub cond_stack_if ($$$)
          my $mac = $_am_macro_for_cond{$cond};
          $text .= "\n  The usual way to define `$cond' is to add ";
          $text .= ($mac =~ / /) ? $mac : "`$mac'";
-         $text .= "\n  to `$configure_ac' and run `aclocal' and `autoconf' again.";
+         $text .= "\n  to `$configure_ac' and run `aclocal' and `autoconf' again";
          # These warnings appear in Automake files (depend2.am),
          # so there is no need to display them more than once:
          $scope = US_GLOBAL;
@@ -7061,6 +7098,7 @@ sub make_paragraphs ($%)
 
                 'XZ'          => !! option 'dist-xz',
                 'LZMA'        => !! option 'dist-lzma',
+                'LZIP'        => !! option 'dist-lzip',
                 'BZIP2'       => !! option 'dist-bzip2',
                 'COMPRESS'    => !! option 'dist-tarZ',
                 'GZIP'        =>  ! option 'no-dist-gzip',
@@ -7842,7 +7880,7 @@ sub require_file_internal ($$$@)
                          $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.";
+                                   . " about which license your project uses";
                        }
 
                      # Windows Perl will hang if we try to delete a
@@ -7876,8 +7914,9 @@ sub require_file_internal ($$$@)
                          # the top level Makefile.  Furthermore Automake
                          # hasn't been asked to create the Makefile.in
                          # that distributes the aux dir files.
-                         error ($where, 'Please make a full run of automake'
-                                . " so $fullfile gets distributed.");
+                         error ($where, 'please rerun automake without '
+                                . "Makefile arguments\n"
+                                . "so $fullfile gets distributed");
                        }
                    }
                }
@@ -8284,7 +8323,7 @@ sub generate_makefile ($$)
   if (-e $out_file)
     {
       unlink ($out_file)
-       or fatal "cannot remove $out_file: $!\n";
+       or fatal "cannot remove $out_file: $!";
     }
 
   my $gm_file = new Automake::XFile "> $out_file";
@@ -8302,7 +8341,7 @@ sub generate_makefile ($$)
 # Print usage information.
 sub usage ()
 {
-    print "Usage: $0 [OPTION] ... [Makefile]...
+    print "Usage: $0 [OPTION]... [Makefile]...
 
 Generate Makefile.in for configure from Makefile.am.
 
@@ -8468,7 +8507,7 @@ sub parse_arguments ()
 
   if (defined $output_directory)
     {
-      msg 'obsolete', "`--output-dir' is deprecated\n";
+      msg 'obsolete', "`--output-dir' is deprecated";
     }
   else
     {
@@ -8495,20 +8534,20 @@ sub parse_arguments ()
        }
       elsif (exists $argopts{$ARGV[0]})
        {
-         fatal ("option `$ARGV[0]' requires an argument\n"
-                . "Try `$0 --help' for more information.");
+         fatal ("option `$ARGV[0]' requires an argument.\n"
+                . "Try `$0 --help' for more information");
        }
       else
        {
          fatal ("unrecognized option `$ARGV[0]'.\n"
-                . "Try `$0 --help' for more information.");
+                . "Try `$0 --help' for more information");
        }
     }
 
   my $errspec = 0;
   foreach my $arg (@ARGV)
     {
-      fatal ("empty argument\nTry `$0 --help' for more information.")
+      fatal ("empty argument\nTry `$0 --help' for more information")
        if ($arg eq '');
 
       # Handle $local:$input syntax.
index 7766bd3..9f1a8d8 100755 (executable)
--- a/bootstrap
+++ b/bootstrap
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Find the path separator.
-# (Snippet copied from configure's initialization in Autoconf 2.65)
-if test "${PATH_SEPARATOR+set}" != set; then
-  PATH_SEPARATOR=:
-  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
-    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
-      PATH_SEPARATOR=';'
-  }
-fi
-
 # Don't ignore failures.
 set -e
 
 # Set program basename.
 me=`echo "$0" | sed 's,^.*/,,'`
 
-# Find perl.  Code based on Autoconf, but without non-POSIX support.
-if test -z "$PERL"; then
-  save_IFS=$IFS
-  IFS=$PATH_SEPARATOR
-  for dir in $PATH; do
-    IFS=$save_IFS
-    test -z "$dir" && dir=.
-    if test -x "$dir/perl" && test ! -d "$dir/perl"; then
-      PERL="$dir/perl"
-      break
-    fi
-  done
-fi
-
-if test -z "$PERL"; then
-  echo "$me: cannot find perl" >&2
-  exit 1
-fi
+# Let user choose which version of autoconf, autom4te and perl to use.
+: ${AUTOCONF=autoconf}
+export AUTOCONF  # might be used by aclocal and/or automake
+: ${AUTOM4TE=autom4te}
+export AUTOM4TE  # ditto
+: ${PERL=perl}
 
 # Variables to substitute.
 VERSION=`sed -ne '/AC_INIT/s/^[^[]*\[[^[]*\[\([^]]*\)\].*$/\1/p' configure.ac`
@@ -71,7 +49,7 @@ fi
 
 # Read the rule for calculating APIVERSION and execute it.
 apiver_cmd=`sed -ne 's/\[\[/[/g;s/\]\]/]/g;/^APIVERSION=/p' configure.ac`
-eval $apiver_cmd
+eval "$apiver_cmd"
 
 # Sanity checks.
 if test -z "$VERSION"; then
@@ -80,7 +58,7 @@ if test -z "$VERSION"; then
 fi
 
 if test -z "$APIVERSION"; then
-  echo "$me: cannot find VERSION" >&2
+  echo "$me: cannot find APIVERSION" >&2
   exit 1
 fi
 
@@ -112,7 +90,6 @@ dosubst ()
   chmod a-w $2
 }
 
-
 # Create temporary replacement for lib/Automake/Config.pm.
 dosubst automake-$APIVERSION/Automake/Config.in \
         automake-$APIVERSION/Automake/Config.pm
@@ -133,10 +110,9 @@ cd ..
 
 # Run the autotools.
 $PERL ./aclocal.tmp -I m4
-autoconf
+$AUTOCONF
 $PERL ./automake.tmp
 
 # Remove temporary files and directories.
 rm -rf aclocal-$APIVERSION automake-$APIVERSION
 rm -f aclocal.tmp automake.tmp
-rm -f lib/Automake/Config.pm
index cdfa840..b7f3e9b 100755 (executable)
--- a/configure
+++ b/configure
@@ -1,13 +1,13 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.65 for GNU Automake 1.11.
+# Generated by GNU Autoconf 2.67 for GNU Automake 1.11a.
 #
 # Report bugs to <bug-automake@gnu.org>.
 #
 #
 # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
-# Inc.
+# 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 Free Software
+# Foundation, Inc.
 #
 #
 # This configure script is free software; the Free Software Foundation
@@ -319,7 +319,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -359,19 +359,19 @@ else
 fi # as_fn_arith
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -533,7 +533,7 @@ test -n "$DJDIR" || exec 7<&0 </dev/null
 exec 6>&1
 
 # Name of the host.
-# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
 # so uname gets run too.
 ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
 
@@ -552,8 +552,8 @@ MAKEFLAGS=
 # Identity of this package.
 PACKAGE_NAME='GNU Automake'
 PACKAGE_TARNAME='automake'
-PACKAGE_VERSION='1.11'
-PACKAGE_STRING='GNU Automake 1.11'
+PACKAGE_VERSION='1.11a'
+PACKAGE_STRING='GNU Automake 1.11a'
 PACKAGE_BUGREPORT='bug-automake@gnu.org'
 PACKAGE_URL='http://www.gnu.org/software/automake/'
 
@@ -572,6 +572,8 @@ PERL_THREADS
 PERL
 pkgvdatadir
 APIVERSION
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
 am__untar
 am__tar
 AMTAR
@@ -642,6 +644,7 @@ SHELL'
 ac_subst_files=''
 ac_user_opts='
 enable_option_checking
+enable_silent_rules
 '
       ac_precious_vars='build_alias
 host_alias
@@ -708,8 +711,9 @@ do
   fi
 
   case $ac_option in
-  *=*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
-  *)   ac_optarg=yes ;;
+  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
+  *=)   ac_optarg= ;;
+  *)    ac_optarg=yes ;;
   esac
 
   # Accept the important Cygnus configure options, so we can diagnose typos.
@@ -754,7 +758,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -780,7 +784,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid feature name: $ac_useropt"
+      as_fn_error $? "invalid feature name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -984,7 +988,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1000,7 +1004,7 @@ do
     ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
     # Reject names that are not valid shell variable names.
     expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
-      as_fn_error "invalid package name: $ac_useropt"
+      as_fn_error $? "invalid package name: $ac_useropt"
     ac_useropt_orig=$ac_useropt
     ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
     case $ac_user_opts in
@@ -1030,8 +1034,8 @@ do
   | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
     x_libraries=$ac_optarg ;;
 
-  -*) as_fn_error "unrecognized option: \`$ac_option'
-Try \`$0 --help' for more information."
+  -*) as_fn_error $? "unrecognized option: \`$ac_option'
+Try \`$0 --help' for more information"
     ;;
 
   *=*)
@@ -1039,7 +1043,7 @@ Try \`$0 --help' for more information."
     # Reject names that are not valid shell variable names.
     case $ac_envvar in #(
       '' | [0-9]* | *[!_$as_cr_alnum]* )
-      as_fn_error "invalid variable name: \`$ac_envvar'" ;;
+      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
     esac
     eval $ac_envvar=\$ac_optarg
     export $ac_envvar ;;
@@ -1057,13 +1061,13 @@ done
 
 if test -n "$ac_prev"; then
   ac_option=--`echo $ac_prev | sed 's/_/-/g'`
-  as_fn_error "missing argument to $ac_option"
+  as_fn_error $? "missing argument to $ac_option"
 fi
 
 if test -n "$ac_unrecognized_opts"; then
   case $enable_option_checking in
     no) ;;
-    fatal) as_fn_error "unrecognized options: $ac_unrecognized_opts" ;;
+    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
     *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
   esac
 fi
@@ -1086,7 +1090,7 @@ do
     [\\/$]* | ?:[\\/]* )  continue;;
     NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
   esac
-  as_fn_error "expected an absolute directory name for --$ac_var: $ac_val"
+  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
 done
 
 # There might be people who depend on the old broken behavior: `$host'
@@ -1100,8 +1104,8 @@ target=$target_alias
 if test "x$host_alias" != x; then
   if test "x$build_alias" = x; then
     cross_compiling=maybe
-    $as_echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
-    If a cross compiler is detected then cross compile mode will be used." >&2
+    $as_echo "$as_me: WARNING: if you wanted to set the --build type, don't use --host.
+    If a cross compiler is detected then cross compile mode will be used" >&2
   elif test "x$build_alias" != "x$host_alias"; then
     cross_compiling=yes
   fi
@@ -1116,9 +1120,9 @@ test "$silent" = yes && exec 6>/dev/null
 ac_pwd=`pwd` && test -n "$ac_pwd" &&
 ac_ls_di=`ls -di .` &&
 ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
-  as_fn_error "working directory cannot be determined"
+  as_fn_error $? "working directory cannot be determined"
 test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
-  as_fn_error "pwd does not report name of working directory"
+  as_fn_error $? "pwd does not report name of working directory"
 
 
 # Find the source files, if location was not specified.
@@ -1157,11 +1161,11 @@ else
 fi
 if test ! -r "$srcdir/$ac_unique_file"; then
   test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
-  as_fn_error "cannot find sources ($ac_unique_file) in $srcdir"
+  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
 fi
 ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
 ac_abs_confdir=`(
-       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error "$ac_msg"
+       cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
        pwd)`
 # When building in place, set srcdir=.
 if test "$ac_abs_confdir" = "$ac_pwd"; then
@@ -1187,7 +1191,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.11 to adapt to many kinds of systems.
+\`configure' configures GNU Automake 1.11a to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1201,7 +1205,7 @@ Configuration:
       --help=short        display options specific to this package
       --help=recursive    display the short help of all the included packages
   -V, --version           display version information and exit
-  -q, --quiet, --silent   do not print \`checking...' messages
+  -q, --quiet, --silent   do not print \`checking ...' messages
       --cache-file=FILE   cache test results in FILE [disabled]
   -C, --config-cache      alias for \`--cache-file=config.cache'
   -n, --no-create         do not create output files
@@ -1256,10 +1260,17 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of GNU Automake 1.11:";;
+     short | recursive ) echo "Configuration of GNU Automake 1.11a:";;
    esac
   cat <<\_ACEOF
 
+Optional Features:
+  --disable-option-checking  ignore unrecognized --enable/--with options
+  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
+  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
+  --enable-silent-rules          less verbose build output (undo: `make V=1')
+  --disable-silent-rules         verbose build output (undo: `make V=0')
+
 Report bugs to <bug-automake@gnu.org>.
 GNU Automake home page: <http://www.gnu.org/software/automake/>.
 General help using GNU software: <http://www.gnu.org/gethelp/>.
@@ -1325,10 +1336,10 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-GNU Automake configure 1.11
-generated by GNU Autoconf 2.65
+GNU Automake configure 1.11a
+generated by GNU Autoconf 2.67
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This configure script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it.
 _ACEOF
@@ -1342,8 +1353,8 @@ 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.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+It was created by GNU Automake $as_me 1.11a, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
 
   $ $0 $@
 
@@ -1453,11 +1464,9 @@ trap 'exit_status=$?
   {
     echo
 
-    cat <<\_ASBOX
-## ---------------- ##
+    $as_echo "## ---------------- ##
 ## Cache variables. ##
-## ---------------- ##
-_ASBOX
+## ---------------- ##"
     echo
     # The following way of writing the cache mishandles newlines in values,
 (
@@ -1491,11 +1500,9 @@ $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
 )
     echo
 
-    cat <<\_ASBOX
-## ----------------- ##
+    $as_echo "## ----------------- ##
 ## Output variables. ##
-## ----------------- ##
-_ASBOX
+## ----------------- ##"
     echo
     for ac_var in $ac_subst_vars
     do
@@ -1508,11 +1515,9 @@ _ASBOX
     echo
 
     if test -n "$ac_subst_files"; then
-      cat <<\_ASBOX
-## ------------------- ##
+      $as_echo "## ------------------- ##
 ## File substitutions. ##
-## ------------------- ##
-_ASBOX
+## ------------------- ##"
       echo
       for ac_var in $ac_subst_files
       do
@@ -1526,11 +1531,9 @@ _ASBOX
     fi
 
     if test -s confdefs.h; then
-      cat <<\_ASBOX
-## ----------- ##
+      $as_echo "## ----------- ##
 ## confdefs.h. ##
-## ----------- ##
-_ASBOX
+## ----------- ##"
       echo
       cat confdefs.h
       echo
@@ -1585,7 +1588,12 @@ _ACEOF
 ac_site_file1=NONE
 ac_site_file2=NONE
 if test -n "$CONFIG_SITE"; then
-  ac_site_file1=$CONFIG_SITE
+  # We do not want a PATH search for config.site.
+  case $CONFIG_SITE in #((
+    -*)  ac_site_file1=./$CONFIG_SITE;;
+    */*) ac_site_file1=$CONFIG_SITE;;
+    *)   ac_site_file1=./$CONFIG_SITE;;
+  esac
 elif test "x$prefix" != xNONE; then
   ac_site_file1=$prefix/share/config.site
   ac_site_file2=$prefix/etc/config.site
@@ -1600,7 +1608,11 @@ do
     { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
 $as_echo "$as_me: loading site script $ac_site_file" >&6;}
     sed 's/^/| /' "$ac_site_file" >&5
-    . "$ac_site_file"
+    . "$ac_site_file" \
+      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
+$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
+as_fn_error $? "failed to load site script $ac_site_file
+See \`config.log' for more details" "$LINENO" 5; }
   fi
 done
 
@@ -1676,7 +1688,7 @@ if $ac_cache_corrupted; then
 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
   { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
-  as_fn_error "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
+  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
 fi
 ## -------------------- ##
 ## Main body of script. ##
@@ -1695,16 +1707,22 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
 
 ac_aux_dir=
 for ac_dir in lib "$srcdir"/lib; do
-  for ac_t in install-sh install.sh shtool; do
-    if test -f "$ac_dir/$ac_t"; then
-      ac_aux_dir=$ac_dir
-      ac_install_sh="$ac_aux_dir/$ac_t -c"
-      break 2
-    fi
-  done
+  if test -f "$ac_dir/install-sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install-sh -c"
+    break
+  elif test -f "$ac_dir/install.sh"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/install.sh -c"
+    break
+  elif test -f "$ac_dir/shtool"; then
+    ac_aux_dir=$ac_dir
+    ac_install_sh="$ac_aux_dir/shtool install -c"
+    break
+  fi
 done
 if test -z "$ac_aux_dir"; then
-  as_fn_error "cannot find install-sh, install.sh, or shtool in lib \"$srcdir\"/lib" "$LINENO" 5
+  as_fn_error $? "cannot find install-sh, install.sh, or shtool in lib \"$srcdir\"/lib" "$LINENO" 5
 fi
 
 # These three variables are undocumented and unsupported,
@@ -1719,7 +1737,7 @@ ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
 
 # Make sure we can run config.sub.
 $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
-  as_fn_error "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
+  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
 
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
 $as_echo_n "checking build system type... " >&6; }
@@ -1730,16 +1748,16 @@ else
 test "x$ac_build_alias" = x &&
   ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
 test "x$ac_build_alias" = x &&
-  as_fn_error "cannot guess build type; you must specify one" "$LINENO" 5
+  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
-  as_fn_error "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
+  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
 
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
 $as_echo "$ac_cv_build" >&6; }
 case $ac_cv_build in
 *-*-*) ;;
-*) as_fn_error "invalid value of canonical build" "$LINENO" 5;;
+*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
 esac
 build=$ac_cv_build
 ac_save_IFS=$IFS; IFS='-'
@@ -1764,7 +1782,7 @@ am_AUTOCONF="${AUTOCONF-autoconf}"
 am_AUTOHEADER="${AUTOHEADER-autoheader}"
 
 
-am__api_version='1.11'
+am__api_version='1.11a'
 
 # Find a good install program.  We prefer a C program (faster),
 # so one script is as good as another.  But avoid the broken or
@@ -1867,11 +1885,11 @@ am_lf='
 '
 case `pwd` in
   *[\\\"\#\$\&\'\`$am_lf]*)
-    as_fn_error "unsafe absolute working directory name" "$LINENO" 5;;
+    as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;;
 esac
 case $srcdir in
   *[\\\"\#\$\&\'\`$am_lf\ \    ]*)
-    as_fn_error "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
+    as_fn_error $? "unsafe srcdir value: \`$srcdir'" "$LINENO" 5;;
 esac
 
 # Do `set' in a subshell so we don't clobber the current shell's
@@ -1895,7 +1913,7 @@ if (
        # if, for instance, CONFIG_SHELL is bash and it inherits a
        # broken ls alias from the environment.  This has actually
        # happened.  Such a system could not be considered "sane".
-       as_fn_error "ls -t appears to fail.  Make sure there is not a broken
+       as_fn_error $? "ls -t appears to fail.  Make sure there is not a broken
   alias in your environment" "$LINENO" 5
      fi
      if test "$2" = conftest.file || test $am_try -eq 2; then
@@ -1910,7 +1928,7 @@ then
    # Ok.
    :
 else
-   as_fn_error "newly created file is older than distributed files!
+   as_fn_error $? "newly created file is older than distributed files!
 Check your system clock" "$LINENO" 5
 fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
@@ -2148,7 +2166,7 @@ done
 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; }
 set x ${MAKE-make}
 ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'`
-if { as_var=ac_cv_prog_make_${ac_make}_set; eval "test \"\${$as_var+set}\" = set"; }; then :
+if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\"" = set; then :
   $as_echo_n "(cached) " >&6
 else
   cat >conftest.make <<\_ACEOF
@@ -2156,7 +2174,7 @@ SHELL = /bin/sh
 all:
        @echo '@@@%%%=$(MAKE)=@@@%%%'
 _ACEOF
-# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
+# GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
 case `${MAKE-make} -f conftest.make 2>/dev/null` in
   *@@@%%%=?*=@@@%%%*)
     eval ac_cv_prog_make_${ac_make}_set=yes;;
@@ -2184,13 +2202,25 @@ else
 fi
 rmdir .tst 2>/dev/null
 
+# Check whether --enable-silent-rules was given.
+if test "${enable_silent_rules+set}" = set; then :
+  enableval=$enable_silent_rules;
+fi
+
+case $enable_silent_rules in
+yes) AM_DEFAULT_VERBOSITY=0;;
+no)  AM_DEFAULT_VERBOSITY=1;;
+*)   AM_DEFAULT_VERBOSITY=1;;
+esac
+AM_BACKSLASH='\'
+
 if test "`cd $srcdir && pwd`" != "`pwd`"; then
   # Use -I$(srcdir) only when $(srcdir) != ., so that make's output
   # is not polluted with repeated "-I."
   am__isrc=' -I$(srcdir)'
   # test to see if srcdir already configured
   if test -f $srcdir/config.status; then
-    as_fn_error "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
+    as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5
   fi
 fi
 
@@ -2206,7 +2236,7 @@ fi
 
 # Define the identity of the package.
  PACKAGE='automake'
- VERSION='1.11'
+ VERSION='1.11a'
 
 
 cat >>confdefs.h <<_ACEOF
@@ -2307,10 +2337,10 @@ fi
 
 
 if test -z "$PERL"; then
-   as_fn_error "perl not found" "$LINENO" 5
+   as_fn_error $? "perl not found" "$LINENO" 5
 fi
 $PERL -e 'require 5.006;' || {
-   as_fn_error "perl 5.6 or better is required; perl 5.8.2 or better
+   as_fn_error $? "perl 5.6 or better is required; perl 5.8.2 or better
 is recommended.  If you have several perl versions
 installed, select the one Automake should use using
   ./configure PERL=/path/to/perl" "$LINENO" 5
@@ -2419,7 +2449,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_installed" >&5
 $as_echo "$am_cv_autoconf_installed" >&6; }
 if test "$am_cv_autoconf_installed" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required.
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required.
     Please make sure it is installed and in your PATH." "$LINENO" 5
 fi
 
@@ -2445,7 +2475,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_works" >&5
 $as_echo "$am_cv_autoconf_works" >&6; }
 if test "$am_cv_autoconf_works" = no; then
-  as_fn_error "The installed version of autoconf does not work.
+  as_fn_error $? "The installed version of autoconf does not work.
     Please check config.log for error messages before this one." "$LINENO" 5
 fi
 
@@ -2471,7 +2501,7 @@ fi
 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_autoconf_version" >&5
 $as_echo "$am_cv_autoconf_version" >&6; }
 if test "$am_cv_autoconf_version" = no; then
-  as_fn_error "Autoconf $required_autoconf_version or better is required." "$LINENO" 5
+  as_fn_error $? "Autoconf $required_autoconf_version or better is required." "$LINENO" 5
 fi
 
 # Test for ln.  We need use it to install the versioned binaries.
@@ -2561,7 +2591,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_GREP"; then
-    as_fn_error "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_GREP=$GREP
@@ -2627,7 +2657,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_EGREP"; then
-    as_fn_error "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_EGREP=$EGREP
@@ -2694,7 +2724,7 @@ esac
   done
 IFS=$as_save_IFS
   if test -z "$ac_cv_path_FGREP"; then
-    as_fn_error "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
+    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
   fi
 else
   ac_cv_path_FGREP=$FGREP
@@ -2860,6 +2890,7 @@ DEFS=`sed -n "$ac_script" confdefs.h`
 
 ac_libobjs=
 ac_ltlibobjs=
+U=
 for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
   # 1. Remove the extension, and $U if already installed.
   ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
@@ -3022,19 +3053,19 @@ export LANGUAGE
 (unset CDPATH) >/dev/null 2>&1 && unset CDPATH
 
 
-# as_fn_error ERROR [LINENO LOG_FD]
-# ---------------------------------
+# as_fn_error STATUS ERROR [LINENO LOG_FD]
+# ----------------------------------------
 # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
 # provided, also output the error to LOG_FD, referencing LINENO. Then exit the
-# script with status $?, using 1 if that was 0.
+# script with STATUS, using 1 if that was 0.
 as_fn_error ()
 {
-  as_status=$?; test $as_status -eq 0 && as_status=1
-  if test "$3"; then
-    as_lineno=${as_lineno-"$2"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
-    $as_echo "$as_me:${as_lineno-$LINENO}: error: $1" >&$3
+  as_status=$1; test $as_status -eq 0 && as_status=1
+  if test "$4"; then
+    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
+    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
   fi
-  $as_echo "$as_me: error: $1" >&2
+  $as_echo "$as_me: error: $2" >&2
   as_fn_exit $as_status
 } # as_fn_error
 
@@ -3230,7 +3261,7 @@ $as_echo X"$as_dir" |
       test -d "$as_dir" && break
     done
     test -z "$as_dirs" || eval "mkdir $as_dirs"
-  } || test -d "$as_dir" || as_fn_error "cannot create directory $as_dir"
+  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
 
 
 } # as_fn_mkdir_p
@@ -3283,8 +3314,8 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=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.11, which was
-generated by GNU Autoconf 2.65.  Invocation command line was
+This file was extended by GNU Automake $as_me 1.11a, which was
+generated by GNU Autoconf 2.67.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
   CONFIG_HEADERS  = $CONFIG_HEADERS
@@ -3338,11 +3369,11 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-GNU Automake config.status 1.11
-configured by $0, generated by GNU Autoconf 2.65,
+GNU Automake config.status 1.11a
+configured by $0, generated by GNU Autoconf 2.67,
   with options \\"\$ac_cs_config\\"
 
-Copyright (C) 2009 Free Software Foundation, Inc.
+Copyright (C) 2010 Free Software Foundation, Inc.
 This config.status script is free software; the Free Software Foundation
 gives unlimited permission to copy, distribute and modify it."
 
@@ -3360,11 +3391,16 @@ ac_need_defaults=:
 while test $# != 0
 do
   case $1 in
-  --*=*)
+  --*=?*)
     ac_option=`expr "X$1" : 'X\([^=]*\)='`
     ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
     ac_shift=:
     ;;
+  --*=)
+    ac_option=`expr "X$1" : 'X\([^=]*\)='`
+    ac_optarg=
+    ac_shift=:
+    ;;
   *)
     ac_option=$1
     ac_optarg=$2
@@ -3386,6 +3422,7 @@ do
     $ac_shift
     case $ac_optarg in
     *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
+    '') as_fn_error $? "missing file argument" ;;
     esac
     as_fn_append CONFIG_FILES " '$ac_optarg'"
     ac_need_defaults=false;;
@@ -3396,7 +3433,7 @@ do
     ac_cs_silent=: ;;
 
   # This is an error.
-  -*) as_fn_error "unrecognized option: \`$1'
+  -*) as_fn_error $? "unrecognized option: \`$1'
 Try \`$0 --help' for more information." ;;
 
   *) as_fn_append ac_config_targets " $1"
@@ -3462,7 +3499,7 @@ do
     "tests/aclocal-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/aclocal-${APIVERSION}:tests/aclocal.in" ;;
     "tests/automake-${APIVERSION}") CONFIG_FILES="$CONFIG_FILES tests/automake-${APIVERSION}:tests/automake.in" ;;
 
-  *) as_fn_error "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
+  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
   esac
 done
 
@@ -3498,7 +3535,7 @@ $debug ||
 {
   tmp=./conf$$-$RANDOM
   (umask 077 && mkdir "$tmp")
-} || as_fn_error "cannot create a temporary directory in ." "$LINENO" 5
+} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
 
 # Set up the scripts for CONFIG_FILES section.
 # No need to generate them if there are no CONFIG_FILES.
@@ -3515,7 +3552,7 @@ if test "x$ac_cr" = x; then
 fi
 ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
 if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
-  ac_cs_awk_cr='\r'
+  ac_cs_awk_cr='\\r'
 else
   ac_cs_awk_cr=$ac_cr
 fi
@@ -3529,18 +3566,18 @@ _ACEOF
   echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
   echo "_ACEOF"
 } >conf$$subs.sh ||
-  as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
-ac_delim_num=`echo "$ac_subst_vars" | grep -c '$'`
+  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
+ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
 ac_delim='%!_!# '
 for ac_last_try in false false false false false :; do
   . ./conf$$subs.sh ||
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
 
   ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
   if test $ac_delim_n = $ac_delim_num; then
     break
   elif $ac_last_try; then
-    as_fn_error "could not make $CONFIG_STATUS" "$LINENO" 5
+    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
   else
     ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
   fi
@@ -3629,20 +3666,28 @@ if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
 else
   cat
 fi < "$tmp/subs1.awk" > "$tmp/subs.awk" \
-  || as_fn_error "could not setup config files machinery" "$LINENO" 5
+  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
 _ACEOF
 
-# VPATH may cause trouble with some makes, so we remove $(srcdir),
-# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
+# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
 # trailing colons and then remove the whole line if VPATH becomes empty
 # (actually we leave an empty line to preserve line numbers).
 if test "x$srcdir" = x.; then
-  ac_vpsub='/^[         ]*VPATH[        ]*=/{
-s/:*\$(srcdir):*/:/
-s/:*\${srcdir}:*/:/
-s/:*@srcdir@:*/:/
-s/^\([^=]*=[    ]*\):*/\1/
+  ac_vpsub='/^[         ]*VPATH[        ]*=[    ]*/{
+h
+s///
+s/^/:/
+s/[     ]*$/:/
+s/:\$(srcdir):/:/g
+s/:\${srcdir}:/:/g
+s/:@srcdir@:/:/g
+s/^:*//
 s/:*$//
+x
+s/\(=[  ]*\).*/\1/
+G
+s/\n//
 s/^[^=]*=[      ]*$//
 }'
 fi
@@ -3660,7 +3705,7 @@ do
   esac
   case $ac_mode$ac_tag in
   :[FHL]*:*);;
-  :L* | :C*:*) as_fn_error "invalid tag \`$ac_tag'" "$LINENO" 5;;
+  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
   :[FH]-) ac_tag=-:-;;
   :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
   esac
@@ -3688,7 +3733,7 @@ do
           [\\/$]*) false;;
           *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
           esac ||
-          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
+          as_fn_error "cannot find input file: \`$ac_f'" "$LINENO" 5;;
       esac
       case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
       as_fn_append ac_file_inputs " '$ac_f'"
@@ -3715,7 +3760,7 @@ $as_echo "$as_me: creating $ac_file" >&6;}
 
     case $ac_tag in
     *:-:* | *:-) cat >"$tmp/stdin" \
-      || as_fn_error "could not create $ac_file" "$LINENO" 5 ;;
+      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
     esac
     ;;
   esac
@@ -3852,22 +3897,22 @@ s&@MKDIR_P@&$ac_MKDIR_P&;t t
 $ac_datarootdir_hack
 "
 eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$tmp/subs.awk" >$tmp/out \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
 
 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
   { ac_out=`sed -n '/\${datarootdir}/p' "$tmp/out"`; test -n "$ac_out"; } &&
   { ac_out=`sed -n '/^[         ]*datarootdir[  ]*:*=/p' "$tmp/out"`; test -z "$ac_out"; } &&
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&5
+which seems to be undefined.  Please make sure it is defined" >&5
 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
-which seems to be undefined.  Please make sure it is defined." >&2;}
+which seems to be undefined.  Please make sure it is defined" >&2;}
 
   rm -f "$tmp/stdin"
   case $ac_file in
   -) cat "$tmp/out" && rm -f "$tmp/out";;
   *) rm -f "$ac_file" && mv "$tmp/out" "$ac_file";;
   esac \
-  || as_fn_error "could not create $ac_file" "$LINENO" 5
+  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
  ;;
 
 
@@ -3888,7 +3933,7 @@ _ACEOF
 ac_clean_files=$ac_clean_files_save
 
 test $ac_write_fail = 0 ||
-  as_fn_error "write failure creating $CONFIG_STATUS" "$LINENO" 5
+  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
 
 
 # configure is writing to config.log, and then calls config.status.
@@ -3909,7 +3954,7 @@ if test "$no_create" != yes; then
   exec 5>>config.log
   # Use ||, not &&, to avoid exiting from the if with $? = 1, which
   # would make configure fail if this is the last instruction.
-  $ac_cs_success || as_fn_exit $?
+  $ac_cs_success || as_fn_exit 1
 fi
 if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
   { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
index de4583d..079525d 100644 (file)
@@ -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.11], [bug-automake@gnu.org])
+AC_INIT([GNU Automake], [1.11a], [bug-automake@gnu.org])
 
 m4_ifndef([AC_PACKAGE_URL],
          [AC_SUBST([PACKAGE_URL], [http://www.gnu.org/software/automake/])])
@@ -32,7 +32,8 @@ AC_CANONICAL_BUILD
 AC_SUBST([am_AUTOCONF], ["${AUTOCONF-autoconf}"])
 AC_SUBST([am_AUTOHEADER], ["${AUTOHEADER-autoheader}"])
 
-AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests parallel-tests])
+AM_INIT_AUTOMAKE([1.10a dist-bzip2 filename-length-max=99 color-tests
+                 parallel-tests silent-rules])
 
 # The API version is the base version.  We must guarantee
 # compatibility for all releases with the same API version.
index bb48fa2..01cf663 100644 (file)
@@ -27,12 +27,12 @@ dist_man1_MANS = \
   $(srcdir)/automake-$(APIVERSION).1
 MAINTAINERCLEANFILES = $(dist_man1_MANS)
 update_mans = \
-  PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+  $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
   export PATH && \
   $(HELP2MAN) --output=$@
 $(dist_man1_MANS): $(top_srcdir)/configure.ac
 $(srcdir)/aclocal.1 $(srcdir)/automake.1:
-       f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
+       $(AM_V_GEN)f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
        echo ".so man1/$$f-$(APIVERSION).1" > $@
 $(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in
        $(update_mans) aclocal-$(APIVERSION)
@@ -70,7 +70,7 @@ dist_doc_DATA = $(srcdir)/amhello-1.0.tar.gz
 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
 # configure in tests/.
 $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac
-       PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+       $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
        ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
index 95a8fb8..d2e5a82 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -59,16 +59,43 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
+AM_V_DVIPS = $(am__v_DVIPS_$(V))
+am__v_DVIPS_ = $(am__v_DVIPS_$(AM_DEFAULT_VERBOSITY))
+am__v_DVIPS_0 = @echo "  DVIPS   " $@;
+AM_V_MAKEINFO = $(am__v_MAKEINFO_$(V))
+am__v_MAKEINFO_ = $(am__v_MAKEINFO_$(AM_DEFAULT_VERBOSITY))
+am__v_MAKEINFO_0 = @echo "  MAKEINFO" $@;
+AM_V_INFOHTML = $(am__v_INFOHTML_$(V))
+am__v_INFOHTML_ = $(am__v_INFOHTML_$(AM_DEFAULT_VERBOSITY))
+am__v_INFOHTML_0 = @echo "  INFOHTML" $@;
+AM_V_TEXI2DVI = $(am__v_TEXI2DVI_$(V))
+am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_$(AM_DEFAULT_VERBOSITY))
+am__v_TEXI2DVI_0 = @echo "  TEXI2DVI" $@;
+AM_V_TEXI2PDF = $(am__v_TEXI2PDF_$(V))
+am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_$(AM_DEFAULT_VERBOSITY))
+am__v_TEXI2PDF_0 = @echo "  TEXI2PDF" $@;
+AM_V_texinfo = $(am__v_texinfo_$(V))
+am__v_texinfo_ = $(am__v_texinfo_$(AM_DEFAULT_VERBOSITY))
+am__v_texinfo_0 = -q
+AM_V_texidevnull = $(am__v_texidevnull_$(V))
+am__v_texidevnull_ = $(am__v_texidevnull_$(AM_DEFAULT_VERBOSITY))
+am__v_texidevnull_0 = > /dev/null
 INFO_DEPS = $(srcdir)/automake.info
 TEXINFO_TEX = $(top_srcdir)/lib/texinfo.tex
 am__TEXINFO_TEX_DIR = $(top_srcdir)/lib
@@ -114,6 +141,7 @@ CTAGS = ctags
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -212,7 +240,7 @@ dist_man1_MANS = \
 
 MAINTAINERCLEANFILES = $(dist_man1_MANS)
 update_mans = \
-  PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+  $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
   export PATH && \
   $(HELP2MAN) --output=$@
 
@@ -278,7 +306,7 @@ $(ACLOCAL_M4):  $(am__aclocal_m4_deps)
 $(am__aclocal_m4_deps):
 
 .texi.info:
-       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \
        am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
        if ($(MAKEINFO) --version) >/dev/null 2>&1; then \
@@ -300,18 +328,18 @@ $(am__aclocal_m4_deps):
        rm -rf $$backupdir; exit $$rc
 
 .texi.dvi:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-       $(TEXI2DVI) $<
+       $(TEXI2DVI) $(AM_V_texinfo) $< $(AM_V_texidevnull)
 
 .texi.pdf:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \
-       $(TEXI2PDF) $<
+       $(TEXI2PDF) $(AM_V_texinfo) $< $(AM_V_texidevnull)
 
 .texi.html:
-       rm -rf $(@:.html=.htp)
-       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
+       $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp)
+       $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \
         -o $(@:.html=.htp) $<; \
        then \
          rm -rf $@; \
@@ -346,8 +374,8 @@ mostlyclean-vti:
 maintainer-clean-vti:
        -rm -f $(srcdir)/stamp-vti $(srcdir)/version.texi
 .dvi.ps:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-       $(DVIPS) -o $@ $<
+       $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) $(AM_V_texinfo) -o $@ $<
 
 uninstall-dvi-am:
        @$(NORMAL_UNINSTALL)
@@ -548,6 +576,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist:  $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -780,24 +822,25 @@ uninstall-man: uninstall-man1
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS all all-am check check-am clean clean-aminfo \
-       clean-generic ctags dist-info distclean distclean-generic \
-       distclean-tags distdir dvi dvi-am html html-am info info-am \
-       install install-am install-data install-data-am \
-       install-dist_docDATA install-dvi install-dvi-am install-exec \
-       install-exec-am install-html install-html-am install-info \
-       install-info-am install-man install-man1 install-pdf \
-       install-pdf-am install-ps install-ps-am install-strip \
-       installcheck installcheck-am installdirs maintainer-clean \
-       maintainer-clean-aminfo maintainer-clean-generic \
-       maintainer-clean-vti mostlyclean mostlyclean-aminfo \
-       mostlyclean-generic mostlyclean-vti pdf pdf-am ps ps-am tags \
-       uninstall uninstall-am uninstall-dist_docDATA uninstall-dvi-am \
-       uninstall-html-am uninstall-info-am uninstall-man \
-       uninstall-man1 uninstall-pdf-am uninstall-ps-am
+       clean-generic cscopelist ctags dist-info distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dist_docDATA install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
+       install-man1 install-pdf install-pdf-am install-ps \
+       install-ps-am install-strip installcheck installcheck-am \
+       installdirs maintainer-clean maintainer-clean-aminfo \
+       maintainer-clean-generic maintainer-clean-vti mostlyclean \
+       mostlyclean-aminfo mostlyclean-generic mostlyclean-vti pdf \
+       pdf-am ps ps-am tags uninstall uninstall-am \
+       uninstall-dist_docDATA uninstall-dvi-am uninstall-html-am \
+       uninstall-info-am uninstall-man uninstall-man1 \
+       uninstall-pdf-am uninstall-ps-am
 
 $(dist_man1_MANS): $(top_srcdir)/configure.ac
 $(srcdir)/aclocal.1 $(srcdir)/automake.1:
-       f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
+       $(AM_V_GEN)f=`echo $@ | sed 's|.*/||; s|\.1$$||; $(transform)'`; \
        echo ".so man1/$$f-$(APIVERSION).1" > $@
 $(srcdir)/aclocal-$(APIVERSION).1: $(srcdir)/../aclocal.in
        $(update_mans) aclocal-$(APIVERSION)
@@ -809,7 +852,7 @@ $(srcdir)/automake-$(APIVERSION).1: $(srcdir)/../automake.in
 # aclocal-$(APIVERSION) and automake-$(APIVERSION) are generated by
 # configure in tests/.
 $(srcdir)/amhello-1.0.tar.gz: $(amhello_sources) $(top_srcdir)/configure.ac
-       PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
+       $(AM_V_GEN)PATH="`pwd`/../tests$(PATH_SEPARATOR)$$PATH" && \
        export PATH && \
        cd $(srcdir)/amhello && \
        ACLOCAL=aclocal-$(APIVERSION) AUTOMAKE=automake-$(APIVERSION) \
index 66c5a7e..bbb74d3 100644 (file)
@@ -315,7 +315,7 @@ Support for Test Suites
 
 Miscellaneous Rules
 
-* Tags::                        Interfacing to etags and mkid
+* Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
 * Multilibs::                   Support for multilibs.
 
@@ -8451,6 +8451,11 @@ frequently smaller than gzipped archives.
 Generate a gzip tar archive of the distribution.
 @trindex dist-gzip
 
+@item @code{dist-lzip}
+Generate an @samp{lzip} tar archive of the distribution.  @command{lzip}
+archives are frequently smaller than @command{bzip2}-compressed archives.
+@trindex dist-lzip
+
 @item @code{dist-lzma}
 Generate an @samp{lzma} tar archive of the distribution.  @command{lzma}
 archives are frequently smaller than @command{bzip2}-compressed archives.
@@ -9001,6 +9006,12 @@ Cause @command{dejagnu}-specific rules to be generated.  @xref{DejaGnu Tests}.
 Hook @code{dist-bzip2} to @code{dist}.
 @trindex dist-bzip2
 
+@item @option{dist-lzip}
+@cindex Option, @option{dist-lzip}
+@opindex dist-lzip
+Hook @code{dist-lzip} to @code{dist}.
+@trindex dist-lzip
+
 @item @option{dist-lzma}
 @cindex Option, @option{dist-lzma}
 @opindex dist-lzma
@@ -9273,7 +9284,8 @@ In order to use this option with C sources, you should add
 These three mutually exclusive options select the tar format to use
 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-xz} and @option{dist-tarZ} options in use.)
+@option{dist-bzip2}, @option{dist-lzip}, @option{dist-tarZ} and
+@option{dist-xz} options in use.)
 
 These options must be passed as arguments to @code{AM_INIT_AUTOMAKE}
 (@pxref{Macros}) because they can require additional configure checks.
@@ -9345,7 +9357,7 @@ the @code{AM_INIT_AUTOMAKE} macro in @file{configure.ac}.
 There are a few rules and variables that didn't fit anywhere else.
 
 @menu
-* Tags::                        Interfacing to etags and mkid
+* Tags::                        Interfacing to cscope, etags and mkid
 * Suffixes::                    Handling new file extensions
 * Multilibs::                   Support for multilibs.
 @end menu
@@ -9407,6 +9419,14 @@ Automake will also generate an @code{ID} rule that will run
 directory-by-directory basis.
 @trindex id
 
+Similarly, the @code{cscope} rule will create a list of all the source
+files in the tree and run @command{cscope} to build an inverted index
+database.  The variable @code{CSCOPE} is the name of the program to invoke
+(by default @command{cscope}); @code{CSCOPEFLAGS} and
+@code{CSCOPE_ARGS} can be used by the user to pass additional flags and
+file names respectively, while @code{AM_CSCOPEFLAGS} can be used by the
+@file{Makefile.am}.
+
 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
@@ -12947,4 +12967,4 @@ parentheses is the number of generated test cases.
 @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
-@c  LocalWords:  barexec Pinard's automatize initialize lzma xz
+@c  LocalWords:  barexec Pinard's automatize initialize lzip lzma xz cscope
index eb208c3..57948bd 100644 (file)
@@ -44,7 +44,7 @@ Automake::ChannelDefs - channel definitions for Automake and helper functions
   verb ($MESSAGE, [%OPTIONS]);
   switch_warning ($CATEGORY);
   parse_WARNINGS ();
-  parse_warning ($OPTION, $ARGUMENT);
+  parse_warnings ($OPTION, $ARGUMENT);
   Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME);
 
 =head1 DESCRIPTION
@@ -163,6 +163,10 @@ register_channel 'verb', type => 'debug', silent => 1, uniq_part => UP_NONE,
   ordered => 0;
 register_channel 'note', type => 'debug', silent => 0;
 
+setup_channel_type 'warning', header => 'warning: ';
+setup_channel_type 'error', header => 'error: ';
+setup_channel_type 'fatal', header => 'error: ';
+
 =head2 FUNCTIONS
 
 =over 4
@@ -308,7 +312,7 @@ sub parse_WARNINGS ()
     }
 }
 
-=item C<parse_warning ($OPTION, $ARGUMENT)>
+=item C<parse_warnings ($OPTION, $ARGUMENT)>
 
 Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
 
@@ -365,7 +369,7 @@ sub set_strictness ($)
     }
   else
     {
-      prog_error "level `$name' not recognized\n";
+      prog_error "level `$name' not recognized";
     }
 }
 
@@ -381,6 +385,8 @@ Written by Alexandre Duret-Lutz E<lt>F<adl@gnu.org>E<gt>.
 
 =cut
 
+1;
+
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
 ## perl-indent-level: 2
index b4908c0..aeed4db 100644 (file)
@@ -164,7 +164,7 @@ functions.  The possible keys, with their default value are:
 The type of the channel.  One of C<'debug'>, C<'warning'>, C<'error'>, or
 C<'fatal'>.  Fatal messages abort the program when they are output.
 Error messages update the exit status.  Debug and warning messages are
-harmless, except that warnings can be treated as errors of
+harmless, except that warnings are treated as errors if
 C<$warnings_are_errors> is set.
 
 =item C<exit_code =E<gt> 1>
@@ -204,10 +204,14 @@ C<US_LOCAL>, and C<US_GLOBAL> constants above.
 =item C<header =E<gt> ''>
 
 A string to prepend to each message emitted through this channel.
+With partial messages, only the first part will have C<header>
+prepended.
 
 =item C<footer =E<gt> ''>
 
 A string to append to each message emitted through this channel.
+With partial messages, only the final part will have C<footer>
+appended.
 
 =item C<backtrace =E<gt> 0>
 
@@ -399,20 +403,24 @@ sub _format_sub_message ($$)
   return $leader . join ("\n" . $leader, split ("\n", $message)) . "\n";
 }
 
+# Store partial messages here. (See the 'partial' option.)
+use vars qw ($partial);
+$partial = '';
+
 # _format_message ($LOCATION, $MESSAGE, %OPTIONS)
 # -----------------------------------------------
 # Format the message.  Return a string ready to print.
 sub _format_message ($$%)
 {
   my ($location, $message, %opts) = @_;
-  my $msg = '';
+  my $msg = ($partial eq '' ? $opts{'header'} : '') . $message
+           . ($opts{'partial'} ? '' : $opts{'footer'});
   if (ref $location)
     {
       # If $LOCATION is a reference, assume it's an instance of the
       # Automake::Location class and display contexts.
       my $loc = $location->get || $me;
-      $msg = _format_sub_message ("$loc: ", $opts{'header'}
-                                 . $message . $opts{'footer'});
+      $msg = _format_sub_message ("$loc: ", $msg);
       for my $pair ($location->get_contexts)
        {
          $msg .= _format_sub_message ($pair->[0] . ":   ", $pair->[1]);
@@ -421,8 +429,7 @@ sub _format_message ($$%)
   else
     {
       $location ||= $me;
-      $msg = _format_sub_message ("$location: ", $opts{'header'}
-                                 . $message . $opts{'footer'});
+      $msg = _format_sub_message ("$location: ", $msg);
     }
   return $msg;
 }
@@ -484,10 +491,6 @@ sub _dequeue ($)
 }
 
 
-# Store partial messages here. (See the 'partial' option.)
-use vars qw ($partial);
-$partial = '';
-
 # _print_message ($LOCATION, $MESSAGE, %OPTIONS)
 # ----------------------------------------------
 # Format the message, check duplicates, and print it.
@@ -511,6 +514,9 @@ sub _print_message ($$%)
       $partial = '';
     }
 
+  msg ('note', '', 'warnings are treated as errors', uniq_scope => US_GLOBAL)
+    if ($opts{'type'} eq 'warning' && $warnings_are_errors);
+
   # Check for duplicate message if requested.
   my $to_filter;
   if ($opts{'uniq_part'} ne UP_NONE)
@@ -674,7 +680,7 @@ Override the options of C<$channel> with those specified by C<%options>.
 sub setup_channel ($%)
 {
   my ($name, %opts) = @_;
-  confess "channel $name doesn't exist" unless exists $channels{$name};
+  confess "unknown channel $name" unless exists $channels{$name};
   _merge_options %{$channels{$name}}, %opts;
 }
 
index 2d649f6..5c54b8b 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 1997, 2001, 2002, 2003, 2006, 2008  Free Software
+# Copyright (C) 1997, 2001, 2002, 2003, 2006, 2008, 2009  Free Software
 # Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
@@ -180,18 +180,21 @@ sub new ($;@)
   };
   bless $self, $class;
 
-  # Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
-  @conds = map { split (' ', $_) } @conds;
-
   for my $cond (@conds)
     {
-      next if $cond eq 'TRUE';
-
       # Catch some common programming errors:
       # - A Condition passed to new
       confess "`$cond' is a reference, expected a string" if ref $cond;
       # - A Condition passed as a string to new
       confess "`$cond' does not look like a condition" if $cond =~ /::/;
+    }
+
+  # Accept strings like "FOO BAR" as shorthand for ("FOO", "BAR").
+  @conds = map { split (' ', $_) } @conds;
+
+  for my $cond (@conds)
+    {
+      next if $cond eq 'TRUE';
 
       # Detect cases when @conds can be simplified to FALSE.
       if (($cond eq 'FALSE' && $#conds > 0)
@@ -250,7 +253,7 @@ except those of C<$minuscond>.  This is the opposite of C<merge>.
 sub strip ($$)
 {
   my ($self, $minus) = @_;
-  my @res = grep { not $minus->has ($_) } $self->conds;
+  my @res = grep { not $minus->_has ($_) } $self->conds;
   return new Automake::Condition @res;
 }
 
@@ -274,7 +277,7 @@ sub conds ($ )
 }
 
 # Undocumented, shouldn't be needed outside of this class.
-sub has ($$)
+sub _has ($$)
 {
   my ($self, $cond) = @_;
   return exists $self->{'hash'}{$cond};
@@ -289,7 +292,7 @@ Return 1 iff this condition is always false.
 sub false ($ )
 {
   my ($self) = @_;
-  return $self->has ('FALSE');
+  return $self->_has ('FALSE');
 }
 
 =item C<$cond-E<gt>true>
@@ -426,7 +429,7 @@ sub true_when ($$)
   # exists in $WHEN.
   foreach my $cond ($self->conds)
     {
-      return 0 unless $when->has ($cond);
+      return 0 unless $when->_has ($cond);
     }
   return 1;
 }
@@ -518,6 +521,8 @@ sub multiply ($@)
   return (values %res);
 }
 
+=back
+
 =head2 Other helper functions
 
 =over 4
@@ -615,6 +620,8 @@ sub conditional_negate ($)
   return $cond;
 }
 
+=back
+
 =head1 SEE ALSO
 
 L<Automake::DisjConditions>.
index 646fad3..4f0e445 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2003, 2005, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 2006, 2009, 2010 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
@@ -49,6 +50,20 @@ Automake::Configure_ac - Locate configure.ac or configure.in.
   my $file_name = find_configure_ac ($dir);
   my $file_name = require_configure_ac ($dir);
 
+=over 4
+
+=back
+
+=head2 Functions
+
+=over 4
+
+=item C<$configure_ac = find_configure_ac ([$directory])>
+
+Find a F<configure.ac> or F<configure.in> file in C<$directory>,
+defaulting to the current directory.  Complain if both files are present.
+Return the name of the file found, or the former if neither is present.
+
 =cut
 
 sub find_configure_ac (;@)
@@ -66,7 +81,7 @@ sub find_configure_ac (;@)
        {
          msg ('unsupported',
               "`$configure_ac' and `$configure_in' both present.\n"
-              . "proceeding with `$configure_ac'.");
+              . "proceeding with `$configure_ac'");
        }
       return $configure_ac
     }
@@ -78,6 +93,12 @@ sub find_configure_ac (;@)
 }
 
 
+=item C<$configure_ac = require_configure_ac ([$directory])>
+
+Like C<find_configure_ac>, but fail if neither is present.
+
+=cut
+
 sub require_configure_ac (;$)
 {
   my $res = find_configure_ac (@_);
index 613dc80..1dc81dc 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2008, 2009  Free Software Foundation, Inc.
 
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -50,7 +50,7 @@ Automake::Location - a class for location tracking, with a stack of contexts
       ...
     }
 
-  # Pop a context, and reset the location from the previous context.
+  # Pop a context, and reset the location to the previous context.
   $where->pop_context;
 
   # Clone a Location.  Use this when storing the state of a location
@@ -84,6 +84,16 @@ You can pass a C<Location> to C<Automake::Channels::msg>.
 
 =cut
 
+=head2 Methods
+
+=over
+
+=item C<$where = new Automake::Location ([$position])>
+
+Create and return a new Location object.
+
+=cut
+
 sub new ($;$)
 {
   my ($class, $position) = @_;
@@ -95,18 +105,36 @@ sub new ($;$)
   return $self;
 }
 
+=item C<$location-E<gt>set ($position)>
+
+Change the location to be C<$position>.
+
+=cut
+
 sub set ($$)
 {
   my ($self, $position) = @_;
   $self->{'position'} = $position;
 }
 
+=item C<$location-E<gt>get>
+
+Get the location (without context).
+
+=cut
+
 sub get ($)
 {
   my ($self) = @_;
   return $self->{'position'};
 }
 
+=item C<$location-E<gt>push_context ($context)>
+
+Push a context to the location.
+
+=cut
+
 sub push_context ($$)
 {
   my ($self, $context) = @_;
@@ -114,6 +142,12 @@ sub push_context ($$)
   $self->set (undef);
 }
 
+=item C<$where = $location-E<gt>pop_context ($context)>
+
+Pop a context, and reset the location to the previous context.
+
+=cut
+
 sub pop_context ($)
 {
   my ($self) = @_;
@@ -122,12 +156,25 @@ sub pop_context ($)
   return @{$pair};
 }
 
+=item C<@contexts = $location-E<gt>get_contexts>
+
+Return the array of contexts.
+
+=cut
+
 sub get_contexts ($)
 {
   my ($self) = @_;
   return @{$self->{'contexts'}};
 }
 
+=item C<$location = $location-E<gt>clone>
+
+Clone a Location.  Use this when storing the state of a location
+that would otherwise be modified.
+
+=cut
+
 sub clone ($)
 {
   my ($self) = @_;
@@ -140,6 +187,12 @@ sub clone ($)
   return $other;
 }
 
+=item C<$res = $location-E<gt>dump>
+
+Print the location and the stack of context (for debugging).
+
+=cut
+
 sub dump ($)
 {
   my ($self) = @_;
@@ -152,6 +205,13 @@ sub dump ($)
   return $res;
 }
 
+=item C<@array = $location-E<gt>serialize>
+
+Serialize a Location object (for passing through a thread queue,
+for example).
+
+=cut
+
 sub serialize ($)
 {
   my ($self) = @_;
@@ -166,6 +226,12 @@ sub serialize ($)
   return @serial;
 }
 
+=item C<new Automake::Location::deserialize ($queue)>
+
+De-serialize: recreate a Location object from a queue.
+
+=cut
+
 sub deserialize ($)
 {
   my ($queue) = @_;
@@ -179,6 +245,8 @@ sub deserialize ($)
   return $self;
 }
 
+=back
+
 =head1 SEE ALSO
 
 L<Automake::Channels>
index 0858b68..e4c2572 100644 (file)
@@ -64,10 +64,9 @@ do_subst = in=`echo $@ | sed 's/\.[^.]*$$//'`; sed \
 ## $(datadir) or other do_subst'ituted variables change.
 ## Use chmod a-w to prevent people from editing the wrong file by accident.
 Config.pm: Config.in Makefile
-       rm -f Config.tmp Config.pm
-       $(do_subst) $(srcdir)/Config.in >Config.tmp
-       chmod +x Config.tmp
-       chmod a-w Config.tmp
-       mv -f Config.tmp Config.pm
+       $(AM_V_GEN)rm -f Config.tmp Config.pm
+       $(AM_V_at)$(do_subst) $(srcdir)/Config.in >Config.tmp
+       $(AM_V_at)chmod a-w Config.tmp
+       $(AM_V_at)mv -f Config.tmp Config.pm
 
 EXTRA_DIST = Config.in
index e068ab8..b79c132 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -134,6 +140,7 @@ am__relativize = \
   reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -406,6 +413,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -469,6 +480,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -630,17 +655,18 @@ ps-am:
 
 uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive 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 \
-       ctags-recursive distclean distclean-generic distclean-tags \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am \
-       install-dist_perllibDATA install-dvi install-dvi-am \
-       install-exec install-exec-am install-html install-html-am \
-       install-info install-info-am install-man \
+       all all-am check check-am clean clean-generic cscopelist \
+       cscopelist-recursive ctags ctags-recursive distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-dist_perllibDATA install-dvi \
+       install-dvi-am install-exec install-exec-am install-html \
+       install-html-am install-info install-info-am install-man \
        install-nodist_perllibDATA install-pdf install-pdf-am \
        install-ps install-ps-am install-strip installcheck \
        installcheck-am installdirs installdirs-am maintainer-clean \
@@ -650,11 +676,10 @@ uninstall-am: uninstall-dist_perllibDATA uninstall-nodist_perllibDATA
 
 
 Config.pm: Config.in Makefile
-       rm -f Config.tmp Config.pm
-       $(do_subst) $(srcdir)/Config.in >Config.tmp
-       chmod +x Config.tmp
-       chmod a-w Config.tmp
-       mv -f Config.tmp Config.pm
+       $(AM_V_GEN)rm -f Config.tmp Config.pm
+       $(AM_V_at)$(do_subst) $(srcdir)/Config.in >Config.tmp
+       $(AM_V_at)chmod a-w Config.tmp
+       $(AM_V_at)mv -f Config.tmp Config.pm
 
 # 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.
index 9543aa5..a6d65a8 100644 (file)
@@ -260,7 +260,7 @@ 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-xz'
+            || $_ eq 'dist-lzip' || $_ 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'
@@ -369,7 +369,7 @@ sub set_strictness ($)
     }
   else
     {
-      prog_error "level `$strictness_name' not recognized\n";
+      prog_error "level `$strictness_name' not recognized";
     }
 }
 
index 68b3ea5..d9d9ae0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2006, 2007, 2010  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
@@ -615,7 +615,8 @@ sub define ($$$$$)
          msg ('obsolete', $tdef->location,
               "deprecated feature: target `$noexe' overrides "
               . "`$noexe\$(EXEEXT)'\n"
-              . "change your target to read `$noexe\$(EXEEXT)'");
+              . "change your target to read `$noexe\$(EXEEXT)'",
+              partial => 1);
          msg ('obsolete', $where, "target `$target' was defined here");
        }
       # Don't `return ()' now, as this might hide target clashes
@@ -657,7 +658,7 @@ sub define ($$$$$)
                  ## is legitimate. (This is phony.test.)
 
                  # msg ('syntax', $where,
-                 #      "redefinition of `$target'$condmsg...", partial => 1);
+                 #      "redefinition of `$target'$condmsg ...", partial => 1);
                  # msg_cond_rule ('syntax', $cond, $target,
                  #                "... `$target' previously defined here");
                }
@@ -693,7 +694,7 @@ sub define ($$$$$)
 
              msg_cond_rule ('override', $cond, $target,
                             "user target `$target' defined here"
-                            . "$condmsg...", partial => 1);
+                            . "$condmsg ...", partial => 1);
              msg ('override', $where,
                   "... overrides Automake target `$oldname' defined here",
                   partial => $hint);
@@ -717,7 +718,7 @@ sub define ($$$$$)
              my $oldsource = $tdef->source;
              return () if $source eq $oldsource && $target eq $oldname;
 
-             msg ('syntax', $where, "redefinition of `$target'$condmsg...",
+             msg ('syntax', $where, "redefinition of `$target'$condmsg ...",
                   partial => 1);
              msg_cond_rule ('syntax', $cond, $target,
                             "... `$oldname' previously defined here");
@@ -725,7 +726,7 @@ sub define ($$$$$)
            }
        }
       # Never reached.
-      prog_error ("Unreachable place reached.");
+      prog_error ("unreachable place reached");
     }
 
   # Conditions for which the rule should be defined.
@@ -817,7 +818,7 @@ sub define ($$$$$)
   # definitions of multiple inference rules.  It's also
   # disallowed to mix plain targets with inference rules.
   msg ('portability', $where,
-       "Inference rules can have only one target before the colon (POSIX).")
+       "inference rules can have only one target before the colon (POSIX)")
     if $inference_rule_count > 0 && $target_count > 1;
 
   return @conds;
index 20bc106..3bd506d 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -36,6 +36,7 @@ Automake::RuleDef - a class for rule definitions
 =head1 DESCRIPTION
 
 This class gathers data related to one Makefile-rule definition.
+It shouldn't be needed outside of F<Rule.pm>.
 
 =head2 Constants
 
@@ -50,6 +51,20 @@ Possible owners for rules.
 use constant RULE_AUTOMAKE => 0; # Rule defined by Automake.
 use constant RULE_USER => 1;     # Rule defined in the user's Makefile.am.
 
+=back
+
+=head2 Methods
+
+=over 4
+
+=item C<new Automake::RuleDef ($name, $comment, $location, $owner, $source)>
+
+Create a new rule definition with target C<$name>, with associated comment
+C<$comment>, Location C<$location> and owner C<$owner>, defined in file
+C<$source>.
+
+=cut
+
 sub new ($$$$$)
 {
   my ($class, $name, $comment, $location, $owner, $source) = @_;
@@ -60,12 +75,24 @@ sub new ($$$$$)
   return $self;
 }
 
+=item C<$source = $rule-E<gt>source>
+
+Return the source of the rule.
+
+=cut
+
 sub source ($)
 {
   my ($self) = @_;
   return $self->{'source'};
 }
 
+=item C<$name = $rule-E<gt>name>
+
+Return the name of the rule.
+
+=cut
+
 sub name ($)
 {
   my ($self) = @_;
index d7ba155..7d10bb6 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2004, 2006  Free Software Foundation, Inc.
+# Copyright (C) 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
@@ -204,6 +204,8 @@ sub append ($$$)
 
 =item C<$def-E<gt>value>
 
+=item C<$def-E<gt>raw_value>
+
 =item C<$def-E<gt>type>
 
 =item C<$def-E<gt>pretty>
index 3261360..f75ec10 100644 (file)
@@ -470,7 +470,7 @@ sub _check_ambiguous_condition ($$$)
   # We allow silent variables to be overridden silently,
   # by either silent or non-silent variables.
   my $def = $self->def ($ambig_cond);
-  if ($message && !($def && $def->pretty == VAR_SILENT))
+  if ($message && $def->pretty != VAR_SILENT)
     {
       msg 'syntax', $where, "$message ...", partial => 1;
       msg_var ('syntax', $var, "... `$var' previously defined here");
@@ -881,10 +881,10 @@ sub define ($$$$$$$$)
        {
          error ($def->location,
                 "Automake variable `$var' was set with `"
-                . $def->type . "=' here...", partial => 1);
+                . $def->type . "=' here ...", partial => 1);
          error ($where, "... and is now set with `$type=' here.");
          prog_error ("Automake variable assignments should be consistently\n"
-                     . "defined with the same sign.");
+                     . "defined with the same sign");
        }
 
       # If Automake tries to override a value specified by the user,
@@ -896,7 +896,7 @@ sub define ($$$$$$$$)
              my $condmsg = ($cond == TRUE
                             ? '' : (" in condition `" . $cond->human . "'"));
              msg_cond_var ('override', $cond, $var,
-                           "user variable `$var' defined here$condmsg...",
+                           "user variable `$var' defined here$condmsg ...",
                            partial => 1);
              msg ('override', $where,
                   "... overrides Automake variable `$var' defined here");
@@ -996,10 +996,10 @@ sub define ($$$$$$$$)
          if (! $undef_cond->false)
            {
              error ($where,
-                    "Cannot apply `+=' because `$var' is not defined "
+                    "cannot apply `+=' because `$var' is not defined "
                     . "in\nthe following conditions:\n  "
                     . join ("\n  ", map { $_->human } $undef_cond->conds)
-                    . "\nEither define `$var' in these conditions,"
+                    . "\neither define `$var' in these conditions,"
                     . " or use\n`+=' in the same conditions as"
                     . " the definitions.");
            }
@@ -1078,7 +1078,7 @@ For debugging.
 
 sub variables_dump ()
 {
-  my $text = "All variables:\n{\n";
+  my $text = "all variables:\n{\n";
   foreach my $var (sort { $a->name cmp $b->name } variables)
     {
       $text .= $var->dump;
index 66213d1..59b3e5a 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2003, 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
@@ -48,10 +48,10 @@ maximum length allowed.  (Ticket #17141, fixed in Perl 5.8.0.)
 
 =cut
 
-# tab_length ($TXT)
-# -----------------
+# _tab_length ($TXT)
+# ------------------
 # Compute the length of TXT, counting tab characters as 8 characters.
-sub tab_length($)
+sub _tab_length($)
 {
   my ($txt) = @_;
   my $len = length ($txt);
@@ -78,16 +78,16 @@ sub wrap($$$$@)
   my ($head, $fill, $eol, $max_len, @values) = @_;
 
   my $result = $head;
-  my $column = tab_length ($head);
+  my $column = _tab_length ($head);
 
-  my $fill_len = tab_length ($fill);
-  my $eol_len = tab_length ($eol);
+  my $fill_len = _tab_length ($fill);
+  my $eol_len = _tab_length ($eol);
 
   my $not_first_word = 0;
 
   foreach (@values)
     {
-      my $len = tab_length ($_);
+      my $len = _tab_length ($_);
 
       # See if the new variable fits on this line.
       # (The + 1 is for the space we add in front of the value.).
index 7c8f5eb..67298f9 100644 (file)
@@ -68,18 +68,6 @@ 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>.
 
-=head1 SEE ALSO
-
-L<perlfunc>,
-L<perlop/"I/O Operators">,
-L<IO::File>
-L<IO::Handle>
-L<IO::Seekable>
-
-=head1 HISTORY
-
-Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
-
 =cut
 
 require 5.000;
@@ -110,12 +98,16 @@ eval {
   push (@EXPORT, @O);
 };
 
-# Used in croak error messages.
-my $me = basename ($0);
+=head2 Methods
+
+=over
+
+=item C<$fh = new Automake::XFile ([$expr, ...]>
 
-################################################
-## Constructor
-##
+Constructor a new XFile object.  Additional arguments
+are passed to C<open>, if any.
+
+=cut
 
 sub new
 {
@@ -129,9 +121,12 @@ sub new
   $fh;
 }
 
-################################################
-## Open
-##
+=item C<$fh-E<gt>open ([$file, ...])>
+
+Open a file, passing C<$file> and further arguments to C<IO::File::open>.
+Die if opening fails.  Store the name of the file.  Use binmode for writing.
+
+=cut
 
 sub open
 {
@@ -156,9 +151,11 @@ sub open
   binmode $fh if $file =~ /^\s*>/;
 }
 
-################################################
-## Close
-##
+=item C<$fh-E<gt>close>
+
+Close the file, handling errors.
+
+=cut
 
 sub close
 {
@@ -172,9 +169,12 @@ sub close
     }
 }
 
-################################################
-## Getline
-##
+=item C<$line = $fh-E<gt>getline>
+
+Read and return a line from the file.  Ensure C<\r\n> is translated to
+C<\n> on input files.
+
+=cut
 
 # Some Win32/perl installations fail to translate \r\n to \n on input
 # so we do that here.
@@ -187,9 +187,11 @@ sub getline
   return $_;
 }
 
-################################################
-## Getlines
-##
+=item C<@lines = $fh-E<gt>getlines>
+
+Slurp lines from the files.
+
+=cut
 
 sub getlines
 {
@@ -199,9 +201,11 @@ sub getlines
   return @res;
 }
 
-################################################
-## Name
-##
+=item C<$name = $fh-E<gt>name>
+
+Return the name of the file.
+
+=cut
 
 sub name
 {
@@ -209,9 +213,13 @@ sub name
   return ${*$fh}{'autom4te_xfile_file'};
 }
 
-################################################
-## Lock
-##
+=item C<$fh-E<gt>lock>
+
+Lock the file using C<flock>.  If locking fails for reasons other than
+C<flock> being unsupported, then error out if C<$ENV{'MAKEFLAGS'}> indicates
+that we are spawned from a parallel C<make>.
+
+=cut
 
 sub lock
 {
@@ -243,9 +251,11 @@ sub lock
     }
 }
 
-################################################
-## Seek
-##
+=item C<$fh-E<gt>seek ($position, [$whence])>
+
+Seek file to C<$position>.  Die if seeking fails.
+
+=cut
 
 sub seek
 {
@@ -254,13 +264,15 @@ sub seek
   if (!seek ($fh, $_[0], $_[1]))
     {
       my $file = $fh->name;
-      fatal "$me: cannot rewind $file with @_: $!";
+      fatal "cannot rewind $file with @_: $!";
     }
 }
 
-################################################
-## Truncate
-##
+=item C<$fh-E<gt>truncate ($len)>
+
+Truncate the file to length C<$len>.  Die on failure.
+
+=cut
 
 sub truncate
 {
@@ -272,6 +284,22 @@ sub truncate
     }
 }
 
+=back
+
+=head1 SEE ALSO
+
+L<perlfunc>,
+L<perlop/"I/O Operators">,
+L<IO::File>
+L<IO::Handle>
+L<IO::Seekable>
+
+=head1 HISTORY
+
+Derived from IO::File.pm by Akim Demaille E<lt>F<akim@freefriends.org>E<gt>.
+
+=cut
+
 1;
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
diff --git a/lib/Automake/tests/Cond2.pl b/lib/Automake/tests/Cond2.pl
new file mode 100644 (file)
index 0000000..4ad0e1c
--- /dev/null
@@ -0,0 +1,6 @@
+# Catch common programming error:
+# A Condition passed as a string to 'new'.
+use Automake::Condition;
+
+my $cond = new Automake::Condition ('TRUE');
+new Automake::Condition ($cond);
diff --git a/lib/Automake/tests/Cond3.pl b/lib/Automake/tests/Cond3.pl
new file mode 100644 (file)
index 0000000..dc957af
--- /dev/null
@@ -0,0 +1,6 @@
+# Catch common programming error:
+# A Condition passed as a string to 'new'.
+use Automake::Condition;
+
+my $cond = new Automake::Condition ("COND1_TRUE");
+new Automake::Condition ("$cond");
index 06eb34e..99004ac 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009  Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +19,8 @@
 BEGIN {
   use Config;
   if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads})
+      && $Config{useithreads}
+      && !$ENV{WANT_NO_THREADS})
     {
       require threads;
       import threads;
@@ -32,15 +34,15 @@ 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@'],
+  my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string, human]
+              [[], 1, 0, 'TRUE', '', 'TRUE'],
+              [['TRUE'], 1, 0, 'TRUE', '', 'TRUE'],
+              [['FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+              [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@', 'A'],
               [['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', '#']);
+               0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@', 'A and !B'],
+              [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+              [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#', 'FALSE']);
 
   for (@tests)
     {
@@ -53,6 +55,7 @@ sub test_basics ()
          return 1 if $_->[2] != ($a == FALSE);
          return 1 if $_->[3] ne $a->string;
          return 1 if $_->[4] ne $a->subst_string;
+         return 1 if $_->[5] ne $a->human;
        })->join;
     }
   return 0;
@@ -281,7 +284,33 @@ sub test_reduce_or ()
   return $failed;
 }
 
-exit (test_basics || test_true_when || test_reduce_and || test_reduce_or);
+sub test_merge ()
+{
+  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 $both = $cond->merge ($other);
+       return threads->new(sub {
+         my $both2 = $cond->merge_conds ("COND3_FALSE");
+         return threads->new(sub {
+           $cond = $both->strip ($other);
+           my @conds = $cond->conds;
+           return 1 if $both->string ne "COND1_TRUE COND2_FALSE COND3_FALSE";
+           return 1 if $cond->string ne "COND1_TRUE COND2_FALSE";
+           return 1 if $both != $both2;
+         })->join;
+       })->join;
+      })->join;
+    })->join;
+  return 0;
+}
+
+exit (test_basics
+      || test_true_when
+      || test_reduce_and
+      || test_reduce_or
+      || test_merge);
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
index 86f1745..e330e53 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2009  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -19,15 +19,15 @@ 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@'],
+  my @tests = (# [[Conditions], is_true?, is_false?, string, subst-string, human]
+              [[], 1, 0, 'TRUE', '', 'TRUE'],
+              [['TRUE'], 1, 0, 'TRUE', '', 'TRUE'],
+              [['FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+              [['A_TRUE'], 0, 0, 'A_TRUE', '@A_TRUE@', 'A'],
               [['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', '#']);
+               0, 0, 'A_TRUE B_FALSE', '@A_TRUE@@B_FALSE@', 'A and !B'],
+              [['B_TRUE', 'FALSE'], 0, 1, 'FALSE', '#', 'FALSE'],
+              [['B_TRUE', 'B_FALSE'], 0, 1, 'FALSE', '#', 'FALSE']);
 
   for (@tests)
     {
@@ -38,6 +38,7 @@ sub test_basics ()
       return 1 if $_->[2] != ($a == FALSE);
       return 1 if $_->[3] ne $a->string;
       return 1 if $_->[4] ne $a->subst_string;
+      return 1 if $_->[5] ne $a->human;
     }
   return 0;
 }
@@ -240,7 +241,25 @@ sub test_reduce_or ()
   return $failed;
 }
 
-exit (test_basics || test_true_when || test_reduce_and || test_reduce_or);
+sub test_merge ()
+{
+  my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
+  my $other = new Automake::Condition "COND3_FALSE";
+  my $both = $cond->merge ($other);
+  my $both2 = $cond->merge_conds ("COND3_FALSE");
+  $cond = $both->strip ($other);
+  my @conds = $cond->conds;
+  return 1 if $both->string ne "COND1_TRUE COND2_FALSE COND3_FALSE";
+  return 1 if $cond->string ne "COND1_TRUE COND2_FALSE";
+  return 1 if $both != $both2;
+  return 0;
+}
+
+exit (test_basics
+      || test_true_when
+      || test_reduce_and
+      || test_reduce_or
+      || test_merge);
 
 ### Setup "GNU" style for perl-mode and cperl-mode.
 ## Local Variables:
diff --git a/lib/Automake/tests/DisjCon2.pl b/lib/Automake/tests/DisjCon2.pl
new file mode 100644 (file)
index 0000000..9edd8d5
--- /dev/null
@@ -0,0 +1,8 @@
+# Catch common programming error:
+# A non-Condition reference passed to new.
+use Automake::Condition;
+use Automake::DisjConditions;
+
+my $cond = new Automake::Condition ('TRUE');
+my $cond2 = new Automake::DisjConditions ($cond);
+new Automake::DisjConditions ($cond2);
diff --git a/lib/Automake/tests/DisjCon3.pl b/lib/Automake/tests/DisjCon3.pl
new file mode 100644 (file)
index 0000000..8e69e2b
--- /dev/null
@@ -0,0 +1,7 @@
+# Catch common programming error:
+# A non-reference passed to new.
+use Automake::Condition qw/TRUE FALSE/;
+use Automake::DisjConditions;
+
+my $cond = new Automake::Condition ("COND1_TRUE");
+new Automake::DisjConditions ("$cond");
index 2fe275b..4df5112 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009  Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -18,7 +19,8 @@
 BEGIN {
   use Config;
   if (eval { require 5.007_002; }      # for CLONE support
-      && $Config{useithreads})
+      && $Config{useithreads}
+      && !$ENV{WANT_NO_THREADS})
     {
       require threads;
       import threads;
@@ -33,18 +35,44 @@ use Automake::DisjConditions;
 
 sub test_basics ()
 {
+  my $true = new Automake::DisjConditions TRUE;
+  my $false = new Automake::DisjConditions FALSE;
   my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
   return threads->new (sub {
     my $other = new Automake::Condition "COND3_FALSE";
+    my $another = new Automake::Condition "COND3_TRUE", "COND4_FALSE";
     return threads->new (sub {
       my $set1 = new Automake::DisjConditions $cond, $other;
       return threads->new (sub {
        my $set2 = new Automake::DisjConditions $other, $cond;
+       my $set3 = new Automake::DisjConditions FALSE, $another;
        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;
+       return 1 unless $true->human eq 'TRUE';
+       return 1 unless $false->human eq 'FALSE';
+       return 1 unless $set1->human eq "(COND1 and !COND2) or (!COND3)";
+       return 1 unless $set2->human eq "(COND1 and !COND2) or (!COND3)";
+       my $one_cond_human = $set1->one_cond->human;
+       return 1 unless $one_cond_human eq "!COND3"
+                       || $one_cond_human eq "COND1 and !COND2";
+       return 1 unless $set1->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+
+       my $merged1 = $set1->merge ($set2);
+       my $merged2 = $set1->merge ($cond);
+       my $mult1 = $set1->multiply ($set3);
+       return threads->new (sub {
+         my $mult2 = $set1->multiply ($another);
+         return threads->new (sub {
+           return 1 unless $merged1->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+           return 1 unless $merged2->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+           return 1 unless $mult1->string eq "COND1_TRUE COND2_FALSE COND3_TRUE COND4_FALSE";
+           return 1 unless $mult1 == $mult2;
+           return 0;
+         })->join;
+       })->join;
       })->join;
     })->join;
   })->join;
index 47dea83..7ccac13 100644 (file)
@@ -1,4 +1,5 @@
-# Copyright (C) 2001, 2002, 2003, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2008, 2009  Free Software Foundation,
+# Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -20,15 +21,38 @@ use Automake::DisjConditions;
 
 sub test_basics ()
 {
+  my $true = new Automake::DisjConditions TRUE;
+  my $false = new Automake::DisjConditions FALSE;
   my $cond = new Automake::Condition "COND1_TRUE", "COND2_FALSE";
   my $other = new Automake::Condition "COND3_FALSE";
+  my $another = new Automake::Condition "COND3_TRUE", "COND4_FALSE";
   my $set1 = new Automake::DisjConditions $cond, $other;
   my $set2 = new Automake::DisjConditions $other, $cond;
+  my $set3 = new Automake::DisjConditions FALSE, $another;
   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;
+  return 1 unless $true->human eq 'TRUE';
+  return 1 unless $false->human eq 'FALSE';
+  return 1 unless $set1->human eq "(COND1 and !COND2) or (!COND3)";
+  return 1 unless $set2->human eq "(COND1 and !COND2) or (!COND3)";
+  my $one_cond_human = $set1->one_cond->human;
+  return 1 unless $one_cond_human eq "!COND3"
+                  || $one_cond_human eq "COND1 and !COND2";
+  return 1 unless $set1->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+
+  my $merged1 = $set1->merge ($set2);
+  my $merged2 = $set1->merge ($cond);
+  my $mult1 = $set1->multiply ($set3);
+  my $mult2 = $set1->multiply ($another);
+  return 1 unless $merged1->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+  return 1 unless $merged2->simplify->string eq "COND1_TRUE COND2_FALSE | COND3_FALSE";
+  return 1 unless $mult1->string eq "COND1_TRUE COND2_FALSE COND3_TRUE COND4_FALSE";
+  return 1 unless $mult1 == $mult2;
+
+  return 0;
 }
 
 sub build_set (@)
index c5e53d2..b4f09f1 100644 (file)
@@ -22,9 +22,23 @@ TEST_EXTENSIONS = .pl
 TESTS = \
 Condition.pl \
 Condition-t.pl \
+Cond2.pl \
+Cond3.pl \
 DisjConditions.pl \
 DisjConditions-t.pl \
+DisjCon2.pl \
+DisjCon3.pl \
 Version.pl \
+Version2.pl \
+Version3.pl \
 Wrap.pl
 
+XFAIL_TESTS = \
+Cond2.pl \
+Cond3.pl \
+DisjCon2.pl \
+DisjCon3.pl \
+Version2.pl \
+Version3.pl
+
 EXTRA_DIST = $(TESTS)
index 1401eb9..34e58db 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -55,14 +55,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 # If stdout is a non-dumb tty, use colors.  If test -t is not supported,
@@ -150,6 +156,7 @@ TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -244,11 +251,25 @@ TEST_EXTENSIONS = .pl
 TESTS = \
 Condition.pl \
 Condition-t.pl \
+Cond2.pl \
+Cond3.pl \
 DisjConditions.pl \
 DisjConditions-t.pl \
+DisjCon2.pl \
+DisjCon3.pl \
 Version.pl \
+Version2.pl \
+Version3.pl \
 Wrap.pl
 
+XFAIL_TESTS = \
+Cond2.pl \
+Cond3.pl \
+DisjCon2.pl \
+DisjCon3.pl \
+Version2.pl \
+Version3.pl
+
 EXTRA_DIST = $(TESTS)
 all: all-am
 
@@ -290,6 +311,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
@@ -442,6 +465,7 @@ recheck recheck-html:
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 .pl.log:
        @p='$<'; $(am__check_pre) $(PL_LOG_COMPILE) "$$tst" $(am__check_post)
index e496435..bea91f0 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2009  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -42,6 +42,29 @@ sub test_version_compare
     print "compare (\"$left\", \"$right\") = $res! (not $result?)\n";
     $failed = 1;
   }
+
+  my $check_expected = ($result == 0 || $result == 1) ? 0 : 1;
+  # Exception for 'foo' fork.
+  $check_expected = 1
+    if ($right =~ /foo/ && !($left =~ /foo/));
+
+  my $check = Automake::Version::check ($left, $right);
+  if ($check != $check_expected)
+  {
+    print "check (\"$left\", \"$right\") = $check! (not $check_expected?)\n";
+    $failed = 1;
+  }
+}
+
+sub test_bad_versions
+{
+  my ($ver) = @_;
+  my @version = Automake::Version::split ($ver);
+  if ($#version != -1)
+  {
+    print "shouldn't grok \"$ver\"\n";
+    $failed = 1;
+  }
 }
 
 my @tests = (
@@ -69,15 +92,24 @@ my @tests = (
   ['1.5a', '1.5.1f', 1],
   ['1.5', '1.5.1a', -1],
   ['1.5.1a', '1.5.1f', -1],
+  ['1.5.1f', '1.5.1a', 1],
+  ['1.5.1f', '1.5.1f', 0],
 # special exceptions
   ['1.6-p5a', '1.6.5a', 0],
   ['1.6', '1.6-p5a', -1],
   ['1.6-p4b', '1.6-p5a', -1],
   ['1.6-p4b', '1.6-foo', 1],
-  ['1.6-p4b', '1.6a-foo', -1]
+  ['1.6-p4b', '1.6a-foo', -1],
+  ['1.6-p5', '1.6.5', 0],
+  ['1.6a-foo', '1.6a-foo', 0],
+);
+
+my @bad_versions = (
+  '', 'a', '1', '1a', '1.2.3.4', '-1.2'
 );
 
 test_version_compare (@{$_}) foreach @tests;
+test_bad_versions ($_) foreach @bad_versions;
 
 exit $failed;
 
diff --git a/lib/Automake/tests/Version2.pl b/lib/Automake/tests/Version2.pl
new file mode 100644 (file)
index 0000000..038466d
--- /dev/null
@@ -0,0 +1,5 @@
+# prog_error due to invalid $VERSION.
+
+use Automake::Version;
+
+Automake::Version::check ('', '1.2.3');
diff --git a/lib/Automake/tests/Version3.pl b/lib/Automake/tests/Version3.pl
new file mode 100644 (file)
index 0000000..ebac23f
--- /dev/null
@@ -0,0 +1,5 @@
+# prog_error due to invalid $REQUIRED.
+
+use Automake::Version;
+
+Automake::Version::check ('1.2.3', '');
index 8d840fc..b415401 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2009  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -15,7 +15,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/>.
 
-use Automake::Wrap 'wrap';
+use Automake::Wrap qw/wrap makefile_wrap/;
 
 my $failed = 0;
 
@@ -31,6 +31,18 @@ sub test_wrap
     }
 }
 
+sub test_makefile_wrap
+{
+  my ($in, $exp_out) = @_;
+
+  my $out = &makefile_wrap (@$in);
+  if ($out ne $exp_out)
+    {
+      print STDERR "For: @$in\nGot:\n$out\nInstead of:\n$exp_out\n---\n";
+      ++$failed;
+    }
+}
+
 my @tests = (
   [["HEAD:", "NEXT:", "CONT", 13, "v" ,"a", "l", "ue", "s", "values"],
 "HEAD:v aCONT
@@ -55,10 +67,32 @@ big continuation:diag3
 "big header: END
 cont: word1 END
 cont: word2
+"],
+  [["big header:", "", " END", 16, "w1", "w2 ", "w3"],
+"big header: END
+w1 w2 w3
 "]);
 
+my @makefile_tests = (
+  [["target:"],
+"target:
+"],
+  [["target:", "\t"],
+"target:
+"],
+  [["target:", "\t", "prereq1", "prereq2"],
+"target: prereq1 prereq2
+"],
+  [["target: ", "\t", "this is a long list of prerequisites ending in space",
+    "so that there is no need for another space before the backslash",
+    "unlike in the second line"],
+"target: this is a long list of prerequisites ending in space \\
+\tso that there is no need for another space before the backslash \\
+\tunlike in the second line
+"]);
 
 test_wrap (@{$_}) foreach @tests;
+test_makefile_wrap (@{$_}) foreach @makefile_tests;
 
 exit $failed;
 
index 9307cab..4eef937 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -61,14 +61,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 RECURSIVE_TARGETS = all-recursive check-recursive dvi-recursive \
@@ -137,6 +143,7 @@ am__relativize = \
   reldir="$$dir2"
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -378,6 +385,10 @@ ctags-recursive:
        list='$(SUBDIRS)'; for subdir in $$list; do \
          test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) ctags); \
        done
+cscopelist-recursive:
+       list='$(SUBDIRS)'; for subdir in $$list; do \
+         test "$$subdir" = . || ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) cscopelist); \
+       done
 
 ID: $(HEADERS) $(SOURCES) $(LISP) $(TAGS_FILES)
        list='$(SOURCES) $(HEADERS) $(LISP) $(TAGS_FILES)'; \
@@ -441,6 +452,20 @@ GTAGS:
          && $(am__cd) $(top_srcdir) \
          && gtags -i $(GTAGS_ARGS) "$$here"
 
+cscopelist: cscopelist-recursive $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
 
@@ -602,22 +627,24 @@ ps-am:
 
 uninstall-am: uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
 
-.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) ctags-recursive \
-       install-am install-data-am install-strip tags-recursive
+.MAKE: $(RECURSIVE_CLEAN_TARGETS) $(RECURSIVE_TARGETS) \
+       cscopelist-recursive 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 \
-       ctags-recursive distclean distclean-generic distclean-tags \
-       distdir dvi dvi-am html html-am info info-am install \
-       install-am install-data install-data-am install-data-hook \
-       install-dist_pkgvdataDATA install-dist_scriptDATA 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 installcheck-local \
-       installdirs installdirs-am maintainer-clean \
-       maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
-       pdf-am ps ps-am tags tags-recursive uninstall uninstall-am \
+       all all-am check check-am clean clean-generic cscopelist \
+       cscopelist-recursive ctags ctags-recursive distclean \
+       distclean-generic distclean-tags distdir dvi dvi-am html \
+       html-am info info-am install install-am install-data \
+       install-data-am install-data-hook install-dist_pkgvdataDATA \
+       install-dist_scriptDATA 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 installcheck-local installdirs \
+       installdirs-am maintainer-clean maintainer-clean-generic \
+       mostlyclean mostlyclean-generic pdf pdf-am ps ps-am tags \
+       tags-recursive uninstall uninstall-am \
        uninstall-dist_pkgvdataDATA uninstall-dist_scriptDATA
 
 
index 8924d17..acc5d9a 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -94,6 +100,7 @@ DATA = $(dist_am_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -285,6 +292,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
index 755bf13..e519391 100644 (file)
@@ -291,6 +291,9 @@ recheck recheck-html:
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+## This apparently useless munging helps to avoid a nasty bug (a
+## segmentation fault!) on Solaris XPG4 make.
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 
 .PHONY: recheck recheck-html
index 08de45c..37f34ca 100644 (file)
@@ -1,5 +1,5 @@
 ## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006
+## Copyright (C) 1994, 1995, 1996, 1997, 2000, 2001, 2003, 2006, 2010
 ## Free Software Foundation, Inc.
 
 ## This program is free software; you can redistribute it and/or modify
@@ -73,7 +73,7 @@ check-DEJAGNU: site.exp
 ## the possibility of a corrupted site.exp if make is interrupted.
 ## Jim Meyering has some useful text on this topic.
 site.exp: Makefile
-       @echo 'Making a new site.exp file...'
+       @echo 'Making a new site.exp file ...'
        @echo '## these variables are automatically generated by make ##' >site.tmp
        @echo '# Do not edit here.  If you wish to override these values' >>site.tmp
        @echo '# edit the last section' >>site.tmp
index d88656c..fd82838 100644 (file)
@@ -26,7 +26,7 @@ am__remove_distdir = \
   { test ! -d "$(distdir)" \
     || { find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \
          && rm -fr "$(distdir)"; }; }
-
+am__post_remove_distdir = $(am__remove_distdir)
 endif %?TOPDIR_P%
 
 if %?SUBDIRS%
@@ -328,6 +328,10 @@ endif %?TOPDIR_P%
 ## with tar 1.11.2).  We do not do anything specific w.r.t. this
 ## incompatibility since packages where empty directories need to be
 ## present in the archive are really unusual.
+##
+## We order DIST_TARGETS by expected duration of the compressors,
+## slowest first, for better parallelism in `make dist'.  Do not
+## reorder DIST_ARCHIVES, users may expect gzip to be first.
 
 if %?TOPDIR_P%
 
@@ -336,44 +340,59 @@ GZIP_ENV = --best
 .PHONY: dist-gzip
 dist-gzip: distdir
        tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 ?BZIP2?DIST_ARCHIVES += $(distdir).tar.bz2
 .PHONY: dist-bzip2
 dist-bzip2: distdir
        tardir=$(distdir) && $(am__tar) | bzip2 -9 -c >$(distdir).tar.bz2
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
+
+?LZIP?DIST_ARCHIVES += $(distdir).tar.lz
+.PHONY: dist-lzip
+dist-lzip: distdir
+       tardir=$(distdir) && $(am__tar) | lzip -9 -c >$(distdir).tar.lz
+       $(am__post_remove_distdir)
 
 ?LZMA?DIST_ARCHIVES += $(distdir).tar.lzma
 .PHONY: dist-lzma
 dist-lzma: distdir
        tardir=$(distdir) && $(am__tar) | lzma -9 -c >$(distdir).tar.lzma
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 ?XZ?DIST_ARCHIVES += $(distdir).tar.xz
 .PHONY: dist-xz
 dist-xz: distdir
        tardir=$(distdir) && $(am__tar) | xz -9 -c >$(distdir).tar.xz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 ?COMPRESS?DIST_ARCHIVES += $(distdir).tar.Z
 .PHONY: dist-tarZ
 dist-tarZ: distdir
        tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 ?SHAR?DIST_ARCHIVES += $(distdir).shar.gz
 .PHONY: dist-shar
 dist-shar: distdir
        shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
 
 ?ZIP?DIST_ARCHIVES += $(distdir).zip
 .PHONY: dist-zip
 dist-zip: distdir
        -rm -f $(distdir).zip
        zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
+
+?LZMA?DIST_TARGETS += dist-lzma
+?LZIP?DIST_TARGETS += dist-lzip
+?XZ?DIST_TARGETS += dist-xz
+?SHAR?DIST_TARGETS += dist-shar
+?BZIP2?DIST_TARGETS += dist-bzip2
+?GZIP?DIST_TARGETS += dist-gzip
+?ZIP?DIST_TARGETS += dist-zip
+?COMPRESS?DIST_TARGETS += dist-tarZ
 
 endif %?TOPDIR_P%
 
@@ -393,16 +412,9 @@ 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 -9 -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
-?ZIP?  zip -rq $(distdir).zip $(distdir)
-       $(am__remove_distdir)
+dist dist-all:
+       $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:'
+       $(am__post_remove_distdir)
 
 endif %?TOPDIR_P%
 
@@ -429,6 +441,8 @@ distcheck: dist
          bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\
        *.tar.lzma*) \
          lzma -dc $(distdir).tar.lzma | $(am__untar) ;;\
+       *.tar.lz*) \
+         lzip -dc $(distdir).tar.lz | $(am__untar) ;;\
        *.tar.xz*) \
          xz -dc $(distdir).tar.xz | $(am__untar) ;;\
        *.tar.Z*) \
@@ -505,7 +519,7 @@ distcheck: dist
 ## Cater to parallel BSD make (see above).
          && cd "$$am__cwd" \
          || exit 1
-       $(am__remove_distdir)
+       $(am__post_remove_distdir)
        @(echo "$(distdir) archives ready for distribution: "; \
          list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \
          sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x'
index d39b23d..d26968a 100644 (file)
@@ -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, 2009 Free Software Foundation, Inc.
+## 2006, 2007, 2008, 2009, 2010 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
@@ -42,7 +42,7 @@ install-%DIR%PROGRAMS: $(%DIR%_PROGRAMS)
            -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \
        sed 'N;N;N;s,\n, ,g' | \
 ## The following awk script turns that into one line containing directories
-## and then lines of 'type target_name_or_directory sources...', with type
+## and then lines of 'type target_name_or_directory sources ...', with type
 ## 'd' designating directories, and 'f' files.
        $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \
          { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \
index 7463e2f..7fa75c9 100644 (file)
@@ -134,6 +134,43 @@ GTAGS:
          && gtags -i $(GTAGS_ARGS) "$$here"
 
 
+## ------- ##
+## cscope  ##
+## ------- ##
+
+if %?TOPDIR_P%
+
+CSCOPE = cscope
+.PHONY: cscope clean-cscope
+AM_RECURSIVE_TARGETS += cscope
+
+cscope: cscope.files
+       test ! -s cscope.files \
+         || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS)
+
+clean-cscope:
+       -rm -f cscope.files
+
+cscope.files: clean-cscope %CSCOPEDIRS% cscopelist
+
+endif %?TOPDIR_P%
+
+.PHONY: cscopelist
+cscopelist: %CSCOPEDIRS% $(HEADERS) $(SOURCES) $(LISP)
+       list='$(SOURCES) $(HEADERS) $(LISP)'; \
+       case "$(srcdir)" in \
+         [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \
+         *) sdir=$(subdir)/$(srcdir) ;; \
+       esac; \
+       for i in $$list; do \
+         if test -f "$$i"; then \
+           echo "$(subdir)/$$i"; \
+         else \
+           echo "$$sdir/$$i"; \
+         fi; \
+       done >> $(top_builddir)/cscope.files
+
+
 ## ---------- ##
 ## Cleaning.  ##
 ## ---------- ##
@@ -142,3 +179,6 @@ GTAGS:
 
 distclean-tags:
        -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags
+if %?TOPDIR_P%
+       -rm -f cscope.out cscope.in.out cscope.po.out cscope.files
+endif %?TOPDIR_P%
index dca9ce1..4b1add7 100644 (file)
@@ -32,7 +32,7 @@
 ##    to fail, the info files are not removed.  (They are needed by the
 ##    developer while he writes documentation.)
 ## *.iNN files are used on DJGPP.  See the comments in install-info-am
-       restore=: && backupdir="$(am__leading_dot)am$$$$" && \
+       %AM_V_MAKEINFO%restore=: && backupdir="$(am__leading_dot)am$$$$" && \
 ?INSRC?        am__cwd=`pwd` && $(am__cd) $(srcdir) && \
        rm -rf $$backupdir && mkdir $$backupdir && \
 ## If makeinfo is not installed we must not backup the files so
@@ -62,23 +62,27 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 
 ?GENERIC?%SOURCE_SUFFIX%.dvi:
 ?!GENERIC?%DEST_PREFIX%.dvi: %SOURCE% %DEPS% %DIRSTAMP%
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       %AM_V_TEXI2DVI%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
 ## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC?      $(TEXI2DVI) %SOURCE%
-?!GENERIC?     $(TEXI2DVI) -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+## texi2dvi doesn't silence everything with -q, redirect to /dev/null instead.
+## We still want -q (%TEXIQUIET%) because it turns on batch mode.
+?GENERIC?      $(TEXI2DVI) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
+?!GENERIC?     $(TEXI2DVI) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
 
 ?GENERIC?%SOURCE_SUFFIX%.pdf:
 ?!GENERIC?%DEST_PREFIX%.pdf: %SOURCE% %DEPS% %DIRSTAMP%
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       %AM_V_TEXI2PDF%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
 ## Must set MAKEINFO like this so that version.texi will be found even
 ## if it is in srcdir (-I $(srcdir) is set in %MAKEINFOFLAGS%).
        MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS%' \
 ## Do not use `-o' unless necessary: it is only supported since Texinfo 4.1.
-?GENERIC?      $(TEXI2PDF) %SOURCE%
-?!GENERIC?     $(TEXI2PDF) -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
+## texi2pdf doesn't silence everything with -q, redirect to /dev/null instead.
+## We still want -q (%TEXIQUIET%) because it turns on batch mode.
+?GENERIC?      $(TEXI2PDF) %TEXIQUIET% %SOURCE% %TEXIDEVNULL%
+?!GENERIC?     $(TEXI2PDF) %TEXIQUIET% -o $@ `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE% %TEXIDEVNULL%
 
 ?GENERIC?%SOURCE_SUFFIX%.html:
 ?!GENERIC?%DEST_PREFIX%.html: %SOURCE% %DEPS% %DIRSTAMP%
@@ -88,8 +92,8 @@ INFO_DEPS += %DEST_INFO_PREFIX%%DEST_SUFFIX%
 ## in the manual change, it may leave unused pages.  Our fix
 ## is to build under a temporary name, and replace the target on
 ## success.
-       rm -rf $(@:.html=.htp)
-       if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
+       %AM_V_MAKEINFO%rm -rf $(@:.html=.htp)
+       %SILENT%if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) %MAKEINFOFLAGS% \
 ?GENERIC?       -o $(@:.html=.htp) %SOURCE%; \
 ?!GENERIC?      -o $(@:.html=.htp) `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
        then \
index c9dcd9d..bfde665 100644 (file)
@@ -55,8 +55,8 @@ endif %?LOCAL-TEXIS%
 if %?LOCAL-TEXIS%
 DVIPS = dvips
 .dvi.ps:
-       TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
-       $(DVIPS) -o $@ $<
+       %AM_V_DVIPS%TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \
+       $(DVIPS) %TEXIQUIET% -o $@ $<
 endif %?LOCAL-TEXIS%
 
 .PHONY: dvi dvi-am html html-am info info-am pdf pdf-am ps ps-am
index c2246a4..4e621ac 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-12-30'
+timestamp='2010-07-29'
 
 # 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
@@ -92,7 +92,7 @@ if test $# != 0; then
   exit 1
 fi
 
-trap 'exit 1' 1 2 15
+trap 'exit 1' HUP INT TERM
 
 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a
 # compiler to aid in system detection is discouraged as it requires
@@ -106,7 +106,7 @@ trap 'exit 1' 1 2 15
 
 set_cc_for_build='
 trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ;
-trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ;
+trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" HUP INT PIPE TERM ;
 : ${TMPDIR=/tmp} ;
  { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } ||
  { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } ||
@@ -552,7 +552,7 @@ EOF
                echo rs6000-ibm-aix3.2
        fi
        exit ;;
-    *:AIX:*:[456])
+    *:AIX:*:[4567])
        IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'`
        if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then
                IBM_ARCH=rs6000
index 8518609..204218c 100755 (executable)
@@ -4,7 +4,7 @@
 #   2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
 #   Free Software Foundation, Inc.
 
-timestamp='2009-12-31'
+timestamp='2010-05-21'
 
 # This file is (in principle) common to ALL GNU software.
 # The presence of a machine in this file suggests that SOME GNU software
@@ -124,8 +124,9 @@ esac
 # Here we must recognize all the valid KERNEL-OS combinations.
 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* | \
+  nto-qnx* | linux-gnu* | linux-android* | 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
@@ -295,7 +296,7 @@ case $basic_machine in
        | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \
        | sparcv8 | sparcv9 | sparcv9b | sparcv9v \
        | spu | strongarm \
-       | tahoe | thumb | tic4x | tic80 | tron \
+       | tahoe | thumb | tic4x | tic54x | tic55x | tic6x | tic80 | tron \
        | ubicom32 \
        | v850 | v850e \
        | we32k \
@@ -303,6 +304,15 @@ case $basic_machine in
        | z8k | z80)
                basic_machine=$basic_machine-unknown
                ;;
+       c54x)
+               basic_machine=tic54x-unknown
+               ;;
+       c55x)
+               basic_machine=tic55x-unknown
+               ;;
+       c6x)
+               basic_machine=tic6x-unknown
+               ;;
        m6811 | m68hc11 | m6812 | m68hc12 | picochip)
                # Motorola 68HC11/12.
                basic_machine=$basic_machine-unknown
@@ -334,7 +344,7 @@ case $basic_machine in
        | arm-*  | armbe-* | armle-* | armeb-* | armv*-* \
        | avr-* | avr32-* \
        | bfin-* | bs2000-* \
-       | c[123]* | c30-* | [cjt]90-* | c4x-* | c54x-* | c55x-* | c6x-* \
+       | c[123]* | c30-* | [cjt]90-* | c4x-* \
        | clipper-* | craynv-* | cydra-* \
        | d10v-* | d30v-* | dlx-* \
        | elxsi-* \
@@ -381,7 +391,8 @@ case $basic_machine in
        | sparclite-* \
        | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | strongarm-* | sv1-* | sx?-* \
        | tahoe-* | thumb-* \
-       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* | tile-* \
+       | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \
+       | tile-* | tilegx-* \
        | tron-* \
        | ubicom32-* \
        | v850-* | v850e-* | vax-* \
@@ -481,6 +492,15 @@ case $basic_machine in
                basic_machine=powerpc-ibm
                os=-cnk
                ;;
+       c54x-*)
+               basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c55x-*)
+               basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
+       c6x-*)
+               basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'`
+               ;;
        c90)
                basic_machine=c90-cray
                os=-unicos
@@ -1074,17 +1094,10 @@ case $basic_machine in
                basic_machine=t90-cray
                os=-unicos
                ;;
-       tic54x | c54x*)
-               basic_machine=tic54x-unknown
-               os=-coff
-               ;;
-       tic55x | c55x*)
-               basic_machine=tic55x-unknown
-               os=-coff
-               ;;
-       tic6x | c6x*)
-               basic_machine=tic6x-unknown
-               os=-coff
+        # This must be matched before tile*.
+        tilegx*)
+               basic_machine=tilegx-unknown
+               os=-linux-gnu
                ;;
        tile*)
                basic_machine=tile-unknown
@@ -1295,7 +1308,8 @@ case $os in
              | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \
              | -chorusos* | -chorusrdb* | -cegcc* \
              | -cygwin* | -pe* | -psos* | -moss* | -proelf* | -rtems* \
-             | -mingw32* | -linux-gnu* | -linux-newlib* | -linux-uclibc* \
+             | -mingw32* | -linux-gnu* | -linux-android* \
+             | -linux-newlib* | -linux-uclibc* \
              | -uxpv* | -beos* | -mpeix* | -udk* \
              | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \
              | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \
@@ -1478,6 +1492,15 @@ case $basic_machine in
         c4x-* | tic4x-*)
                os=-coff
                ;;
+       tic54x-*)
+               os=-coff
+               ;;
+       tic55x-*)
+               os=-coff
+               ;;
+       tic6x-*)
+               os=-coff
+               ;;
        # This must come before the *-dec entry.
        pdp10-*)
                os=-tops20
index 5036752..edb4b56 100755 (executable)
@@ -188,7 +188,7 @@ done
 
 dprint()
 {
-  echo "Running $*..."
+  echo "Running $* ..."
 }
 
 if $dry_run; then
@@ -252,7 +252,7 @@ echo
 if test $# -ne 0; then
   for file
   do
-    echo "Signing $file..."
+    echo "Signing $file ..."
     rm -f $file.sig
     echo "$passphrase" | $dbg $GPG --passphrase-fd 0 -ba -o $file.sig $file
   done
@@ -391,7 +391,7 @@ for dest in $to
 do
   for file
   do
-    echo "Uploading $file to $dest..."
+    echo "Uploading $file to $dest ..."
     stmt=
     files="$file $file.sig"
     destdir=`echo $dest | sed 's/[^:]*://'`
index 9140826..bab1b33 100644 (file)
@@ -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{2009-08-14.15}
+\def\texinfoversion{2010-06-17.11}
 %
 % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995,
 % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006,
-% 2007, 2008, 2009 Free Software Foundation, Inc.
+% 2007, 2008, 2009, 2010 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
@@ -65,7 +65,6 @@
 \everyjob{\message{[Texinfo version \texinfoversion]}%
   \catcode`+=\active \catcode`\_=\active}
 
-
 \chardef\other=12
 
 % We never want plain's \outer definition of \+ in Texinfo.
 \let\ptexnewwrite\newwrite
 \let\ptexnoindent=\noindent
 \let\ptexplus=+
+\let\ptexraggedright=\raggedright
 \let\ptexrbrace=\}
 \let\ptexslash=\/
 \let\ptexstar=\*
 \let\ptext=\t
 \let\ptextop=\top
-{\catcode`\'=\active
-\global\let\ptexquoteright'}% Math-mode def from plain.tex.
-\let\ptexraggedright=\raggedright
+{\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode
 
 % If this character appears in an error message or help string, it
 % starts a new line in the output.
 % that mark overfull boxes (in case you have decided
 % that the text looks ok even though it passes the margin).
 %
-\def\finalout{\overfullrule=0pt}
-
-% @| inserts a changebar to the left of the current line.  It should
-% surround any changed text.  This approach does *not* work if the
-% change spans more than two lines of output.  To handle that, we would
-% have adopt a much more difficult approach (putting marks into the main
-% vertical list for the beginning and end of each change).
-%
-\def\|{%
-  % \vadjust can only be used in horizontal mode.
-  \leavevmode
-  %
-  % Append this vertical mode material after the current line in the output.
-  \vadjust{%
-    % We want to insert a rule with the height and depth of the current
-    % leading; that is exactly what \strutbox is supposed to record.
-    \vskip-\baselineskip
-    %
-    % \vadjust-items are inserted at the left edge of the type.  So
-    % the \llap here moves out into the left-hand margin.
-    \llap{%
-      %
-      % For a thicker or thinner bar, change the `1pt'.
-      \vrule height\baselineskip width1pt
-      %
-      % This is the space between the bar and the text.
-      \hskip 12pt
-    }%
-  }%
-}
+\def\finalout{\overfullrule=0pt }
 
 % Sometimes it is convenient to have everything in the transcript file
 % and nothing on the terminal.  We don't just call \tracingall here,
 \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount
   \removelastskip\penalty-200\bigskip\fi\fi}
 
-% For @cropmarks command.
 % Do @cropmarks to get crop marks.
 %
 \newif\ifcropmarks
 \newhelp\EMsimple{Press RETURN to continue.}
 
 
-%% Simple single-character @ commands
-
-% @@ prints an @
-% Kludge this until the fonts are right (grr).
-\def\@{{\tt\char64}}
-
-% This is turned off because it was never documented
-% and you can use @w{...} around a quote to suppress ligatures.
-%% Define @` and @' to be the same as ` and '
-%% but suppressing ligatures.
-%\def\`{{`}}
-%\def\'{{'}}
-
-% Used to generate quoted braces.
-\def\mylbrace {{\tt\char123}}
-\def\myrbrace {{\tt\char125}}
-\let\{=\mylbrace
-\let\}=\myrbrace
-\begingroup
-  % Definitions to produce \{ and \} commands for indices,
-  % and @{ and @} for the aux/toc files.
-  \catcode`\{ = \other \catcode`\} = \other
-  \catcode`\[ = 1 \catcode`\] = 2
-  \catcode`\! = 0 \catcode`\\ = \other
-  !gdef!lbracecmd[\{]%
-  !gdef!rbracecmd[\}]%
-  !gdef!lbraceatcmd[@{]%
-  !gdef!rbraceatcmd[@}]%
-!endgroup
-
-% @comma{} to avoid , parsing problems.
-\let\comma = ,
-
-% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
-% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
-\let\, = \c
-\let\dotaccent = \.
-\def\ringaccent#1{{\accent23 #1}}
-\let\tieaccent = \t
-\let\ubaraccent = \b
-\let\udotaccent = \d
-
-% Other special characters: @questiondown @exclamdown @ordf @ordm
-% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
-\def\questiondown{?`}
-\def\exclamdown{!`}
-\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
-\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
-
-% Dotless i and dotless j, used for accents.
-\def\imacro{i}
-\def\jmacro{j}
-\def\dotless#1{%
-  \def\temp{#1}%
-  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
-  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
-  \else \errmessage{@dotless can be used only with i or j}%
-  \fi\fi
-}
-
-% The \TeX{} logo, as in plain, but resetting the spacing so that a
-% period following counts as ending a sentence.  (Idea found in latex.)
-%
-\edef\TeX{\TeX \spacefactor=1000 }
-
-% @LaTeX{} logo.  Not quite the same results as the definition in
-% latex.ltx, since we use a different font for the raised A; it's most
-% convenient for us to use an explicitly smaller font, rather than using
-% the \scriptstyle font (since we don't reset \scriptstyle and
-% \scriptscriptstyle).
-%
-\def\LaTeX{%
-  L\kern-.36em
-  {\setbox0=\hbox{T}%
-   \vbox to \ht0{\hbox{\selectfonts\lllsize A}\vss}}%
-  \kern-.15em
-  \TeX
-}
-
 % Be sure we're in horizontal mode when doing a tie, since we make space
 % equivalent to this in @example-like environments. Otherwise, a space
 % at the beginning of a line will start with \penalty -- and
@@ -873,7 +762,7 @@ where each line of input produces a line of output.}
 
 % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current
 % paragraph.  For more general purposes, use the \margin insertion
-% class.  WHICH is `l' or `r'.
+% class.  WHICH is `l' or `r'.  Not documented, written for gawk manual.
 %
 \newskip\inmarginspacing \inmarginspacing=1cm
 \def\strutdepth{\dp\strutbox}
@@ -920,6 +809,36 @@ where each line of input produces a line of output.}
   \temp
 }
 
+% @| inserts a changebar to the left of the current line.  It should
+% surround any changed text.  This approach does *not* work if the
+% change spans more than two lines of output.  To handle that, we would
+% have adopt a much more difficult approach (putting marks into the main
+% vertical list for the beginning and end of each change).  This command
+% is not documented, not supported, and doesn't work.
+%
+\def\|{%
+  % \vadjust can only be used in horizontal mode.
+  \leavevmode
+  %
+  % Append this vertical mode material after the current line in the output.
+  \vadjust{%
+    % We want to insert a rule with the height and depth of the current
+    % leading; that is exactly what \strutbox is supposed to record.
+    \vskip-\baselineskip
+    %
+    % \vadjust-items are inserted at the left edge of the type.  So
+    % the \llap here moves out into the left-hand margin.
+    \llap{%
+      %
+      % For a thicker or thinner bar, change the `1pt'.
+      \vrule height\baselineskip width1pt
+      %
+      % This is the space between the bar and the text.
+      \hskip 12pt
+    }%
+  }%
+}
+
 % @include FILE -- \input text of FILE.
 %
 \def\include{\parseargusing\filenamecatcodes\includezzz}
@@ -1095,109 +1014,6 @@ where each line of input produces a line of output.}
 }
 
 
-% @asis just yields its argument.  Used with @table, for example.
-%
-\def\asis#1{#1}
-
-% @math outputs its argument in math mode.
-%
-% One complication: _ usually means subscripts, but it could also mean
-% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
-% _ active, and distinguish by seeing if the current family is \slfam,
-% which is what @var uses.
-{
-  \catcode`\_ = \active
-  \gdef\mathunderscore{%
-    \catcode`\_=\active
-    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
-  }
-}
-% Another complication: we want \\ (and @\) to output a \ character.
-% FYI, plain.tex uses \\ as a temporary control sequence (why?), but
-% this is not advertised and we don't care.  Texinfo does not
-% otherwise define @\.
-%
-% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
-\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
-%
-\def\math{%
-  \tex
-  \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.
-
-% Some active characters (such as <) are spaced differently in math.
-% We have to reset their definitions in case the @math was an argument
-% to a command which sets the catcodes (such as @item or @section).
-%
-{
-  \catcode`^ = \active
-  \catcode`< = \active
-  \catcode`> = \active
-  \catcode`+ = \active
-  \catcode`' = \active
-  \gdef\mathactive{%
-    \let^ = \ptexhat
-    \let< = \ptexless
-    \let> = \ptexgtr
-    \let+ = \ptexplus
-    \let' = \ptexquoteright
-  }
-}
-
-% Some math mode symbols.
-\def\bullet{$\ptexbullet$}
-\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
-% typewriter fonts as three actual period characters; on the other hand,
-% in other typewriter fonts three periods are wider than 1.5em.  So do
-% whichever is larger.
-%
-\def\dots{%
-  \leavevmode
-  \setbox0=\hbox{...}% get width of three periods
-  \ifdim\wd0 > 1.5em
-    \dimen0 = \wd0
-  \else
-    \dimen0 = 1.5em
-  \fi
-  \hbox to \dimen0{%
-    \hskip 0pt plus.25fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus1fil
-    .\hskip 0pt plus.5fil
-  }%
-}
-
-% @enddots{} is an end-of-sentence ellipsis.
-%
-\def\enddots{%
-  \dots
-  \spacefactor=\endofsentencespacefactor
-}
-
-% @comma{} is so commas can be inserted into text without messing up
-% Texinfo's parsing.
-%
-\let\comma = ,
-
 % @refill is a no-op.
 \let\refill=\relax
 
@@ -1492,6 +1308,7 @@ output) for that.)}
       \edef\myrbrace{\iffalse{\else\string}\fi}\let\}=\myrbrace
       %
       % Read toc silently, to get counts of subentries for \pdfoutline.
+      \def\partentry##1##2##3##4{}% ignore parts in the outlines
       \def\numchapentry##1##2##3##4{%
        \def\thischapnum{##2}%
        \def\thissecnum{0}%
@@ -2105,8 +1922,8 @@ end
 \font\reducedsy=cmsy10
 \def\reducedecsize{1000}
 
-% reset the current fonts
-\textfonts
+\textleading = 13.2pt % line spacing for 11pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 11pt text font size definitions
 
@@ -2236,11 +2053,9 @@ end
 \font\reducedsy=cmsy9
 \def\reducedecsize{0900}
 
-% reduce space between paragraphs
-\divide\parskip by 2
-
-% reset the current fonts
-\textfonts
+\divide\parskip by 2  % reduce space between paragraphs
+\textleading = 12pt   % line spacing for 10pt CM
+\textfonts            % reset the current fonts
 \rm
 } % end of 10pt text font size definitions
 
@@ -2249,8 +2064,9 @@ end
 %   @fonttextsize 10
 % (or 11) to redefine the text font size.  pt is assumed.
 %
-\def\xword{10}
 \def\xiword{11}
+\def\xword{10}
+\def\xwordpt{10pt}
 %
 \parseargdef\fonttextsize{%
   \def\textsizearg{#1}%
@@ -2308,7 +2124,7 @@ end
   \let\tenttsl=\titlettsl
   \def\curfontsize{title}%
   \def\lsize{chap}\def\lllsize{subsec}%
-  \resetmathfonts \setleading{25pt}}
+  \resetmathfonts \setleading{27pt}}
 \def\titlefont#1{{\titlefonts\rmisbold #1}}
 \def\chapfonts{%
   \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl
@@ -2460,14 +2276,19 @@ end
 
 \let\markupsetuplqcode \markupsetcodequoteleft
 \let\markupsetuprqcode \markupsetcodequoteright
+%
 \let\markupsetuplqexample \markupsetcodequoteleft
 \let\markupsetuprqexample \markupsetcodequoteright
+%
+\let\markupsetuplqsamp \markupsetcodequoteleft
+\let\markupsetuprqsamp \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
@@ -2505,27 +2326,40 @@ end
 % Count depth in font-changes, for error checks
 \newcount\fontdepth \fontdepth=0
 
-%% Add scribe-like font environments, plus @l for inline lisp (usually sans
-%% serif) and @ii for TeX italic
+% Font commands.
+
+% #1 is the font command (\sl or \it), #2 is the text to slant.
+% If we are in a monospaced environment, however, 1) always use \ttsl,
+% and 2) do not add an italic correction.
+\def\dosmartslant#1#2{%
+  \ifusingtt 
+    {\ttsl #2\let\next=\relax}%
+    {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}%
+  \next
+}
+\def\smartslanted{\dosmartslant\sl}
+\def\smartitalic{\dosmartslant\it}
 
-% \smartitalic{ARG} outputs arg in italics, followed by an italic correction
-% unless the following character is such as not to need one.
-\def\smartitalicx{\ifx\next,\else\ifx\next-\else\ifx\next.\else
-                    \ptexslash\fi\fi\fi}
-\def\smartslanted#1{{\ifusingtt\ttsl\sl #1}\futurelet\next\smartitalicx}
-\def\smartitalic#1{{\ifusingtt\ttsl\it #1}\futurelet\next\smartitalicx}
+% Output an italic correction unless \next (presumed to be the following
+% character) is such as not to need one.
+\def\smartitaliccorrection{%
+  \ifx\next,%
+  \else\ifx\next-%
+  \else\ifx\next.%
+  \else\ptexslash
+  \fi\fi\fi}
 
-% like \smartslanted except unconditionally uses \ttsl.
+% like \smartslanted except unconditionally uses \ttsl, and no ic.
 % @var is set to this for defun arguments.
-\def\ttslanted#1{{\ttsl #1}\futurelet\next\smartitalicx}
+\def\ttslanted#1{{\ttsl #1}}
 
 % @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}
+\def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection}
 
 \let\i=\smartitalic
 \let\slanted=\smartslanted
-\def\var#1{{\setupmarkupstyle{var}\smartslanted{#1}}}
+\def\var#1{\smartslanted{#1}}
 \let\dfn=\smartslanted
 \let\emph=\smartitalic
 
@@ -2819,8 +2653,188 @@ end
   \fi
 }
 
+% @asis just yields its argument.  Used with @table, for example.
+%
+\def\asis#1{#1}
+
+% @math outputs its argument in math mode.
+%
+% One complication: _ usually means subscripts, but it could also mean
+% an actual _ character, as in @math{@var{some_variable} + 1}.  So make
+% _ active, and distinguish by seeing if the current family is \slfam,
+% which is what @var uses.
+{
+  \catcode`\_ = \active
+  \gdef\mathunderscore{%
+    \catcode`\_=\active
+    \def_{\ifnum\fam=\slfam \_\else\sb\fi}%
+  }
+}
+% Another complication: we want \\ (and @\) to output a math (or tt) \.
+% FYI, plain.tex uses \\ as a temporary control sequence (for no
+% particular reason), but this is not advertised and we don't care.
+%
+% The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\.
+\def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi}
+%
+\def\math{%
+  \tex
+  \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.
+
+% Some active characters (such as <) are spaced differently in math.
+% We have to reset their definitions in case the @math was an argument
+% to a command which sets the catcodes (such as @item or @section).
+%
+{
+  \catcode`^ = \active
+  \catcode`< = \active
+  \catcode`> = \active
+  \catcode`+ = \active
+  \catcode`' = \active
+  \gdef\mathactive{%
+    \let^ = \ptexhat
+    \let< = \ptexless
+    \let> = \ptexgtr
+    \let+ = \ptexplus
+    \let' = \ptexquoteright
+  }
+}
+
 
 \message{glyphs,}
+% and logos.
+
+% @@ prints an @.
+\def\@{\char64 }
+
+% Used to generate quoted braces.  Unless we're in typewriter, use
+% \ecfont because the CM text fonts do not have braces, and we don't
+% want to switch into math.
+\def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}}
+\def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}}
+\let\{=\mylbrace
+\let\}=\myrbrace
+\begingroup
+  % Definitions to produce \{ and \} commands for indices,
+  % and @{ and @} for the aux/toc files.
+  \catcode`\{ = \other \catcode`\} = \other
+  \catcode`\[ = 1 \catcode`\] = 2
+  \catcode`\! = 0 \catcode`\\ = \other
+  !gdef!lbracecmd[\{]%
+  !gdef!rbracecmd[\}]%
+  !gdef!lbraceatcmd[@{]%
+  !gdef!rbraceatcmd[@}]%
+!endgroup
+
+% @comma{} to avoid , parsing problems.
+\let\comma = ,
+
+% Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent
+% Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H.
+\let\, = \ptexc
+\let\dotaccent = \ptexdot
+\def\ringaccent#1{{\accent23 #1}}
+\let\tieaccent = \ptext
+\let\ubaraccent = \ptexb
+\let\udotaccent = \d
+
+% Other special characters: @questiondown @exclamdown @ordf @ordm
+% Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss.
+\def\questiondown{?`}
+\def\exclamdown{!`}
+\def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}}
+\def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}}
+
+% Dotless i and dotless j, used for accents.
+\def\imacro{i}
+\def\jmacro{j}
+\def\dotless#1{%
+  \def\temp{#1}%
+  \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi
+  \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi
+  \else \errmessage{@dotless can be used only with i or j}%
+  \fi\fi
+}
+
+% The \TeX{} logo, as in plain, but resetting the spacing so that a
+% period following counts as ending a sentence.  (Idea found in latex.)
+%
+\edef\TeX{\TeX \spacefactor=1000 }
+
+% @LaTeX{} logo.  Not quite the same results as the definition in
+% latex.ltx, since we use a different font for the raised A; it's most
+% convenient for us to use an explicitly smaller font, rather than using
+% the \scriptstyle font (since we don't reset \scriptstyle and
+% \scriptscriptstyle).
+%
+\def\LaTeX{%
+  L\kern-.36em
+  {\setbox0=\hbox{T}%
+   \vbox to \ht0{\hbox{%
+     \ifx\textnominalsize\xwordpt
+       % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX.
+       % Revert to plain's \scriptsize, which is 7pt.
+       \count255=\the\fam $\fam\count255 \scriptstyle A$%
+     \else
+       % For 11pt, we can use our lllsize.
+       \selectfonts\lllsize A%
+     \fi
+     }%
+     \vss
+  }}%
+  \kern-.15em
+  \TeX
+}
+
+% Some math mode symbols.
+\def\bullet{$\ptexbullet$}
+\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
+% typewriter fonts as three actual period characters; on the other hand,
+% in other typewriter fonts three periods are wider than 1.5em.  So do
+% whichever is larger.
+%
+\def\dots{%
+  \leavevmode
+  \setbox0=\hbox{...}% get width of three periods
+  \ifdim\wd0 > 1.5em
+    \dimen0 = \wd0
+  \else
+    \dimen0 = 1.5em
+  \fi
+  \hbox to \dimen0{%
+    \hskip 0pt plus.25fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus1fil
+    .\hskip 0pt plus.5fil
+  }%
+}
+
+% @enddots{} is an end-of-sentence ellipsis.
+%
+\def\enddots{%
+  \dots
+  \spacefactor=\endofsentencespacefactor
+}
 
 % @point{}, @result{}, @expansion{}, @print{}, @equiv{}.
 %
@@ -3207,10 +3221,14 @@ end
 
 \def\headings #1 {\csname HEADINGS#1\endcsname}
 
-\def\HEADINGSoff{%
-\global\evenheadline={\hfil} \global\evenfootline={\hfil}
-\global\oddheadline={\hfil} \global\oddfootline={\hfil}}
-\HEADINGSoff
+\def\headingsoff{% non-global headings elimination
+  \evenheadline={\hfil}\evenfootline={\hfil}%
+   \oddheadline={\hfil}\oddfootline={\hfil}%
+}
+
+\def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting
+\HEADINGSoff  % it's the default
+
 % When we turn headings on, set the page number to 1.
 % For double-sided printing, put current file name in lower left corner,
 % chapter name on inside top of right hand pages, document
@@ -3322,7 +3340,7 @@ end
     \begingroup
       \advance\leftskip by-\tableindent
       \advance\hsize by\tableindent
-      \advance\rightskip by0pt plus1fil
+      \advance\rightskip by0pt plus1fil\relax
       \leavevmode\unhbox0\par
     \endgroup
     %
@@ -4134,11 +4152,14 @@ end
   \def\@{@}% change to @@ when we switch to @ as escape char in index files.
   \def\ {\realbackslash\space }%
   %
-  % Need these in case \tex is in effect and \{ is a \delimiter again.
-  % But can't use \lbracecmd and \rbracecmd because texindex assumes
-  % braces and backslashes are used only as delimiters.
-  \let\{ = \mylbrace
-  \let\} = \myrbrace
+  % Need these unexpandable (because we define \tt as a dummy)
+  % definitions when @{ or @} appear in index entry text.  Also, more
+  % complicated, when \tex is in effect and \{ is a \delimiter again.
+  % We can't use \lbracecmd and \rbracecmd because texindex assumes
+  % braces and backslashes are used only as delimiters.  Perhaps we
+  % should define @lbrace and @rbrace commands a la @comma.
+  \def\{{{\tt\char123}}%
+  \def\}{{\tt\char125}}%
   %
   % I don't entirely understand this, but when an index entry is
   % generated from a macro call, the \endinput which \scanmacro inserts
@@ -4252,6 +4273,7 @@ end
   \definedummyword\registeredsymbol
   \definedummyword\dots
   \definedummyword\enddots
+  \definedummyword\entrybreak
   \definedummyword\equiv
   \definedummyword\error
   \definedummyword\euro
@@ -4424,6 +4446,9 @@ end
   \def\result{=>}%
   \def\textdegree{o}%
   %
+  \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax
+  \else \indexlquoteignore \fi
+  %
   % We need to get rid of all macros, leaving only the arguments (if present).
   % Of course this is not nearly correct, but it is the best we can do for now.
   % makeinfo does not expand macros in the argument to @deffn, which ends up
@@ -4437,6 +4462,11 @@ end
   \macrolist
 }
 
+% Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us
+% ignore left quotes in the sort term.
+{\catcode`\`=\active
+ \gdef\indexlquoteignore{\let`=\empty}}
+
 \let\indexbackslash=0  %overridden during \printindex.
 \let\SETmarginindex=\relax % put index entries in margin (undocumented)?
 
@@ -4694,7 +4724,6 @@ end
 % 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.
-%
 % The right solution is to prevent \entry from swallowing the whole text.
 %                                 --kasal, 21nov03
 \def\entry{%
@@ -4731,10 +4760,17 @@ end
     % columns.
     \vskip 0pt plus1pt
     %
+    % When reading the text of entry, convert explicit line breaks
+    % from @* into spaces.  The user might give these in long section
+    % titles, for instance.
+    \def\*{\unskip\space\ignorespaces}%
+    \def\entrybreak{\hfil\break}%
+    %
     % Swallow the left brace of the text (first parameter):
     \afterassignment\doentry
     \let\temp =
 }
+\def\entrybreak{\unskip\space\ignorespaces}%
 \def\doentry{%
     \bgroup % Instead of the swallowed brace.
       \noindent
@@ -4967,7 +5003,22 @@ end
 \message{sectioning,}
 % Chapters, sections, etc.
 
-% \unnumberedno is an oxymoron, of course.  But we count the unnumbered
+% Let's start with @part.
+\outer\parseargdef\part{\partzzz{#1}}
+\def\partzzz#1{%
+  \chapoddpage
+  \null
+  \vskip.3\vsize  % move it down on the page a bit
+  \begingroup
+    \noindent \titlefonts\rmisbold #1\par % the text
+    \let\lastnode=\empty      % no node to associate with
+    \writetocentry{part}{#1}{}% but put it in the toc
+    \headingsoff              % no headline or footline on the part page
+    \chapoddpage
+  \endgroup
+}
+
+% \unnumberedno is an oxymoron.  But we count the unnumbered
 % sections so that we can refer to them unambiguously in the pdf
 % outlines by their "section number".  We avoid collisions with chapter
 % numbers by starting them at 10000.  (If a document ever has 10000
@@ -5046,8 +5097,8 @@ end
 \chardef\maxseclevel = 3
 %
 % A numbered section within an unnumbered changes to unnumbered too.
-% To achive this, remember the "biggest" unnum. sec. we are currently in:
-\chardef\unmlevel = \maxseclevel
+% To achieve this, remember the "biggest" unnum. sec. we are currently in:
+\chardef\unnlevel = \maxseclevel
 %
 % Trace whether the current chapter is an appendix or not:
 % \chapheadtype is "N" or "A", unnumbered chapters are ignored.
@@ -5072,8 +5123,8 @@ end
   % The heading type:
   \def\headtype{#1}%
   \if \headtype U%
-    \ifnum \absseclevel < \unmlevel
-      \chardef\unmlevel = \absseclevel
+    \ifnum \absseclevel < \unnlevel
+      \chardef\unnlevel = \absseclevel
     \fi
   \else
     % Check for appendix sections:
@@ -5085,10 +5136,10 @@ end
       \fi\fi
     \fi
     % Check for numbered within unnumbered:
-    \ifnum \absseclevel > \unmlevel
+    \ifnum \absseclevel > \unnlevel
       \def\headtype{U}%
     \else
-      \chardef\unmlevel = 3
+      \chardef\unnlevel = 3
     \fi
   \fi
   % Now print the heading:
@@ -5340,9 +5391,8 @@ end
   \chappager
   \ifodd\pageno \else
     \begingroup
-      \evenheadline={\hfil}\evenfootline={\hfil}%
-      \oddheadline={\hfil}\oddfootline={\hfil}%
-      \hbox to 0pt{}%
+      \headingsoff
+      \null
       \chappager
     \endgroup
   \fi
@@ -5785,6 +5835,7 @@ end
 \def\summarycontents{%
   \startcontents{\putwordShortTOC}%
     %
+    \let\partentry = \shortpartentry
     \let\numchapentry = \shortchapentry
     \let\appentry = \shortchapentry
     \let\unnchapentry = \shortunnchapentry
@@ -5840,6 +5891,19 @@ end
 % The last argument is the page number.
 % The arguments in between are the chapter number, section number, ...
 
+% Parts, in the main contents.  Replace the part number, which doesn't
+% exist, with an empty box.  Let's hope all the numbers have the same width.
+% Also ignore the page number, which is conventionally not printed.
+\def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}}
+\def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}}
+%
+% Parts, in the short toc.
+\def\shortpartentry#1#2#3#4{%
+  \penalty-300
+  \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip
+  \shortchapentry{{\bf #1}}{\numeralbox}{}{}%
+}
+
 % Chapters, in the main contents.
 \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}}
 %
@@ -5929,9 +5993,9 @@ end
 \message{environments,}
 % @foo ... @end foo.
 
-% @tex ... @end tex    escapes into raw Tex temporarily.
+% @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.
+% But \@ or @@ will get a plain @ character.
 
 \envdef\tex{%
   \setupmarkupstyle{tex}%
@@ -5948,6 +6012,10 @@ end
   \catcode`\'=\other
   \escapechar=`\\
   %
+  % ' is active in math mode (mathcode"8000).  So reset it, and all our
+  % other math active characters (just in case), to plain's definitions.
+  \mathactive
+  %
   \let\b=\ptexb
   \let\bullet=\ptexbullet
   \let\c=\ptexc
@@ -6150,41 +6218,42 @@ end
 }
 
 % We often define two environments, @foo and @smallfoo.
-% Let's do it by one command:
-\def\makedispenv #1#2{
-  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}
-  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}
+% Let's do it in one command.  #1 is the env name, #2 the definition.
+\def\makedispenvdef#1#2{%
+  \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}%
+  \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}%
   \expandafter\let\csname E#1\endcsname \afterenvbreak
   \expandafter\let\csname Esmall#1\endcsname \afterenvbreak
 }
 
-% Define two synonyms:
-\def\maketwodispenvs #1#2#3{
-  \makedispenv{#1}{#3}
-  \makedispenv{#2}{#3}
+% Define two environment synonyms (#1 and #2) for an environment.
+\def\maketwodispenvdef#1#2#3{%
+  \makedispenvdef{#1}{#3}%
+  \makedispenvdef{#2}{#3}%
 }
-
-% @lisp: indented, narrowed, typewriter font; @example: same as @lisp.
+%
+% @lisp: indented, narrowed, typewriter font;
+% @example: same as @lisp.
 %
 % @smallexample and @smalllisp: use smaller fonts.
 % Originally contributed by Pavel@xerox.
 %
-\maketwodispenv{lisp}{example}{%
+\maketwodispenvdef{lisp}{example}{%
   \nonfillstart
   \tt\setupmarkupstyle{example}%
   \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special.
-  \gobble       % eat return
+  \gobble % eat return
 }
 % @display/@smalldisplay: same as @lisp except keep current font.
 %
-\makedispenv {display}{%
+\makedispenvdef{display}{%
   \nonfillstart
   \gobble
 }
 
 % @format/@smallformat: same as @display except don't narrow margins.
 %
-\makedispenv{format}{%
+\makedispenvdef{format}{%
   \let\nonarrowing = t%
   \nonfillstart
   \gobble
@@ -6203,7 +6272,7 @@ end
 \envdef\flushright{%
   \let\nonarrowing = t%
   \nonfillstart
-  \advance\leftskip by 0pt plus 1fill
+  \advance\leftskip by 0pt plus 1fill\relax
   \gobble
 }
 \let\Eflushright = \afterenvbreak
@@ -6238,6 +6307,8 @@ end
 % we're doing normal filling.  So, when using \aboveenvbreak and
 % \afterenvbreak, temporarily make \parskip 0.
 %
+\makedispenvdef{quotation}{\quotationstart}
+%
 \def\quotationstart{%
   {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip
   \parindent=0pt
@@ -6253,17 +6324,6 @@ 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.
 %
@@ -6275,6 +6335,7 @@ end
   \fi
   {\parskip=0pt \afterenvbreak}%
 }
+\def\Esmallquotation{\Equotation}
 
 % If we're given an argument, typeset it in bold with a colon after.
 \def\quotationlabel#1{%
@@ -6331,21 +6392,28 @@ end
 
 % Setup for the @verbatim environment
 %
-% Real tab expansion
+% Real tab expansion.
 \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount
 %
-\def\starttabbox{\setbox0=\hbox\bgroup}
+% We typeset each line of the verbatim in an \hbox, so we can handle
+% tabs.  The \global is in case the verbatim line starts with an accent,
+% or some other command that starts with a begin-group.  Otherwise, the
+% entire \verbbox would disappear at the corresponding end-group, before
+% it is typeset.  Meanwhile, we can't have nested verbatim commands
+% (can we?), so the \global won't be overwriting itself.
+\newbox\verbbox
+\def\starttabbox{\global\setbox\verbbox=\hbox\bgroup}
 %
 \begingroup
   \catcode`\^^I=\active
   \gdef\tabexpand{%
     \catcode`\^^I=\active
     \def^^I{\leavevmode\egroup
-      \dimen0=\wd0 % the width so far, or since the previous tab
-      \divide\dimen0 by\tabw
-      \multiply\dimen0 by\tabw % compute previous multiple of \tabw
-      \advance\dimen0 by\tabw  % advance to next multiple of \tabw
-      \wd0=\dimen0 \box0 \starttabbox
+      \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab
+      \divide\dimen\verbbox by\tabw
+      \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw
+      \advance\dimen\verbbox by\tabw  % advance to next multiple of \tabw
+      \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox
     }%
   }
 \endgroup
@@ -6354,15 +6422,16 @@ end
 \def\setupverbatim{%
   \let\nonarrowing = t%
   \nonfillstart
-  % Easiest (and conventionally used) font for verbatim
-  \tt
-  \def\par{\leavevmode\egroup\box0\endgraf}%
+  \tt % easiest (and conventionally used) font for verbatim
+  % The \leavevmode here is for blank lines.  Otherwise, we would
+  % never \starttabox and the \egroup would end verbatim mode.
+  \def\par{\leavevmode\egroup\box\verbbox\endgraf}%
   \tabexpand
   \setupmarkupstyle{verbatim}%
   % Respect line breaks,
   % print special symbols as themselves, and
-  % make each space count
-  % must do in this order:
+  % make each space count.
+  % Must do in this order:
   \obeylines \uncatcodespecials \sepspaces
   \everypar{\starttabbox}%
 }
@@ -6505,7 +6574,7 @@ end
     #1#2 \endheader
     % common ending:
     \interlinepenalty = 10000
-    \advance\rightskip by 0pt plus 1fil
+    \advance\rightskip by 0pt plus 1fil\relax
     \endgraf
     \nobreak\vskip -\parskip
     \penalty\defunpenalty  % signal to \startdefun and \dodefunx
@@ -6877,17 +6946,18 @@ end
 
 % Macro bodies are absorbed as an argument in a context where
 % all characters are catcode 10, 11 or 12, except \ which is active
-% (as in normal texinfo). It is necessary to change the definition of \.
-
+% (as in normal texinfo). It is necessary to change the definition of \
+% to recognize macro arguments; this is the job of \mbodybackslash.
+%
 % Non-ASCII encodings make 8-bit characters active, so un-activate
 % them to avoid their expansion.  Must do this non-globally, to
 % confine the change to the current group.
-
+%
 % It's necessary to have hard CRs when the macro is executed. This is
-% done by  making ^^M (\endlinechar) catcode 12 when reading the macro
+% done by making ^^M (\endlinechar) catcode 12 when reading the macro
 % body, and then making it the \newlinechar in \scanmacro.
-
-\def\scanctxt{%
+%
+\def\scanctxt{% used as subroutine
   \catcode`\"=\other
   \catcode`\+=\other
   \catcode`\<=\other
@@ -6900,13 +6970,13 @@ end
   \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi
 }
 
-\def\scanargctxt{%
+\def\scanargctxt{% used for copying and captions, not macros.
   \scanctxt
   \catcode`\\=\other
   \catcode`\^^M=\other
 }
 
-\def\macrobodyctxt{%
+\def\macrobodyctxt{% used for @macro definitions
   \scanctxt
   \catcode`\{=\other
   \catcode`\}=\other
@@ -6914,30 +6984,48 @@ end
   \usembodybackslash
 }
 
-\def\macroargctxt{%
+\def\macroargctxt{% used when scanning invocations
   \scanctxt
-  \catcode`\\=\other
+  \catcode`\\=0
 }
+% why catcode 0 for \ in the above?  To recognize \\ \{ \} as "escapes"
+% for the single characters \ { }.  Thus, we end up with the "commands"
+% that would be written @\ @{ @} in a Texinfo document.
+% 
+% We already have @{ and @}.  For @\, we define it here, and only for
+% this purpose, to produce a typewriter backslash (so, the @\ that we
+% define for @math can't be used with @macro calls):
+%
+\def\\{\normalbackslash}%
+% 
+% We would like to do this for \, too, since that is what makeinfo does.
+% But it is not possible, because Texinfo already has a command @, for a
+% cedilla accent.  Documents must use @comma{} instead.
+%
+% \anythingelse will almost certainly be an error of some kind.
+
 
 % \mbodybackslash is the definition of \ in @macro bodies.
 % It maps \foo\ => \csname macarg.foo\endcsname => #N
 % where N is the macro parameter number.
 % We define \csname macarg.\endcsname to be \realbackslash, so
 % \\ in macro replacement text gets you a backslash.
-
+%
 {\catcode`@=0 @catcode`@\=@active
  @gdef@usembodybackslash{@let\=@mbodybackslash}
  @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname}
 }
 \expandafter\def\csname macarg.\endcsname{\realbackslash}
 
+\def\margbackslash#1{\char`\#1 }
+
 \def\macro{\recursivefalse\parsearg\macroxxx}
 \def\rmacro{\recursivetrue\parsearg\macroxxx}
 
 \def\macroxxx#1{%
-  \getargs{#1}%           now \macname is the macname and \argl the arglist
+  \getargs{#1}% now \macname is the macname and \argl the arglist
   \ifx\argl\empty       % no arguments
-     \paramno=0%
+     \paramno=0
   \else
      \expandafter\parsemargdef \argl;%
   \fi
@@ -6986,28 +7074,32 @@ end
 % an opening brace, and that opening brace is not consumed.
 \def\getargs#1{\getargsxxx#1{}}
 \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs}
-\def\getmacname #1 #2\relax{\macname={#1}}
+\def\getmacname#1 #2\relax{\macname={#1}}
 \def\getmacargs#1{\def\argl{#1}}
 
 % Parse the optional {params} list.  Set up \paramno and \paramlist
 % so \defmacro knows what to do.  Define \macarg.blah for each blah
-% in the params list, to be ##N where N is the position in that list.
+% in the params list to be ##N where N is the position in that list.
 % That gets used by \mbodybackslash (above).
-
+%
 % We need to get `macro parameter char #' into several definitions.
-% The technique used is stolen from LaTeX:  let \hash be something
+% The technique used is stolen from LaTeX: let \hash be something
 % unexpandable, insert that wherever you need a #, and then redefine
 % it to # just before using the token list produced.
 %
 % The same technique is used to protect \eatspaces till just before
 % the macro is used.
 
-\def\parsemargdef#1;{\paramno=0\def\paramlist{}%
-        \let\hash\relax\let\xeatspaces\relax\parsemargdefxxx#1,;,}
+\def\parsemargdef#1;{%
+  \paramno=0\def\paramlist{}%
+  \let\hash\relax
+  \let\xeatspaces\relax
+  \parsemargdefxxx#1,;,%
+}
 \def\parsemargdefxxx#1,{%
   \if#1;\let\next=\relax
   \else \let\next=\parsemargdefxxx
-    \advance\paramno by 1%
+    \advance\paramno by 1
     \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname
         {\xeatspaces{\hash\the\paramno}}%
     \edef\paramlist{\paramlist\hash\the\paramno,}%
@@ -7015,7 +7107,7 @@ end
 
 % These two commands read recursive and nonrecursive macro bodies.
 % (They're different since rec and nonrec macros end differently.)
-
+%
 \long\def\parsemacbody#1@end macro%
 {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}%
 \long\def\parsermacbody#1@end rmacro%
@@ -7026,6 +7118,7 @@ end
 % Much magic with \expandafter here.
 % \xdef is used so that macro definitions will survive the file
 % they're defined in; @include reads the file inside a group.
+%
 \def\defmacro{%
   \let\hash=##% convert placeholders to macro parameter chars
   \ifrecursive
@@ -7089,7 +7182,8 @@ end
 % \braceorline decides whether the next nonwhitespace character is a
 % {.  If so it reads up to the closing }, if not, it reads the whole
 % line.  Whatever was read is then fed to the next control sequence
-% as an argument (by \parsebrace or \parsearg)
+% as an argument (by \parsebrace or \parsearg).
+% 
 \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx}
 \def\braceorlinexxx{%
   \ifx\nchar\bgroup\else
@@ -7099,7 +7193,8 @@ end
 
 % @alias.
 % We need some trickery to remove the optional spaces around the equal
-% sign.  Just make them active and then expand them all to nothing.
+% sign.  Make them active and then expand them all to nothing.
+%
 \def\alias{\parseargusing\obeyspaces\aliasxxx}
 \def\aliasxxx #1{\aliasyyy#1\relax}
 \def\aliasyyy #1=#2\relax{%
@@ -7687,7 +7782,7 @@ end
 % #2 is (optional) width, #3 is (optional) height.
 % #4 is (ignored optional) html alt text.
 % #5 is (ignored optional) extension.
-% #6 is just the usual extra ignored arg for parsing this stuff.
+% #6 is just the usual extra ignored arg for parsing stuff.
 \newif\ifimagevmode
 \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup
   \catcode`\^^M = 5     % in case we're inside an example
@@ -8899,8 +8994,8 @@ directory should work if nowhere else does.}
 % Prevent underfull vbox error messages.
 \vbadness = 10000
 
-% Don't be so finicky about underfull hboxes, either.
-\hbadness = 2000
+% Don't be very finicky about underfull hboxes, either.
+\hbadness = 6666
 
 % Following George Bush, get rid of widows and orphans.
 \widowpenalty=10000
index 270ee91..313a188 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES =
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
@@ -94,6 +100,7 @@ DATA = $(dist_m4data_DATA)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -282,6 +289,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 distdir: $(DISTFILES)
        @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
index aae0c28..ff3a85e 100644 (file)
 # 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.11'
+[am__api_version='1.11a'
 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.11], [],
+m4_if([$1], [1.11a], [],
       [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl
 ])
 
@@ -31,7 +31,7 @@ m4_define([_AM_AUTOCONF_VERSION], [])
 # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced.
 # This function is AC_REQUIREd by AM_INIT_AUTOMAKE.
 AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION],
-[AM_AUTOMAKE_VERSION([1.11])dnl
+[AM_AUTOMAKE_VERSION([1.11a])dnl
 m4_ifndef([AC_AUTOCONF_VERSION],
   [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl
 _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))])
index 3c1f990..61b0783 100644 (file)
@@ -6,3 +6,4 @@ parallel-tests.am
 *.log
 *.log-t
 *-p.test
+*-p.test-t
index 01acd76..122b22c 100644 (file)
@@ -26,13 +26,30 @@ txinfo5.test
 include $(srcdir)/parallel-tests.am
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
-       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+       $(AM_V_GEN)(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.*|parallel_tests=yes; &|' \
-         < $(srcdir)/$$input >$@
-       chmod a+rx $@
+$(parallel_tests): Makefile.am
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+       { echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
+         echo; \
+         echo '# Ensure proper definition of $$srcdir.'; \
+         echo 'am_skip_defs=yes'; \
+         echo '. ./defs || exit 99'; \
+         echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+         echo; \
+         echo "# Run the test with Automake's parallel-tests driver enabled."; \
+         echo 'parallel_tests=yes'; \
+         echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
+         echo "# over one in the source tree."; \
+         echo "if test -f \"./$$input\"; then"; \
+         echo "  . \"./$$input\""; \
+         echo 'else'; \
+         echo "  . \"\$$srcdir/$$input\""; \
+         echo 'fi'; \
+       } > $@-t
+       $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
 
 MAINTAINERCLEANFILES = $(parallel_tests)
 
@@ -59,6 +76,7 @@ acloca19.test \
 acloca20.test \
 acloca21.test \
 acloca22.test \
+acloca23.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
@@ -69,6 +87,7 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
@@ -112,6 +131,7 @@ badopt.test \
 badprog.test \
 block.test \
 bsource.test \
+candist.test \
 canon.test \
 canon2.test \
 canon3.test \
@@ -208,22 +228,25 @@ cond42.test \
 cond43.test \
 cond44.test \
 cond45.test \
+cond46.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -233,6 +256,9 @@ confsub.test \
 confvar.test \
 confvar2.test \
 copy.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
 ctarget1.test \
 cxx.test \
 cxx2.test \
@@ -304,6 +330,7 @@ exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
+ext3.test \
 extra.test \
 extra2.test \
 extra3.test \
@@ -312,6 +339,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 extra8.test \
+extra9.test \
 extra10.test \
 extra11.test \
 extra12.test \
@@ -330,8 +358,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -437,6 +463,7 @@ link_fc.test \
 link_fccxx.test \
 link_fcxx.test \
 link_f_only.test \
+link_override.test \
 lisp2.test \
 lisp3.test \
 lisp4.test \
@@ -456,6 +483,7 @@ ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 maintclean.test \
 make.test \
@@ -511,6 +539,7 @@ number.test \
 objc.test \
 objc2.test \
 obsolete.test \
+oldvars.test \
 order.test \
 outdir.test \
 output.test \
@@ -619,6 +648,7 @@ silent4.test \
 silent5.test \
 silent6.test \
 silent7.test \
+silent8.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
@@ -680,6 +710,7 @@ subst.test \
 subst2.test \
 subst3.test \
 subst4.test \
+subst5.test \
 substref.test \
 substre2.test \
 substtarg.test \
@@ -700,6 +731,7 @@ symlink.test \
 symlink2.test \
 syntax.test \
 tags.test \
+tags2.test \
 tagsub.test \
 tar.test \
 tar2.test \
@@ -764,6 +796,7 @@ warnopts.test \
 werror.test \
 werror2.test \
 werror3.test \
+werror4.test \
 whoami.test \
 xsource.test \
 xz.test \
@@ -784,7 +817,7 @@ $(parallel_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)
+$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
index ff547a0..81fda48 100644 (file)
@@ -1,4 +1,4 @@
-# Makefile.in generated by automake 1.11 from Makefile.am.
+# Makefile.in generated by automake 1.11a from Makefile.am.
 # @configure_input@
 
 # Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
@@ -58,14 +58,20 @@ am__aclocal_m4_deps = $(top_srcdir)/m4/amversion.m4 \
        $(top_srcdir)/m4/install-sh.m4 $(top_srcdir)/m4/lead-dot.m4 \
        $(top_srcdir)/m4/missing.m4 $(top_srcdir)/m4/mkdirp.m4 \
        $(top_srcdir)/m4/options.m4 $(top_srcdir)/m4/runlog.m4 \
-       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/strip.m4 \
-       $(top_srcdir)/m4/substnot.m4 $(top_srcdir)/m4/tar.m4 \
-       $(top_srcdir)/configure.ac
+       $(top_srcdir)/m4/sanity.m4 $(top_srcdir)/m4/silent.m4 \
+       $(top_srcdir)/m4/strip.m4 $(top_srcdir)/m4/substnot.m4 \
+       $(top_srcdir)/m4/tar.m4 $(top_srcdir)/configure.ac
 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
        $(ACLOCAL_M4)
 mkinstalldirs = $(SHELL) $(top_srcdir)/lib/mkinstalldirs
 CONFIG_CLEAN_FILES = defs aclocal-${APIVERSION} automake-${APIVERSION}
 CONFIG_CLEAN_VPATH_FILES =
+AM_V_GEN = $(am__v_GEN_$(V))
+am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
+am__v_GEN_0 = @echo "  GEN     " $@;
+AM_V_at = $(am__v_at_$(V))
+am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
+am__v_at_0 = @
 SOURCES =
 DIST_SOURCES =
 # If stdout is a non-dumb tty, use colors.  If test -t is not supported,
@@ -155,6 +161,7 @@ TEST_LOGS_TMP = $(TEST_LOGS:.log=.log-t)
 DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
 ACLOCAL = @ACLOCAL@
 AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
 APIVERSION = @APIVERSION@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
@@ -250,29 +257,12 @@ cond17.test                                       \
 gcj6.test                                      \
 txinfo5.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 \
-color2-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
-
+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 color2-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 \
@@ -297,6 +287,7 @@ acloca19.test \
 acloca20.test \
 acloca21.test \
 acloca22.test \
+acloca23.test \
 acoutnoq.test \
 acoutpt.test \
 acoutpt2.test \
@@ -307,6 +298,7 @@ acsilent.test \
 acsubst.test \
 acsubst2.test \
 all.test \
+all2.test \
 alloca.test \
 alloca2.test \
 alpha.test \
@@ -350,6 +342,7 @@ badopt.test \
 badprog.test \
 block.test \
 bsource.test \
+candist.test \
 canon.test \
 canon2.test \
 canon3.test \
@@ -446,22 +439,25 @@ cond42.test \
 cond43.test \
 cond44.test \
 cond45.test \
+cond46.test \
 condd.test \
 condhook.test \
+condhook2.test \
 condinc.test \
 condinc2.test \
 condlib.test \
 condman.test \
 condman2.test \
+condman3.test \
 configure.test \
-conf2.test \
 confdeps.test \
 conff.test \
 conff2.test \
 confh.test \
 confh4.test \
 confh5.test \
-config.test \
+confh6.test \
+confh7.test \
 confincl.test \
 conflnk.test \
 conflnk2.test \
@@ -471,6 +467,9 @@ confsub.test \
 confvar.test \
 confvar2.test \
 copy.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
 ctarget1.test \
 cxx.test \
 cxx2.test \
@@ -542,6 +541,7 @@ exeext4.test \
 exsource.test \
 ext.test \
 ext2.test \
+ext3.test \
 extra.test \
 extra2.test \
 extra3.test \
@@ -550,6 +550,7 @@ extra5.test \
 extra6.test \
 extra7.test \
 extra8.test \
+extra9.test \
 extra10.test \
 extra11.test \
 extra12.test \
@@ -568,8 +569,6 @@ fort4.test \
 fort5.test \
 fonly.test \
 fortdep.test \
-fpinst2.test \
-fpinstall.test \
 gcj.test \
 gcj2.test \
 gcj3.test \
@@ -675,6 +674,7 @@ link_fc.test \
 link_fccxx.test \
 link_fcxx.test \
 link_f_only.test \
+link_override.test \
 lisp2.test \
 lisp3.test \
 lisp4.test \
@@ -694,6 +694,7 @@ ltinstloc.test \
 ltlibobjs.test \
 ltlibsrc.test \
 ltorder.test \
+lzip.test \
 lzma.test \
 maintclean.test \
 make.test \
@@ -749,6 +750,7 @@ number.test \
 objc.test \
 objc2.test \
 obsolete.test \
+oldvars.test \
 order.test \
 outdir.test \
 output.test \
@@ -857,6 +859,7 @@ silent4.test \
 silent5.test \
 silent6.test \
 silent7.test \
+silent8.test \
 silent9.test \
 silentcxx.test \
 silentf77.test \
@@ -918,6 +921,7 @@ subst.test \
 subst2.test \
 subst3.test \
 subst4.test \
+subst5.test \
 substref.test \
 substre2.test \
 substtarg.test \
@@ -938,6 +942,7 @@ symlink.test \
 symlink2.test \
 syntax.test \
 tags.test \
+tags2.test \
 tagsub.test \
 tar.test \
 tar2.test \
@@ -1002,6 +1007,7 @@ warnopts.test \
 werror.test \
 werror2.test \
 werror3.test \
+werror4.test \
 whoami.test \
 xsource.test \
 xz.test \
@@ -1020,9 +1026,6 @@ yflags2.test \
 $(parallel_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)
 all: all-am
 
 .SUFFIXES:
@@ -1069,6 +1072,8 @@ TAGS:
 ctags: CTAGS
 CTAGS:
 
+cscope cscopelist:
+
 
 # To be appended to the command running the test.  Handle the stdout
 # and stderr redirection, and catch the exit status.
@@ -1221,6 +1226,7 @@ recheck recheck-html:
                  case $$line in FAIL*|XPASS*) echo $$f;; esac;         \
                else echo $$f; fi;                                      \
              done | tr '\012\015' '  '`;                               \
+       list=`echo "$$list" | sed 's/ *$$//'`;                          \
        $(MAKE) $(AM_MAKEFLAGS) $$target AM_MAKEFLAGS='$(AM_MAKEFLAGS) TEST_LOGS="'"$$list"'"'
 .test.log:
        @p='$<'; $(am__check_pre) $(TEST_LOG_COMPILE) "$$tst" $(am__check_post)
@@ -1256,7 +1262,6 @@ distdir: $(DISTFILES)
          fi; \
        done
 check-am: all-am
-       $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
        $(MAKE) $(AM_MAKEFLAGS) check-TESTS
 check: check-am
 all-am: Makefile
@@ -1371,15 +1376,56 @@ uninstall-am:
        maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
        pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
 
+check-p.log: check.test
+check10-p.log: check10.test
+check11-p.log: check11.test
+check2-p.log: check2.test
+check3-p.log: check3.test
+check4-p.log: check4.test
+check5-p.log: check5.test
+check6-p.log: check6.test
+check7-p.log: check7.test
+check8-p.log: check8.test
+check9-p.log: check9.test
+color-p.log: color.test
+color2-p.log: color2.test
+comment9-p.log: comment9.test
+dejagnu-p.log: dejagnu.test
+exeext4-p.log: exeext4.test
+maken3-p.log: maken3.test
+maken4-p.log: maken4.test
+pr401-p.log: pr401.test
+pr401b-p.log: pr401b.test
+pr401c-p.log: pr401c.test
 
 $(srcdir)/parallel-tests.am: gen-parallel-tests Makefile.am
-       (cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+       $(AM_V_GEN)(cd $(srcdir) && $(SHELL) ./gen-parallel-tests) >$@
+
+$(parallel_tests): Makefile.am
+       $(AM_V_at)rm -f $@ $@-t
+       $(AM_V_GEN)input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
+       { echo '#!/bin/sh'; \
+         echo '# DO NOT EDIT!  GENERATED AUTOMATICALLY!'; \
+         echo; \
+         echo '# Ensure proper definition of $$srcdir.'; \
+         echo 'am_skip_defs=yes'; \
+         echo '. ./defs || exit 99'; \
+         echo 'test -n "$$srcdir" || exit 99 # sanity check'; \
+         echo; \
+         echo "# Run the test with Automake's parallel-tests driver enabled."; \
+         echo 'parallel_tests=yes'; \
+         echo "# In the spirit of VPATH, we prefer a test in the build tree"; \
+         echo "# over one in the source tree."; \
+         echo "if test -f \"./$$input\"; then"; \
+         echo "  . \"./$$input\""; \
+         echo 'else'; \
+         echo "  . \"\$$srcdir/$$input\""; \
+         echo 'fi'; \
+       } > $@-t
+       $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
 
-$(parallel_tests): $(parallel_tests:-p.test=.test) Makefile.am
-       input=`echo $@ | sed 's,.*/,,; s,-p.test$$,.test,'`; \
-       sed 's|^\. \./defs.*|parallel_tests=yes; &|' \
-         < $(srcdir)/$$input >$@
-       chmod a+rx $@
+# Each test case depends on defs, aclocal, and automake.
+$(TEST_LOGS): defs aclocal-$(APIVERSION) automake-$(APIVERSION)
 
 clean-local: clean-local-check
 .PHONY: clean-local-check
index 7d74083..7037591 100644 (file)
@@ -5,15 +5,33 @@ User interface
 ==============
 
 
-Running all tests
+Running the tests
 -----------------
 
-  make check
+  To run all tests:
+
+    make -k check
 
   You can use `-jN' for faster completion (it even helps on a
   uniprocessor system, due to unavoidable sleep delays, as
   noted below).
 
+  To rerun only failed tests:
+
+    make -k recheck
+
+  To run only tests that are newer than their last results:
+
+    make -k check RECHECK_LOGS=
+
+  To run only selected tests:
+
+    make -k check TESTS="foo.test bar.test"
+
+  For non-GNU make, you might have to use this instead:
+
+    env TESTS="foo.test bar.test" make -e -k check
+
 
 Interpretation
 --------------
index a4e86d7..1bdf7c7 100755 (executable)
@@ -29,6 +29,7 @@ END
 
 echo 'm4_include([a.m4])' > acinclude.m4
 echo 'm4_include([b.m4])' > a.m4
+
 cat >b.m4 <<EOF
 m4_include([c.m4])
 AC_DEFUN([AM_PROG_LIBTOOL],
@@ -38,6 +39,7 @@ AC_REQUIRE([SOMETHING_ELSE])dnl
 
 AC_DEFUN([SOMETHING])
 EOF
+
 echo 'm4_include([d.m4])' > c.m4
 echo 'AC_DEFUN([SOMETHING_ELSE])' >d.m4
 
@@ -88,26 +90,32 @@ $sleep
 cat >>c.m4 <<\EOF
 AC_DEFUN([FOO], [ANOTHER_MACRO])
 EOF
+
 $MAKE
+
 # Because c.m4 has changed, aclocal.m4 must have been rebuilt.
 test `ls -1t aclocal.m4 stamp | sed 1q` = aclocal.m4
 # However, since FOO is not used, f.m4 should not be included
 # and the contents of aclocal.m4 should remain the same
-cmp aclocal.m4 stamp
-
+diff aclocal.m4 stamp
 
 # If FOO where to be used, that would be another story, of course.
 cat >>configure.in <<EOF
 FOO
 EOF
+
 cp aclocal.m4 stamp
 $sleep
+
 $MAKE
-grep 'defs/f.m4' aclocal.m4
+
+$FGREP defs/f.m4 aclocal.m4
 $MAKE testdist2
 
 # Make sure aclocal diagnose missing included files with correct `file:line:'.
 rm -f b.m4
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'a.m4:1:.*b.m4.*does not exist' stderr
+grep 'a\.m4:1: .*b\.m4.*does not exist' stderr
+
+:
index c38fac4..2599b2c 100755 (executable)
@@ -25,7 +25,7 @@ AM_MACRO1
 AM_MACRO2
 END
 
-mkdir 1 2 3 4
+mkdir 1 2 3 4 5 6
 
 cat >1/m1.m4 <<EOF
 #serial 1.8.1230.9
@@ -53,6 +53,17 @@ cat >4/mumble.m4 <<EOF
 AC_DEFUN([AM_MACRO1], [echo macro14 >> foo])
 EOF
 
+cat >5/ill-formed.m4 <<EOF
+#serial bla
+#serial .2
+#serial
+AC_DEFUN([AM_MACRO1], [echo macro15 >> foo])
+EOF
+
+cat >6/after-def.m4 <<EOF
+AC_DEFUN([AM_MACRO1], [echo macro16 >> foo])
+#serial 1
+EOF
 
 ACLOCAL_TESTSUITE_FLAGS='-I 1 -I 2 -I 3 -I 4'
 
@@ -88,7 +99,7 @@ ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2'
 rm -f foo
 $ACLOCAL --install 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep AM_MACRO2 stderr
+grep 'macro.*AM_MACRO2.*not found' stderr
 
 ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
 rm -f foo
@@ -115,4 +126,14 @@ cat stderr >&2
 cat stdout
 grep '#serial 456' stdout
 test ! -f 4/m1.m4
-grep 'installing.*4/m1.m4' stderr
+grep 'installing.*4/m1\.m4' stderr
+
+$ACLOCAL -I 5 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+test `grep -c 'ill-formed serial' stderr` -eq 3
+
+$ACLOCAL -I 6 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'serial.*before any macro definition' stderr
+
+:
index accad81..a198d9a 100755 (executable)
@@ -41,9 +41,11 @@ END
 
 $ACLOCAL
 $AUTOCONF
-./configure >stdout
+./configure >stdout || { cat stdout; Exit 1; }
 cat stdout
 grep GREPME stdout
 grep 'aconfig\.ac' aclocal.m4 && Exit 1
 grep 'bconfig\.ac' aclocal.m4 && Exit 1
 grep with-grepme configure
+
+:
diff --git a/tests/acloca23.test b/tests/acloca23.test
new file mode 100755 (executable)
index 0000000..1741e70
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure we diagnose underquoted AC_DEFUN's.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+FOO
+END
+
+mkdir m4
+cat >m4/foo.m4 <<EOF
+AC_DEFUN(FOO, [echo foo])
+EOF
+
+$ACLOCAL -I m4 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'underquoted definition.*FOO' stderr
+grep 'warning.*warning' stderr && Exit 1
+
+:
index d3437d2..da80d08 100755 (executable)
@@ -27,18 +27,20 @@ test -f fred
 $ACLOCAL --output 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'option.*--output.*an argument' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --unknown-option 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--unknown-option' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --ver 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
 grep 'unrecognized.*--ver' stderr
-grep help stderr
+grep '[Tt]ry.*--help.*for more information' stderr
 
 $ACLOCAL --versi
 
 test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+
+:
index 5cd8231..b206587 100755 (executable)
@@ -60,7 +60,7 @@ grep GREPME sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal5-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/moredefs.m4
 
 # Change the definition of AM_TEST to check that its new definition is
 # used.  Check that AC_DEFUN_ONCE is caught.
@@ -68,3 +68,5 @@ echo 'AC_DEFUN_ONCE([AM_TEST], [AC_SUBST(__$1__)])' > m4/moredefs.m4
 $MAKE
 grep 'm4/moredefs\.m4' aclocal.m4
 grep '__GREPME__' configure
+
+:
index 266d64b..ea6bac3 100755 (executable)
@@ -75,9 +75,9 @@ grep METOO sub/Makefile
 
 # Make sure configure dependencies are distributed.
 $MAKE distdir
-test -f aclocal6-1.0/m4/moredefs.m4
-test -f aclocal6-1.0/m4/somedefs.m4
-test -f aclocal6-1.0/acinclude.m4
+test -f $me-1.0/m4/moredefs.m4
+test -f $me-1.0/m4/somedefs.m4
+test -f $me-1.0/acinclude.m4
 
 # Make sure maintainer-clean works in VPATH builds.
 # (This is unrelated to the rest of this test.)
@@ -89,3 +89,5 @@ $MAKE maintainer-clean
 test ! -d ../autom4te.cache
 test ! -f Makefile
 test ! -f sub/Makefile
+
+:
index ac10aff..d935f4f 100755 (executable)
@@ -34,9 +34,9 @@ EOF
 echo 'AC_DEFUN([MACRO1],)' >m4/macro1.m4
 echo 'AC_DEFUN([MACRO2], [AC_REQUIRE([AM_UNUSED_MACRO])])' >m4/macro2.m4
 
-$ACLOCAL -I m4 >output 2>&1
-cat output
+$ACLOCAL -I m4 >output 2>&1 || { cat output; Exit 1; }
 test 0 = `wc -l <output`
 grep macro1.m4 aclocal.m4
 grep macro2.m4 aclocal.m4 && Exit 1
+
 :
index 3d761f4..791d081 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2007, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test to make sure all-local and other -local targets work correctly.
+# Test to make sure several *-local's in a single rule work.
 
 . ./defs || Exit 1
+
 set -e
 
 targets='all install-exec install-data uninstall'
-for target in $targets; do
-   echo "Doing $target"
-   echo "${target}-local:" > Makefile.am
-
-   $ACLOCAL
-   $AUTOMAKE
-
-   $FGREP "${target}-local ${target}-local" Makefile.in && Exit 1
-done
-
-# Several *-local's in a single rule.
-echo "Doing $targets"
 echo "$targets:" | sed -e 's/[ :]/-local&/g' > Makefile.am
+cat Makefile.am  # might be useful for debugging
+
 $ACLOCAL
 $AUTOMAKE
 
 for target in $targets; do
-  $EGREP "${target}-am:.*${target}-local" Makefile.in
+  grep "${target}-local" Makefile.in  # might be useful for debugging
+  grep "${target}-am:.*${target}-local" Makefile.in
 done
 
-Exit 0
+:
diff --git a/tests/all2.test b/tests/all2.test
new file mode 100755 (executable)
index 0000000..38b6f8c
--- /dev/null
@@ -0,0 +1,34 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure all-local and other -local targets work correctly.
+
+. ./defs || Exit 1
+
+set -e
+
+$ACLOCAL
+
+targets='all install-exec install-data uninstall'
+for target in $targets; do
+  : Doing $target
+  echo "${target}-local:" > Makefile.am
+  $AUTOMAKE
+  grep "${target}-local ${target}-local" Makefile.in && Exit 1
+  grep "${target}-am:.*${target}-local" Makefile.in
+done
+
+:
index d68fc54..dbdf246 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 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,3 +39,5 @@ $AUTOMAKE
 $MAKE
 grep 'it works' libfoo.a
 grep 'really works' libfoo.a
+
+:
index f0485ce..329f804 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 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
@@ -34,5 +34,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
-grep 'ARFLAGS =' Makefile.in
-grep 'AR =' Makefile.in
+grep '^ARFLAGS =' Makefile.in
+grep '^AR =' Makefile.in
+
+:
index 6c0aa3d..f1bcb76 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of basic assembly functionality
+# Test of basic assembly functionality.
+# Keep this in sync with sister tests asm2.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.s
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,51 +47,42 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -100,16 +90,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 8afd4f9..ab141e7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2006  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2006, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test of basic preprocessed assembly functionality
+# Test of basic preprocessed assembly functionality.
+# Keep this in sync with sister tests asm.test and asm3.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.S
 END
 
-: > maude.s
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -48,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -119,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
index 0738d6a..5c42c48 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test of basic preprocessed assembly functionality with extension .sx.
+# Keep this in sync with sister tests asm.test and asm2.test.
 
 . ./defs || Exit 1
 
 set -e
 
+mv configure.in configure.stub
+
 cat > Makefile.am << 'END'
 noinst_PROGRAMS = maude
 maude_SOURCES = maude.sx
 END
 
-: > maude.sx
-
-# Should fail because we need CC and CCAS.
-echo 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+echo '*** Try 1 -- should fail because we need CC and CCAS ***'
+cat configure.stub - > configure.in << 'END'
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
@@ -49,70 +48,58 @@ grep AM_PROG_AS stderr
 # bogus installations of Autoconf use a versioned cache.)
 rm -rf autom4te*.cache
 
-# We still need CCAS.
-echo 2
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 2 -- we still need CCAS ***'
+cat configure.stub - > configure.in << 'END'
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCAS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCAS.* undefined' stderr
+grep 'define .*CCAS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need CCASFLAGS.
-echo 3
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 3 -- we need CCASFLAGS ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep CCASFLAGS stderr
-grep AM_PROG_AS stderr
+grep '[Aa]ssembler source.*CCASFLAGS.* undefined' stderr
+grep 'define .*CCASFLAGS.* add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We need dependency tracking.
-echo 4
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 4 -- we need dependency tracking. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep AM_PROG_AS stderr
+grep ' add .*AM_PROG_AS' stderr
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 5
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 5 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 CCAS='$(CC)'
-AC_SUBST(CCAS)
+AC_SUBST([CCAS])
 AC_PROG_CC
-_AM_DEPENDENCIES(CCAS)
-AC_SUBST(CCASFLAGS)
-AC_OUTPUT(Makefile)
+_AM_DEPENDENCIES([CCAS])
+AC_SUBST([CCASFLAGS])
+AC_OUTPUT
 END
 
 $ACLOCAL
@@ -120,16 +107,13 @@ $AUTOMAKE
 
 rm -rf autom4te*.cache
 
-# We have every needed, expect a success.
-echo 6
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+echo '*** Try 6 -- we have everything needed, expect success. ***'
+cat configure.stub - > configure.in << 'END'
 AM_PROG_AS
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 $ACLOCAL
 $AUTOMAKE
 
-Exit 0
+:
diff --git a/tests/candist.test b/tests/candist.test
new file mode 100755 (executable)
index 0000000..0a859dd
--- /dev/null
@@ -0,0 +1,34 @@
+#! /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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure things that cannot be dist_'ed are diagnosed.
+
+. ./defs || Exit 1
+
+set -e
+
+echo AC_OUTPUT >>configure.in
+
+cat > Makefile.am << 'END'
+dist_bin_PROGRAMS = foo
+dist_lib_LIBRARIES = libfoo.a
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+test 2 -eq `grep -c 'dist.*forbidden' stderr`
+
+Exit 0
index da7a9da..22b5ed3 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile foo.h:foo.hin)
+cat >> configure.in <<'END'
+AC_CONFIG_FILES([foo.h:foo.hin])
+AC_OUTPUT
 END
 
 : > Makefile.am
 : > foo.hin
-: > stamp-h.in
 
 $ACLOCAL
 $AUTOMAKE
+
+:
index ebb2bfe..a52dfa8 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2000, 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in])
+AC_OUTPUT
 END
 
-: > zardoz.am
+echo 'dummy:' > zardoz.am
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # We actually check several things here.
-test -f zardoz.in || Exit 1
+test -f zardoz.in
 grep '^zardoz:' zardoz.in && Exit 1
-Exit 0
+grep '^dummy:' zardoz.in
+
+:
index 6fed8b9..151d015 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003
-#   Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2000, 2001, 2002, 2003, 2010 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
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:zardoz.in:two.in:three.in)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:zardoz.in:two.in:three.in])
+AC_OUTPUT
 END
 
 : > zardoz.am
@@ -35,21 +36,26 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-# We actually check several things here.
 # Automake should have created zardoz.in.
 test -f zardoz.in
 
 # The generated file should refer to zardoz.in and zardoz.am, but
 # never just "zardoz".
-echo Grep1
-grep zardoz zardoz.in | $FGREP -v 'zardoz.in' | $FGREP -v 'zardoz.am' > O || :
-# We cat the output file so we see in when verbose.
-cat O
-test -z "`cat O`"
-
+sed -e 's|zardoz\.am|zrdz.am|g' \
+    -e 's|zardoz\.in|zrdz.in|g' \
+  <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# FIXME: Do something like this after planned enahncements to tests/defs.
+# FIXME: Or even do proper functional testing.
+## Also, Makefile should depend on two.in and three.in.
+# extract_makefile_deps Makefile zardoz.in > deps
+#$FGREP ' $(srcdir)/two.in ' deps
+#$FGREP ' $(srcdir)/three.in ' deps
+#
+# FIXME: for the moment, we content ourselves with these inferior tests.
 # Makefile should depend on two.in.
-echo Grep2
 grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
 # Likewise three.in.
-echo Grep3
 grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+
+:
index cec3c86..97a4479 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile zardoz:one:two:three)
+set -e
+
+cat >> configure.in <<END
+AC_CONFIG_FILES([zardoz:two:three])
+AC_OUTPUT
 END
 
 : > Makefile.am
@@ -31,8 +33,8 @@ END
 : > two
 : > three
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # The rule should regenerate the file "zardoz".
 grep '^zardoz:one:two' Makefile.in && Exit 1
index fe97f99..c53910e 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile:Makefile.in:Makefile.dep)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile:Makefile.in:Makefile.dep])
+AC_OUTPUT
 END
 
-: > Makefile.am
 : > Makefile.dep
 
+cat > Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
 
-grep 'Makefile:Makefile.in' Makefile.in
+grep 'Makefile:Makefile\.in' Makefile.in
+grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+
+sed '/@SET_MAKE@/d' <Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
index 99877c5..4fb738e 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(demo/Makefile demo/version.good:demo/version.gin)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
+AC_OUTPUT
 END
 
 mkdir demo
 
-: > demo/Makefile.am
 : > demo/version.gin
 
+cat > demo/Makefile.am <<'END'
+.PHONY: test
+test:
+       case ' $(DIST_COMMON) ' in \
+         *' $(srcdir)/version.gin '*) exit 0;; \
+         *) exit 1;; \
+       esac
+END
+
 $ACLOCAL
 $AUTOMAKE
+
+$EGREP 'Makefile:.*(demo|version)' demo/Makefile.in && Exit 1
+grep 'version\.good:.*version\.gin' demo/Makefile.in
+
+sed '/@SET_MAKE@/d' <demo/Makefile.in >Makefile.sed
+$MAKE -f Makefile.sed SHELL=$SHELL test
+
+:
index 4df6a13..4195188 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+AC_INIT([colon7], [1.0])
+AM_INIT_AUTOMAKE
+dnl: Please do not add proper m4 quoting here.
 AC_OUTPUT(subdir/bar:subdir/foo \
    Makefile \
    subdir/Makefile
@@ -34,8 +38,8 @@ mkdir subdir
 : > subdir/Makefile.am
 : > subdir/foo
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # shouldn't have any bar.in
 grep 'bar.in' subdir/Makefile.in && Exit 1
@@ -43,4 +47,4 @@ grep 'bar.in' subdir/Makefile.in && Exit 1
 # DIST_COMMON should have foo, not subdir/foo
 grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
 
-Exit 0
+:
index 21b5e87..6c66b53 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -37,7 +37,7 @@ EOF
 
 $ACLOCAL
 AUTOMAKE_fails
-grep '^Makefile.am:5: blank line following trailing backslash' stderr
+grep '^Makefile.am:5: error: blank line following trailing backslash' stderr
 
 
 ## Here is a second test because head comments are
@@ -54,7 +54,7 @@ var = foo
 EOF
 
 AUTOMAKE_fails
-grep '^Makefile.am:2: blank line following trailing backslash' stderr
+grep '^Makefile.am:2: error: blank line following trailing backslash' stderr
 
 
 ## Make sure we print an 'included' stack on errors.
@@ -66,8 +66,9 @@ cat > Makefile.inc << 'EOF'
 EOF
 
 AUTOMAKE_fails
-grep '^Makefile.inc:2: blank line following trailing backslash' stderr
+grep '^Makefile.inc:2: error: blank line following trailing backslash' stderr
 grep '^Makefile.am:1: .*included from here' stderr
+grep -v '^Makefile.am:1: .*error:' stderr
 
 
 ## Make sure backslashes are still allowed within a comment.
diff --git a/tests/cond46.test b/tests/cond46.test
new file mode 100755 (executable)
index 0000000..0b8696c
--- /dev/null
@@ -0,0 +1,110 @@
+#! /bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Ensure the right condition is listed after `else' and `endif'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([USE_A],[test x = y])
+AM_CONDITIONAL([USE_B],[test x = z])
+AC_OUTPUT
+END
+
+$ACLOCAL
+
+cat > Makefile.am << 'END'
+if USE_A
+endif !USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+endif USE_B
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif USE_A
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else
+endif !USE_A
+END
+
+$AUTOMAKE
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else
+endif !USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'endif.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_A
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else USE_B
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+if USE_B
+else USE_A
+endif
+endif
+END
+
+AUTOMAKE_fails
+grep 'else.*incompatible with current conditional' stderr
+
+cat > Makefile.am << 'END'
+if USE_A
+else !USE_A
+endif
+END
+
+$AUTOMAKE
index 84afdd0..50101a6 100755 (executable)
@@ -48,12 +48,16 @@ $ACLOCAL
 $AUTOMAKE 2>stderr &
 pid=$!
 
+# MSYS bash seems to have a bug in kill, so don't try to kill too soon;
+# and avoid maintainer-check test.
+sleep '2'
+
 # Make at most 30 tries, one every 10 seconds (= 300 seconds = 5 min).
 try=1
 while test $try -le 30; do
   if kill -0 $pid; then
     : process $pid is still alive, wait and retry
-    sleep 10
+    sleep '10'
     try=`expr $try + 1`
   else
     cat stderr >&2
index 0e9b6e8..b70d691 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set -e
 cat >> configure.in << 'END'
 AC_PROG_CC
 dnl Define a macro with the same name as the conditional to exhibit
-dnl any underquotted bug.
+dnl any underquoted bug.
 AC_DEFUN([COND1], ["some'meaningless;characters`])
 AM_CONDITIONAL([COND1], false)
 AC_CONFIG_FILES([foo/Makefile])
@@ -68,3 +68,5 @@ grep "meaningless;characters" configure && Exit 1
 $AUTOMAKE
 ./configure
 $MAKE test
+
+:
index 06fa887..bf9225b 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2004, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2007, 2010 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,7 @@
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test install when a conditional install-*-hook is not defined.
+# Keep this in sync with sister test condhook2.test.
 # Report by Nik A. Melchior (PR/428).
 
 . ./defs || Exit 1
@@ -22,7 +23,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TEST, false)
+AM_CONDITIONAL([TEST], [false])
 AC_OUTPUT
 END
 
@@ -30,7 +31,7 @@ cat > Makefile.am << 'END'
 sysconf_DATA = mumble
 if TEST
 install-data-hook:
-       echo foo
+       : > $(top_srcdir)/bad
 endif
 END
 
@@ -39,5 +40,11 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE install
+test -f inst/etc/mumble
+test ! -f bad
+
+:
diff --git a/tests/condhook2.test b/tests/condhook2.test
new file mode 100755 (executable)
index 0000000..45e2d43
--- /dev/null
@@ -0,0 +1,49 @@
+#!/bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test install when a conditional install-*-hook is defined.
+# Keep this in sync with sister test condhook.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([TEST], [true])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+sysconf_DATA = mumble
+if TEST
+install-data-hook:
+       : > $(top_srcdir)/good
+endif
+END
+
+: > mumble
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure --prefix "`pwd`/inst"
+
+$MAKE install
+test -f inst/etc/mumble
+test -f good
+
+:
index 088fb55..7210a5b 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2003, 2009, 2010  Free Software
+# Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +22,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AM_CONDITIONAL(TOBE, false)
+AM_CONDITIONAL([TOBE], [false])
 END
 
 cat > Makefile.am << 'END'
@@ -38,4 +39,24 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'adjunct:3: too many conditionals closed' stderr
+grep 'adjunct:3: error: too many conditionals closed' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+       rule
+END
+
+AUTOMAKE_fails
+grep 'unterminated conditionals' stderr
+
+cat > adjunct << 'END'
+if TOBE
+target: dependency
+       rule
+endif
+END
+
+$AUTOMAKE
+
+:
index 3dc8bcd..ee2d41b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure conditionals work with man pages.
+
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
-AM_CONDITIONAL(FRED, true)
+AM_CONDITIONAL([FRED], [true])
 END
 
 cat > Makefile.am << 'END'
@@ -29,8 +32,7 @@ man_MANS = joe.1
 endif
 END
 
-: > foo.1
-: > joe.1
-
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index 0b448e2..c0e7216 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Make sure appropriate man install targets generated in all cases.
+
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 man_MANS = foo.1 foo.2
 man5_MANS = foo.5
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^install-man1:' Makefile.in
+grep '^install-man2:' Makefile.in
+grep '^install-man5:' Makefile.in
 
-grep '^install-man1:' Makefile.in || Exit 1
-grep '^install-man2:' Makefile.in || Exit 1
-grep '^install-man5:' Makefile.in || Exit 1
+:
diff --git a/tests/condman3.test b/tests/condman3.test
new file mode 100755 (executable)
index 0000000..ff93daf
--- /dev/null
@@ -0,0 +1,65 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Make sure conditionals work with man pages.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [test x"$FOO" = x"true"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+if COND
+man_MANS = foo.1
+else
+man_MANS = bar.2
+endif
+
+.PHONY: test1 test2
+test1:
+       test -f $(mandir)/man1/foo.1
+       test ! -f $(mandir)/man2/bar.2
+test2:
+       test ! -f $(mandir)/man1/foo.1
+       test -f $(mandir)/man2/bar.2
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+mkdir dir1
+cd dir1
+../configure FOO=true --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > foo.1
+$MAKE install
+$MAKE test1
+
+cd ..
+mkdir dir2
+cd dir2
+../configure FOO=false --prefix="`pwd`/_inst"
+sed -n '/man_MANS/p' Makefile # useful for debugging
+: > bar.2
+$MAKE install
+$MAKE test2
+
+:
index 8e1cc64..679e801 100755 (executable)
@@ -24,11 +24,11 @@ echo "FOO = foo" > Makefile.am
 
 $ACLOCAL
 
-echo "$me: Generated by aclocal..."
+echo "$me: Generated by aclocal ..."
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in
 
-echo "$me: Not generated by aclocal..."
+echo "$me: Not generated by aclocal ..."
 # Pretend it is not from aclocal (remove the signature),
 # but keep it correct, i.e., with AM_INIT_AUTOMAKE etc.
 sed -n '3,$p' aclocal.m4 >aclocal.m4t
@@ -36,4 +36,4 @@ mv -f aclocal.m4t aclocal.m4
 $AUTOMAKE
 grep '^\$(ACLOCAL_M4):' Makefile.in && Exit 1
 
-Exit 0
+:
index 353cb8e..dc6677c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -93,3 +93,5 @@ grep 'bot2 rule' stdout
 cd ..
 
 $MAKE distcheck
+
+:
index 0c53067..a0101e1 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +20,8 @@
 
 set -e
 
+# We avoid using configure.in stub initialized by ./defs, since we need
+# to keep track of line numbers (to grep for error messages).
 cat > configure.in << END
 AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE
@@ -30,5 +32,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'configure.in:3:.*AC_CONFIG_FILES' stderr
-grep 'configure.in:4:.*AC_CONFIG_HEADERS' stderr
+grep 'configure\.in:3:.* arguments .*AC_CONFIG_FILES' stderr
+grep 'configure\.in:4:.* arguments .*AC_CONFIG_HEADERS' stderr
+
+:
index 772a763..552ce5c 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2006  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2006, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
-AC_OUTPUT(Makefile include/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([include/config.h])
 END
 
 : > Makefile.am
@@ -33,24 +33,26 @@ mkdir include
 : > include/Makefile.am
 : > include/config.h.in
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
-   :loop
-   p
-   n
-   t clear
-   :clear
-   s/\\$/\\/
-   t loop
-   p
-   n
-   }' -e '/^DIST_COMMON =/ p' Makefile.in | grep acconfig.h) || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+perl -ne '
+if (s/^DIST_COMMON *=//)
+{
+  $_ .= <> while (s/\\$//);
+  $_ = " $_ ";
+  s/\s+/ /g;
+  print "$_\n";
+  exit 0;
+}' Makefile.in > dc.txt
+cat dc.txt # might be useful for debugging.
+$FGREP ' acconfig.h ' dc.txt
 
 # Make sure re-running automake in a different way generates same
 # Makefile.in.
-mv Makefile.in save
-$ACLOCAL || Exit 1
-$AUTOMAKE Makefile || Exit 1
-cmp Makefile.in save
+mv Makefile.in Makefile.sav
+$ACLOCAL
+$AUTOMAKE Makefile
+diff Makefile.sav Makefile.in
+
+:
index 6fd4a07..bab2d53 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(include/config.h)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([include/Makefile])
+AM_CONFIG_HEADER([include/config.h])
 AC_PROG_CC
-AC_OUTPUT(Makefile include/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -50,4 +49,6 @@ mkdir include
 $ACLOCAL
 $AUTOMAKE
 
-$EGREP '^DEFAULT_INCLUDES =.* -I(\.|\$\(top_builddir\))/include' Makefile.in
+grep '^DEFAULT_INCLUDES =.* -I\$(top_builddir)/include' Makefile.in
+
+:
index febe000..9af83dc 100755 (executable)
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST([FOO], [name])
-AC_CONFIG_FILES(include/config.h.in)
-AC_CONFIG_HEADERS(config.h)
-AC_CONFIG_HEADERS(include/config.h)
+AC_SUBST([FOO], [NameToBeGrepped])
+AC_CONFIG_FILES([include/config.h.in])
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_HEADERS([include/config.h])
 AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
+.PHONY: test
 test: distdir
        test -f $(distdir)/config.h.in
        test -f $(distdir)/include/config.h.in.in
@@ -51,6 +52,10 @@ $MAKE
 $sleep
 echo '#undef @FOO@' > include/config.h.in.in
 $MAKE include/config.h
-grep '/\*.*#undef.*name' include/config.h
+# Don't try to be too strict in this grepping, since the substutition
+# is done by config.status, and we don't have too much control on it.
+grep '/\*.*#undef.*NameToBeGrepped' include/config.h
 $MAKE test
 $MAKE distcheck
+
+:
similarity index 84%
rename from tests/config.test
rename to tests/confh6.test
index bed9a92..de55be7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1998, 2000, 2001, 2002, 2003, 2010 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
@@ -24,7 +25,7 @@ required=GNUmake
 set -e
 
 cat >> configure.in << 'END'
-AM_CONFIG_HEADER(subdir/config.h)
+AM_CONFIG_HEADER([subdir/config.h])
 AC_OUTPUT
 END
 
@@ -39,8 +40,8 @@ $AUTOMAKE
 $MAKE
 
 $sleep
-echo '#define FOO' > subdir/config.h.in
+echo '#define gRePmE' > subdir/config.h.in
 $MAKE subdir/config.h
-grep FOO subdir/config.h
+$FGREP gRePmE subdir/config.h
 
 $MAKE distcheck
similarity index 83%
rename from tests/conf2.test
rename to tests/confh7.test
index 8e53733..3d0e54a 100755 (executable)
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONFIG_HEADER(config.h two.h)
-AC_PROG_CC
-AC_OUTPUT(Makefile)
+cat >> configure.in << 'END'
+AM_CONFIG_HEADER([config.h two.h])
 END
 
 : > Makefile.am
@@ -36,3 +32,15 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+# Try again with more macros.
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+$ACLOCAL --force
+$AUTOMAKE
+
+:
index 838da68..0773a00 100755 (executable)
 
 set -e
 
-cat >configure.ac <<\EOF
-AC_INIT
-AM_INIT_AUTOMAKE([configure], [1.0])
+cat >configure.ac <<EOF
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([an-invalid-automake-option])
 AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
-EOF
-
-cat >configure.in <<EOF
-AC_INIT([configure], [1.0])
-AM_INIT_AUTOMAKE([an-invalid-automake-option])
-AC_CONFIG_FILES([Makefile])
-AC_OUTPUT
 EOF
 
 : >Makefile.am
 
 $ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
 
 $ACLOCAL -Wno-error 2>stderr || { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 # Ensure we really proceed with configure.ac.
 AUTOMAKE_fails -Werror
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 AUTOMAKE_run 0 -Wno-error
-grep 'configure.ac.*configure.in.*both present' stderr
-grep 'proceeding.*configure.ac' stderr
+grep 'configure\.ac.*configure\.in.*both present' stderr
+grep 'proceeding.*configure\.ac' stderr
 
 :
index dd0b63e..c4f0cde 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
 
-cat > Makefile.am << 'EOF'
+cat > Makefile.am << 'END'
 bin_PROGRAMS = fred
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$FGREP '@CONFIG_INCLUDE_SPEC@' Makefile.in && Exit 1
 
-if grep '@CONFIG_INCLUDE_SPEC@' Makefile.in; then
-   Exit 1
-fi
-Exit 0
+:
index 6bc5970..8dfafbc 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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
@@ -29,12 +29,12 @@ mkdir sdir
 mkdir sdir-no-make
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(dest2:src)
-AC_CONFIG_LINKS(sdir/dest3:src)
-AC_CONFIG_LINKS(dest4:sdir/src2)
-AC_CONFIG_LINKS(sdir/dest5:sdir/src2 sdir-no-make/dest6:src)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([dest2:src])
+AC_CONFIG_LINKS([sdir/dest3:src])
+AC_CONFIG_LINKS([dest4:sdir/src2])
+AC_CONFIG_LINKS([sdir/dest5:sdir/src2 sdir-no-make/dest6:src])
 AC_OUTPUT
 EOF
 
index 8a045be..8c68c38 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/src2
@@ -42,10 +43,10 @@ mkdir sdir-no-make
 : > sdir-no-make/src4
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(dest:src)
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir-no-make/dest3:sdir/src3)
-AC_CONFIG_LINKS(sdir/dest4:sdir-no-make/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([dest:src])
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir-no-make/dest3:sdir/src3])
+AC_CONFIG_LINKS([sdir/dest4:sdir-no-make/src4])
 AC_OUTPUT
 EOF
 
@@ -54,3 +55,5 @@ $AUTOMAKE
 $AUTOCONF
 ./configure
 $MAKE test
+
+:
index 00e9da2..20f4786 100755 (executable)
@@ -23,6 +23,7 @@ set -e
 
 cat > Makefile.am << 'END'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test ! -r $(distdir)/sdir/dest3
        test ! -r $(distdir)/sdir/dest2
@@ -41,16 +42,16 @@ mkdir sdir
 : > sdir/src3
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
+AC_CONFIG_FILES([sdir/Makefile])
 my_src_dir=sdir
 my_dest=dest
-AC_CONFIG_LINKS(sdir/dest2:src2 sdir/dest3:$my_src_dir/src3)
-AC_CONFIG_LINKS($my_dest:src)
+AC_CONFIG_LINKS([sdir/dest2:src2 sdir/dest3:$my_src_dir/src3])
+AC_CONFIG_LINKS([$my_dest:src])
 # the following is a link whose source is itself a link
-AC_CONFIG_LINKS(dest4:sdir/dest2)
+AC_CONFIG_LINKS([dest4:sdir/dest2])
 # Some package prefer to compute links.
 cmplink='dest5:src';
-AC_CONFIG_LINKS($cmplink)
+AC_CONFIG_LINKS([$cmplink])
 AC_OUTPUT
 EOF
 
@@ -79,9 +80,9 @@ test -r dest5 # ditto
 rm -f dest dest5
 test ! -r dest4
 
-## Cannot do the following, because at the time of writing Autoconf
-## (2.59) does not support AC_CONFIG_LINKS source in the build tree.
-# mkdir build
-# cd build
-# ../configure
-# $MAKE test
+mkdir build
+cd build
+../configure
+$MAKE test
+
+:
index 4bedf52..fd96054 100755 (executable)
@@ -34,17 +34,20 @@ mkdir nonmk-subdir sdir sdir/mk-subdir
 
 cat >> Makefile.am <<'EOF'
 SUBDIRS = sdir
+.PHONY: test
 test: distdir
        test -f $(distdir)/src
        test -f $(distdir)/sdir/src2
+       test -f $(distdir)/nonmk-subdir/src3
+       test -f $(distdir)/sdir/mk-subdir/src4
 EOF
 
 cat >>configure.in << 'EOF'
-AC_CONFIG_FILES(sdir/Makefile)
-AC_CONFIG_LINKS(src:src)
-AC_CONFIG_LINKS(sdir/src2:sdir/src2)
-AC_CONFIG_LINKS(nonmk-subdir/src3:nonmk-subdir/src3)
-AC_CONFIG_LINKS(sdir/mk-subdir/src4:sdir/mk-subdir/src4)
+AC_CONFIG_FILES([sdir/Makefile])
+AC_CONFIG_LINKS([src:src])
+AC_CONFIG_LINKS([sdir/src2:sdir/src2])
+AC_CONFIG_LINKS([nonmk-subdir/src3:nonmk-subdir/src3])
+AC_CONFIG_LINKS([sdir/mk-subdir/src4:sdir/mk-subdir/src4])
 AC_OUTPUT
 EOF
 
@@ -56,7 +59,6 @@ mkdir build
 cd build
 ../configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make clean'
@@ -84,7 +86,6 @@ test -r sdir/mk-subdir/src4 && Exit 1
 cd ..
 ./configure
 
-# TODO: Make sure links are distributed
 $MAKE test
 
 # Make sure nothing is deleted by `make distclean'
@@ -94,3 +95,5 @@ test -f src
 test -f sdir/src2
 test -f nonmk-subdir/src3
 test -f sdir/mk-subdir/src4
+
+:
index 65ec91b..a0d4fe3 100755 (executable)
@@ -39,8 +39,8 @@ END
 
 echo 'Before.' > subdir/config.hin
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
 
 # Make sure subdir Makefile.in doesn't itself look in the subdir.
 # One line is allowed though:
@@ -49,11 +49,13 @@ $AUTOMAKE || Exit 1
 ($FGREP 'subdir/config.h' subdir/Makefile.in |
    $FGREP -v 'cd $(top_builddir)') && Exit 1
 
-$AUTOCONF || Exit 1
-./configure || Exit 1
+$AUTOCONF
+./configure
 $FGREP 'Before.' subdir/config.h
 
 $sleep
 echo 'After.' > subdir/config.hin
-$MAKE || Exit 1
-$FGREP 'After.' subdir/config.h || Exit 1
+$MAKE
+$FGREP 'After.' subdir/config.h
+
+:
index 99811b0..13cc7dd 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(QBERT)
+AC_SUBST([QBERT])
 END
 
 : > Makefile.am
@@ -29,4 +29,6 @@ END
 $ACLOCAL
 $AUTOMAKE
 
-grep '^QBERT' Makefile.in
+grep '^QBERT =' Makefile.in
+
+:
index 75c02dc..1cfd2d3 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -21,7 +21,7 @@
 set -e
 
 cat >> configure.in << 'END'
-AC_SUBST(OTHER_SCRIPTS)
+AC_SUBST([OTHER_SCRIPTS])
 END
 
 cat > Makefile.am << 'END'
@@ -30,3 +30,7 @@ END
 
 $ACLOCAL
 $AUTOMAKE
+
+grep '^OTHER_SCRIPTS =' Makefile.in
+
+:
diff --git a/tests/cscope.test b/tests/cscope.test
new file mode 100755 (executable)
index 0000000..e79520f
--- /dev/null
@@ -0,0 +1,109 @@
+#! /bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test cscope functionality.
+
+required=
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_PROG_CC
+AC_PROG_CXX
+AC_PROG_FC
+AM_PROG_GCJ
+AM_PATH_LISPDIR
+AC_OUTPUT
+END
+
+mkdir sub sub/subsub
+
+cat >Makefile.am <<'END'
+SUBDIRS = sub
+bin_PROGRAMS = foo
+foo_SOURCES = foo.c bar.cpp baz.f90
+lisp_LISP = foo.el
+EXTRA_DIST = foo.el
+END
+
+cat >sub/Makefile.am <<'END'
+bin_PROGRAMS = bar
+bar_SOURCES = subsub/dist.c
+nodist_bar_SOURCES = subsub/gen.c
+subsub/gen.c:
+       $(MKDIR_P) subsub
+       echo 'int generated_subsub () { return 0; }' > $@
+CLEANFILES = subsub/gen.c
+END
+
+echo 'int foo_func () { return 0; }' > foo.c
+echo 'int main () { return 0; }' > bar.cpp
+cat > baz.f90 <<'END'
+      subroutine baz
+      end
+END
+: >foo.el
+echo 'int main () { return 0; }' > sub/subsub/dist.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+mkdir build
+cd build
+../configure || Exit 77
+
+$MAKE -n cscope
+
+: ${CSCOPE=cscope}
+( $CSCOPE --version ) >/dev/null 2>&1 || Exit 77
+
+$MAKE cscope 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+
+test -f cscope.files
+$FGREP foo.c cscope.files
+$FGREP bar.cpp cscope.files
+$FGREP sub/subsub/dist.c cscope.files
+$FGREP sub/subsub/gen.c cscope.files
+
+cp cscope.files cscope.files1
+$MAKE cscope
+diff cscope.files cscope.files1
+
+$MAKE distclean
+test ! -f cscope.files
+test ! -f cscope.out
+test ! -f cscope.in.out
+test ! -f cscope.po.out
+
+
+`pwd`/../configure || Exit 77
+
+$MAKE cscope 2>stderr || { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep 'cannot find file' stderr && Exit 1
+$MAKE || Exit 77
+$MAKE distclean
+
+cd ..
+./configure
+$MAKE distcheck
+
+:
similarity index 65%
rename from tests/fpinst2.test
rename to tests/cscope2.test
index c6b4900..106b801 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# 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
 # 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 "reversed" order of AC_PROG_INSTALL and
-# AC_PROG_INSTALL is not buggy.
+# The `cscope' target should not fail if there are no sources.
 
+required=
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
-END
+set -e
 
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
+cat >> configure.in << 'END'
+AC_OUTPUT
 END
+: >Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE cscope
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+:
diff --git a/tests/cscope3.test b/tests/cscope3.test
new file mode 100755 (executable)
index 0000000..03e1d47
--- /dev/null
@@ -0,0 +1,41 @@
+#! /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 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# The `cscope' target should not fail if there are no sources in a subdir.
+# In practice this means `cscope' should not be invoked if cscope.files
+# is empty.
+
+required=cscope
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+mkdir sub
+echo 'SUBDIRS = sub' >Makefile.am
+: >sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE cscope
+
+:
index af4a3cd..b5cc99e 100644 (file)
@@ -2,7 +2,7 @@
 # @configure_input@
 #
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009, 2010 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
 # Defines for Automake testing environment.
 # Tom Tromey <tromey@cygnus.com>
 
+# Absolutely necessary variable(s).
+srcdir=${srcdir-'@abs_srcdir@'}
+
+# Protect this file against multiple inclusion, useful for generated tests.
+if test x"$am_skip_defs" = xyes; then
+  unset am_skip_defs
+
+else # Do proper testcase setup.
+
 # Be more Bourne compatible.
 # (Snippet copied from configure's initialization in Autoconf 2.64)
 DUALCASE=1; export DUALCASE # for MKS sh
@@ -40,12 +49,6 @@ test -f ./defs || {
    exit 1
 }
 
-if test -z "$srcdir"; then
-   # compute $srcdir.
-   srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
-   test "$srcdir" = $0 && srcdir=.
-else :; fi
-
 # Ensure $srcdir is set correctly.
 test -f "$srcdir/defs.in" || {
    echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
@@ -176,6 +179,10 @@ do
       rm -f $priv_check_temp
       test $overwrite_status = 0 && exit 77
       ;;
+    perl-threads)
+      # Skip with Devel::Cover: it cannot cope with threads.
+      test "$WANT_NO_THREADS" = yes && exit 77
+      ;;
     python)
       # Python doesn't support --version, it has -V
       echo "$me: running python -V"
@@ -434,3 +441,5 @@ AUTOMAKE_fails ()
 set -x
 
 pwd
+
+fi # Proper testcase setup.
index 8b9be29..d5b6c78 100755 (executable)
@@ -40,12 +40,11 @@ END
 
 cp subdir/Makefile.am subdir2/Makefile.am
 
-: > subdir/foo.c
-: > subdir2/foo.c
-
 $ACLOCAL
 $AUTOMAKE --add-missing
 
 # There used to be a bug where this was created in the first subdir with C
 # sources in it instead of in $top_srcdir or $ac_auxdir
 test -f depcomp
+
+:
index 2b4353c..e8e4a67 100755 (executable)
@@ -43,11 +43,12 @@ END
 : > subdir/foo.c
 
 # Ignore user CFLAGS.
-CFLAGS=
-export CFLAGS
+unset CFLAGS || :
 
 $ACLOCAL
 $AUTOMAKE --add-missing
 $AUTOCONF
-./configure CC='gcc' 2>error.log
-test -z "`cat error.log`"
+./configure 2>stderr || { cat stderr >&2; Exit 1; }
+test ! -s stderr
+
+:
index 2a5db60..513a01d 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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,14 +32,15 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
 mkdir src
 
-touch src/foo.h
+: > src/foo.h
 
 cat >src/sub.c <<EOF
 #include "foo.h"
@@ -60,3 +61,5 @@ grep am_cv_CC_dependencies_compiler_type configure
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
 $MAKE check
 $MAKE grepdeps
+
+:
index 7d22894..4f2df97 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2010 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,8 +31,9 @@ cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = liba.la
 liba_la_SOURCES = a.c foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'a.lo *:' ./$(DEPDIR)/a.Plo
+       grep 'a\.lo *:' ./$(DEPDIR)/a.Plo
 END
 
 : > foo.h
@@ -51,7 +52,9 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=makedepend
-$MAKE >output 2>&1
+$MAKE >output 2>&1 || { cat output; Exit 1; }
 cat output
 grep 'unknown directive' output && Exit 1
 $MAKE grepdeps
+
+:
index 9637288..9a4e1b1 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2010 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
@@ -19,6 +19,8 @@
 required='icc'
 . ./defs || Exit 1
 
+set -e
+
 # Automake supports icc since version 7.0 through a dedicated depcomp mode.
 # icc 8.0 and greater understand gcc options, so depmode is set to gcc.
 if icc -V -help 2>&1 | grep 'Version 7'; then
@@ -27,8 +29,6 @@ else
   expect='depmode=gcc'
 fi
 
-set -e
-
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
@@ -40,8 +40,9 @@ AUTOMAKE_OPTIONS = subdir-objects
 check_PROGRAMS = prg
 prg_SOURCES = src/sub.c src/foo.h
 
+.PHONY: grepdeps
 grepdeps:
-       grep 'src/sub.$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
+       grep 'src/sub\.\$(OBJEXT).*:' src/$(DEPDIR)/sub.Po
 
 END
 
@@ -66,3 +67,5 @@ $AUTOMAKE -a
 grep "$expect" Makefile
 $MAKE check
 $MAKE grepdeps
+
+:
index 0b6a7f5..7fc651f 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2010 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
@@ -24,7 +24,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_RANLIB
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -86,7 +86,7 @@ $AUTOCONF
 $AUTOMAKE -a
 
 ./configure --enable-dependency-tracking
-$MAKE 
+$MAKE
 
 # check that dependency tracking works
 if grep 'depmode=none' Makefile; then :
@@ -94,6 +94,11 @@ else
   cd sub2
   $sleep
   echo 'choke me' > sub3/ba3.h
-  if $MAKE; then Exit 1; fi
+  # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+  # versions of the BSD shell wrongly exit when the `errexit' shell
+  # flag is active if a command within "&&" fails inside a compound
+  # statement.
+  if $MAKE; then Exit 1; else :; fi
 fi
+
 :
index 67702c7..695041a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2006, 2007, 2010 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
@@ -25,7 +25,7 @@ cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AM_PROG_LIBTOOL
-AC_CONFIG_FILES(sub2/Makefile)
+AC_CONFIG_FILES([sub2/Makefile])
 AC_OUTPUT
 END
 
@@ -88,8 +88,9 @@ $AUTOCONF
 $AUTOMAKE -a
 
 for staticshared in --disable-shared "" --disable-static; do
+
   ./configure --enable-dependency-tracking $staticshared
-  $MAKE 
+  $MAKE
 
   # check that dependency tracking works
   if grep 'depmode=none' Makefile; then :
@@ -97,7 +98,11 @@ for staticshared in --disable-shared "" --disable-static; do
     cd sub2
     $sleep
     echo 'choke me' > sub3/ba3.h
-    if $MAKE; then Exit 1; fi
+    # Do not use `$MAKE && Exit 1' here, since even relatively-recent
+    # versions of the BSD shell wrongly exit when the `errexit' shell
+    # flag is active if a command within "&&" fails inside a compound
+    # statement.
+    if $MAKE; then Exit 1; else :; fi
     cd ..
   fi
 
@@ -106,4 +111,7 @@ for staticshared in --disable-shared "" --disable-static; do
   test ! -f sub2/sub3/ba3.d
 
   echo 'extern int x;' > sub2/sub3/ba3.h
+
 done
+
+:
index 3ea5096..c14d94c 100755 (executable)
@@ -42,6 +42,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails --add-missing subdir/Makefile
-grep 'full run' stderr
+grep 'without.*Makefile.*arguments' stderr
 
 :
diff --git a/tests/ext3.test b/tests/ext3.test
new file mode 100755 (executable)
index 0000000..0a691c5
--- /dev/null
@@ -0,0 +1,41 @@
+#! /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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Cover corner cases of derive_suffix wrt. file extensions:
+# - extension declared with SUFFIXES but with no suffix rule for it
+# - extension with a suffix rule but none that leads us to $(OBJEXT)
+# In both cases, we don't try to create a rule; but we shouldn't
+# fail either, because magic might be happening behind our back.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar
+foo_SOURCES = foo.goo
+SUFFIXES = .goo
+bar_SOURCES = bar.woo
+.woo.zoo: ; making a zoo $@ from a woo $<
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+Exit 0
diff --git a/tests/extra9.test b/tests/extra9.test
new file mode 100755 (executable)
index 0000000..fefd385
--- /dev/null
@@ -0,0 +1,46 @@
+#!/bin/sh
+# Copyright (C) 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 of the License, 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.
+
+# Ensure we warn about substitutions in bin_PROGRAMS if EXTRA_PROGRAMS
+# are missing; but only if the former is not AC_SUBSTed itself
+# (lib_LIBRARIES is in the same boat here).
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([lib_LIBRARIES])
+AC_SUBST([bins])
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+bin_PROGRAMS = @bins@
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr
+grep 'lib_LIBRARIES.*contains configure substitution' stderr && Exit 1
+
+Exit 0
index 39f5d1e..d2a5c13 100755 (executable)
@@ -35,8 +35,18 @@ while read tst; do
      || grep "parallel_tests=['\"]yes" $tst >/dev/null
   then :; else echo $tst; fi;
 done |
+sed -e 's/\.test$//' |
 {
   echo "## Generated by gen-parallel-tests.  Edit Makefile.am instead of this."
-  echo "parallel_tests = \\"
-  sed 's,\.test$,-p.test,; $!s,$, \\,'
+  echo "parallel_tests ="
+  # Since `foo-p.test' sources `foo.test', `foo-p.log' also depends on
+  # `foo.test'.
+  sed -e '
+    h
+    s/^/parallel_tests += /
+    s/$/-p.test/
+    p
+    x
+    s/.*/&-p.log: &.test/
+  '
 }
diff --git a/tests/link_override.test b/tests/link_override.test
new file mode 100755 (executable)
index 0000000..41788a1
--- /dev/null
@@ -0,0 +1,46 @@
+#! /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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Test to make sure _LINK variables are detected and used as documented.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz boo
+foo_LINK = $(LINK)
+bar_LINK = $(LINK)
+bar_LDFLAGS = $(AM_LDFLAGS)
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+# We should use foo_LINK not LINK.
+grep '.\$(foo_LINK)' Makefile.in
+grep '.\$(LINK).*foo' Makefile.in && Exit 1
+
+# We should not override the user definition of bar_LINK.
+# IOW, bar_LDFLAGS is useless unless bar_LINK refers to it.
+grep '^ *bar_LINK *=.*bar_LDFLAGS' Makefile.in && Exit 1
+grep '.\$(bar_LINK).*bar' Makefile.in
+
+Exit 0
index 13a2183..bdd00c4 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2010  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
@@ -45,29 +45,35 @@ VAR = 1 \
 END
 
 $ACLOCAL
-AUTOMAKE_fails
+AUTOMAKE_fails -Wno-error
 
 # Smash the useless difference of lib file locations.
 sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
 cat >expected <<\EOF
-Makefile.am:12: VAR multiply defined in condition TRUE ...
+Makefile.am:12: warning: VAR multiply defined in condition TRUE ...
 Makefile.am:8: ... `VAR' previously defined here
-automake: libfoo_a_OBJECTS should not be defined
+automake: error: libfoo_a_OBJECTS should not be defined
 Makefile.am:3:   while processing library `libfoo.a'
-automake: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
+automake: error: use `libfoo_a_LDADD', not `libfoo_a_LIBADD'
 Makefile.am:3:   while processing library `libfoo.a'
-library.am: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)'
+library.am: warning: deprecated feature: target `libfoo.a' overrides `libfoo.a$(EXEEXT)'
 library.am: change your target to read `libfoo.a$(EXEEXT)'
 Makefile.am:3:   while processing library `libfoo.a'
 program.am: target `libfoo.a$(EXEEXT)' was defined here
 Makefile.am:1:   while processing program `libfoo.a'
-program.am: redefinition of `libfoo.a$(EXEEXT)'...
+program.am: warning: redefinition of `libfoo.a$(EXEEXT)' ...
 Makefile.am:1:   while processing program `libfoo.a'
 library.am: ... `libfoo.a' previously defined here
 Makefile.am:3:   while processing library `libfoo.a'
-tags.am: redefinition of `ctags'...
+tags.am: warning: redefinition of `ctags' ...
 program.am: ... `ctags$(EXEEXT)' previously defined here
 Makefile.am:6:   while processing program `ctags'
 EOF
 
 diff expected observed || Exit 1
+
+AUTOMAKE_fails -Werror
+sed 's,^.*lib/am/\([a-z]*\.am\),\1,' stderr >observed
+( echo 'automake: warnings are treated as errors'; cat expected ) \
+  | diff - observed || Exit 1
+:
index bb3203a..18d306d 100755 (executable)
@@ -1,5 +1,5 @@
 #!/bin/sh
-# Copyright (C) 2008, 2009  Free Software Foundation, Inc.
+# Copyright (C) 2008, 2009, 2010  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
@@ -49,13 +49,13 @@ AUTOMAKE_fails --add-missing
 # whether automake installs config.guess and config.sub.
 
 cat >expected <<'END'
-Makefile.am:5: sub/liba2.la multiply defined in condition COND
+Makefile.am:5: error: 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.
-Makefile.am:4: liba1.la multiply defined in condition COND
+Makefile.am:4: error: liba1.la multiply defined in condition COND
 Makefile.am:4: `liba1.la' should be installed in `pkglib' in condition COND ...
 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.
+Makefile.am:2: Libtool libraries can be built for only one destination
 END
 
 grep '^Makefile.am' stderr | diff - expected
similarity index 64%
rename from tests/fpinstall.test
rename to tests/lzip.test
index 6c645eb..fecbc83 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2010  Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for bug reported by Thomas Morgan.  If both AC_PROG_INSTALL and
-# AC_PROG_INSTALL appear in configure.in, bad error results.
+# Check support for no-dist-gzip with lzip
 
+required=lzip
 . ./defs || Exit 1
 
+set -e
+
 cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile)
+AC_INIT([lzip], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzip])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
-cat > Makefile.am <<'END'
-bin_SCRIPTS = zot
+cat > Makefile.am << 'END'
+test: distcheck
+       test $(DIST_ARCHIVES) = lzip-1.0.tar.lz
+       test -f $(DIST_ARCHIVES)
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test
diff --git a/tests/oldvars.test b/tests/oldvars.test
new file mode 100755 (executable)
index 0000000..7a2bb71
--- /dev/null
@@ -0,0 +1,37 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Use of these variables is deprecated:
+# LISP, HEADERS, DATA, SCRIPTS, LTLIBRARIES, LIBRARIES, PROGRAMS, MANS.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >Makefile.am <<\EOF
+DATA =
+HEADERS =
+LIBRARIES =
+LISP =
+LTLIBRARIES =
+MANS =
+PROGRAMS =
+SCRIPTS =
+EOF
+
+$ACLOCAL
+AUTOMAKE_fails
+test `grep -c anachronism stderr` -eq 8
index 4aef628..c46377b 100755 (executable)
@@ -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
@@ -35,6 +35,7 @@
 #
 # This test checks (0), (1), and (2).  See sister tests for further coverage.
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e
index 20225a0..d929740 100755 (executable)
@@ -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
@@ -20,6 +20,7 @@
 # 4) warning and normal error output should be identical, in that duplicate
 #    warnings should be omitted in the same way as without threads,
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e
index 5db9c67..104376a 100755 (executable)
@@ -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
@@ -21,6 +21,7 @@
 #    with --add-missing, even with concurrent file requirements, and the
 #    installation of aux files should be race-free,
 
+required=perl-threads
 . ./defs || Exit 1
 
 set -e
index 4e03d37..88b2cb7 100755 (executable)
@@ -37,10 +37,10 @@ AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
-# Makefile.am:4: Cannot apply `+=' because `INCLUDES' is not defined in
+# Makefile.am:4: cannot apply `+=' because `INCLUDES' is not defined in
 # Makefile.am:4: the following conditions:
 # Makefile.am:4:   !CHECK
-# Makefile.am:4: Either define `INCLUDES' in these conditions, or use
+# Makefile.am:4: either define `INCLUDES' in these conditions, or use
 # Makefile.am:4: `+=' in the same conditions as the definitions.
 
 # Is !CHECK mentioned?
index fb30a1d..7d65bea 100755 (executable)
@@ -55,10 +55,10 @@ AUTOMAKE_fails
 
 # We expect the following diagnostic:
 #
-# Makefile.am:19: Cannot apply `+=' because `B' is not defined in
+# Makefile.am:19: cannot apply `+=' because `B' is not defined in
 # Makefile.am:19: the following conditions:
 # Makefile.am:19:   !COND1 and !COND3
-# Makefile.am:19: Either define `B' in these conditions, or use
+# Makefile.am:19: either define `B' in these conditions, or use
 # Makefile.am:19: `+=' in the same conditions as the definitions.
 #
 # It would be nice if Automake could print only COND3_FALSE and
index 258a8ef..ceb2729 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006 Free Software
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2006, 2010 Free Software
 # Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for bug reported in PR 2.
+# "make dist" fails for AC_OUTPUT(README.foo:templ/README.foo.in).
+#
+# == Report ==
+# When my AC_OUTPUT macro in configure.in contains something
+# like the following (among the Makefiles)
+#       README.foo:templ/README.foo.in
+# the generated dist target in the Makefile.in fails,
+# because DIST_COMMON will contain templ/README.foo.in
+# and the dist target will try to copy templ/README.foo.in
+# to the distribution directory before it creates a templ
+# subdirectory in the distribution directory.
 
 . ./defs || Exit 1
 
 set -e
 
+# Please keep this underquoted and old-style.
 cat > configure.in << 'END'
 AC_INIT
 AM_INIT_AUTOMAKE(nonesuch, nonesuch)
@@ -38,3 +50,5 @@ $AUTOMAKE
 ./configure
 $MAKE distdir
 test -f nonesuch-nonesuch/templ/README.foo.in
+
+:
index 2944449..22a1e54 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 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
@@ -22,13 +22,10 @@ required='bison gcc'
 
 set -e
 
-cat > configure.in <<'EOF'
-AC_INIT(pr204, 0.1)
-AM_INIT_AUTOMAKE
+cat >> configure.in <<'EOF'
 AM_MAINTAINER_MODE
 AC_PROG_CC
 AC_PROG_YACC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 EOF
 
@@ -64,8 +61,10 @@ cp parse.y parse2.y
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure
 $MAKE distdirtest
+
 # Make sure parse.c and parse2.c are still targets.
 $MAKE parse.c parse2.c
 test -f parse.c
@@ -78,3 +77,5 @@ touch parse.y
 $sleep
 $MAKE parse.c parse2.c
 test `ls -1t parse.c parse.y | sed 1q` = parse.c
+
+:
index 9344fd2..6778f7a 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 211.
+#
+# == Description ==
+# Suppose you have a library and an ltlibrary in the same
+# directory which use the same source:
+#
+#   libfoo_la_SOURCES = foo.c
+#   libbar_a_SOURCES = foo.c
+#
+# In this case foo.c will be compiled twice but using different
+# compilers.  This is a conflict.  In this case the user should
+# rename one of the `foo.o's.
 
 required=libtoolize
 . ./defs || Exit 1
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(hello,0.23)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -40,3 +49,5 @@ libtoolize
 $ACLOCAL
 AUTOMAKE_fails -a
 $FGREP 'foo.$(OBJEXT)' stderr
+
+:
index 25e1f0e..95212ab 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004, 2008  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2008, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR automake/220.
+# Test for problems when conditionals are not actually defined.
+# Check that the problems is diagnosed by configure.
+# This isn't perfect (ideally we'd like an error from autoconf),
+# but it is the best we can do.  It certainly makes it easier
+# to debug the problem.
+# Note that this should be also in the documentation.
 
 required=gcc
 . ./defs || Exit 1
 
 set -e
 
-cat >main.c <<EOF
+cat > main.c <<'EOF'
 int main() { return 0; }
 EOF
 
@@ -57,4 +64,6 @@ cd build
 # configure should fail since we've done something invalid.
 ../configure 2>stderr && { cat stderr >&2; Exit 1; }
 cat stderr >&2
-grep NEVER_TRUE stderr
+grep 'conditional.*NEVER_TRUE' stderr
+
+:
index fdcb997..00a7aad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-# Test for $(top_srcdir) with dependencies.
+# Test for PR automake/224: $(top_srcdir) w.r.t. dependencies.
+#
+# == Description ==
+# Dependency tracking data should be stored in in the relative path
+# of the source file, as opposed the object file.
+# I.e., for `foo.c' in `$(top_srcdir)/bar', being built in
+# `$(top_srcdir)/build', the location of the `.deps' directory
+# should be `$(top_builddir)/bar/.deps'.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 mkdir foo
 
 cat >foo/main.c <<'EOF'
@@ -31,30 +40,24 @@ bin_PROGRAMS = bar
 bar_SOURCES = foo/main.c
 EOF
 
-cat >configure.in <<'EOF'
-AC_INIT(foo/main.c)
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+cat >>configure.in <<'EOF'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 EOF
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
 
 cd build
-CC='gcc' ../configure
-$MAKE
+../configure
 
+$MAKE
 test -d foo/.deps
 $MAKE distclean
 test -d foo/.deps && Exit 1
+
 :
index a97ef4f..0d3f153 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 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 +14,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/>.
 
+# Test for PR automake/229.
 # Make sure AC_CYGWIN requires config.{sub,guess}.
 # Reported by James Youngman.
 
@@ -29,5 +30,8 @@ EOF
 
 $ACLOCAL
 $AUTOMAKE -a
+
 test -f config.sub
 test -f config.guess
+
+:
index a5e869e..58fb2a8 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 243.
+# AM_OUTPUT_DEPENDENCY_COMMANDS doesn't handle
+# `Makefile:Makefile.in:tail.mk' in AC_OUTPUT.
+#
+# == Report ==
+# If configure.in has something like:
+#       AC_OUTPUT(Makefile:Makefile.in:tail.mk)
+# then config.status cannot parse the Makefile to build the
+# dependency files in the .deps directory.  This is because
+# the AM_OUTPUT_DEPENDENCY_COMMANDS macro cannot cope with
+# the colon in the CONFIG_FILES variable.
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile:Makefile.in:tail.mk)
+AC_CONFIG_FILES([Makefile:Makefile.in:tail.mk])
 AC_OUTPUT
 END
 
 : > tail.mk
 
 cat > Makefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS  = 3dfx.h linutil.h
+noinst_HEADERS   = fx64.h fxdll.h fximg.h fxglob.h \
+                   fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
 ./configure || Exit $?
 
 test -f .deps/fx64.Po
+
+:
index a1cd2fe..2bace6f 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 266.
+# Dependency tracking -vs- nonstandard Makefile names
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
-AC_CONFIG_FILES(Maudefile)
+AC_CONFIG_FILES([Maudefile])
 AC_OUTPUT
 END
 
 cat > Maudefile.am << 'END'
-include_HEADERS         = 3dfx.h linutil.h
-noinst_HEADERS          = fx64.h fxdll.h fximg.h fxglob.h \
-                          fxos.h fxver.h glob.h
+include_HEADERS = 3dfx.h linutil.h
+noinst_HEADERS  = fx64.h fxdll.h fximg.h fxglob.h \
+                  fxos.h fxver.h glob.h
 noinst_PROGRAMS = fxmisc
-fxmisc_SOURCES    = fx64.c fximg.c fxos.c linutil.c
+fxmisc_SOURCES  = fx64.c fximg.c fxos.c linutil.c
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$AUTOCONF || Exit 1
-./configure || Exit $?
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+# FIXME: require compiler in $required rather than skipping here
+./configure --enable-dependency-tracking || Exit $?
 
 test -f .deps/fx64.Po
+
+:
index 286e33a..f4e6fb2 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Another test related to PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
@@ -37,8 +44,10 @@ endif
 bin_PROGRAMS = foo
 END
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^@FOOTEST_TRUE@foo_DEPENDENCIES *= *zardoz$' Makefile.in
+grep '^@FOOTEST_FALSE@foo_DEPENDENCIES *= *maude$' Makefile.in
 
-grep '@foo_DEPENDENCIES = zardoz' Makefile.in || Exit 1
-grep '@foo_DEPENDENCIES = maude' Makefile.in || Exit 1
+:
index 50dff53..d658668 100755 (executable)
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 279.
+# Multiple DEPENDENCIES on conditionals.
+# Please keep this in sync with sister test pr279-2.test.
+#
+# == Report ==
+# When defining xxx_LDADD and xxx_DEPENDENCIES variables where the
+# xxx_LDADD one contains values set in conditionals, automake will
+# fail with messages like:
+#       foo_DEPENDENCIES was already defined in condition TRUE, ...
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AM_CONDITIONAL(FOOTEST, false)
-AC_CONFIG_FILES(Makefile)
+AM_CONDITIONAL([FOOTEST], [false])
 AC_OUTPUT
 END
 
@@ -39,5 +46,7 @@ foo_LDADD = ${xtralib}
 foo_DEPENDENCIES =
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index 58553b5..3a6f902 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(foo, 0.1, dev@null)
-AM_INIT_AUTOMAKE
+set -e
+
+cat >> configure.in << 'END'
 AC_PROG_CC
-AC_CONFIG_FILES(Makefile)
 AC_OUTPUT
 END
 
@@ -38,13 +37,15 @@ END
 
 chmod +x foo
 
-set -e
-
 mkdir install
 
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
+
 ./configure "--prefix=`cd install && pwd`"
+
 $MAKE
 $MAKE distdir
+
+:
index 3d2fde5..ee46b4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2007, 2010 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
@@ -46,7 +46,9 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE
 
 test -f subdir/liba.a
@@ -66,3 +68,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.a
 test -f inst/lib/subdir/libb.a
+
+:
index c6f9a5e..c47f32e 100755 (executable)
@@ -48,8 +48,10 @@ libtoolize
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
-$MAKE V=1 >stdout
+
+$MAKE V=1 >stdout || { cat stdout; Exit 1; }
 cat stdout
 
 grep 'liba.la .*-rpath .*lib' stdout
@@ -75,3 +77,5 @@ $MAKE install-strip
 
 test -f inst/lib/liba.la
 test -f inst/lib/subdir/libb.la
+
+:
index 0b226c6..917a8a2 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2007, 2010 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,8 +63,12 @@ END
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --copy --add-missing
+
 ./configure --prefix "`pwd`/inst"
+
 $MAKE test-all
 $MAKE test-install
 $MAKE test-uninstall
 $MAKE test-install-strip
+
+:
index 0091415..7676c4b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2010 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
 # Test for PR 307: depcomp with depmode=dashmstdout libtool race condition
 # Report from Laurent Morichetti.
 # (Also exercises check_LTLIBRARIES.)
+#
+# == Report ==
+#  The dashmstdout depmode calls libtool in parallel to generate the
+#  dependencies (with -M flag) and to build the objfile (both have
+#  --mode=compile and -o).
+#  The process with 'libtool --mode=compile .* -M' can corrupt the objfile
+#  as none is generated by the compiler.  Since --mode=compile and -o are
+#  set libtool assumes that a objfile should be generated and will execute
+#  invalid $mv & $LN_S.
+#
+# == Fix ==
+#  Now 'depcomp' never compute dependencies in the background, as this can
+#  cause races with libtool.  Compute the dependencies after the actual
+#  compilation.
 
 required='libtoolize gcc'
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,8 +50,8 @@ librace_la_SOURCES = a.c b.c c.c d.c e.c f.c g.c h.c
 # Make sure the dependencies are updated.
 check-local:
        for i in $(librace_la_SOURCES:.c=.Plo); do \
-         echo checking ./$(DEPDIR)/$$i; \
-         grep foo.h ./$(DEPDIR)/$$i >tst || exit 1; \
+         echo "checking ./$(DEPDIR)/$$i"; \
+         grep 'foo\.h' ./$(DEPDIR)/$$i >tst || exit 1; \
          test `wc -l <tst` -eq 2 || exit 1; \
        done
 END
@@ -49,8 +65,6 @@ int $i() { return 0; }
 EOF
 done
 
-set -e
-
 libtoolize --force
 $ACLOCAL
 $AUTOCONF
@@ -61,6 +75,7 @@ $AUTOMAKE -a
 grep am_cv_CC_dependencies_compiler_type configure
 
 ./configure am_cv_CC_dependencies_compiler_type=dashmstdout
+
 $MAKE
 test -f librace.la && Exit 1
 $MAKE check
@@ -75,3 +90,5 @@ $MAKE check
 
 test -f librace.la
 test -f tst # a proof that check-local was run
+
+:
index 7a092bf..b68b5ed 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -178,3 +178,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index f7f6344..8e296ef 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -179,3 +179,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index fc2f5de..8682dc0 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2005, 2006, 2007  Free Software Foundation, Inc.
+# Copyright (C) 2005, 2006, 2007, 2010 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
@@ -181,3 +181,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE distcheck
+
+:
index d67c17b..ab911ad 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR 72
+# Empty _SOURCES results in $(LINK) undefined.
+
 required=libtool
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AC_PROG_LIBTOOL
@@ -34,7 +38,9 @@ END
 : > config.guess
 : > config.sub
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '^LINK =' Makefile.in
 
-grep '^LINK ' Makefile.in
+:
index 369849b..31e6482 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2000, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2000, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for PR automake/87.
+# "make distcheck" fails when two source dirs exist.
 
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 subdirs="foo bar"
 
 for i in $subdirs; do
@@ -36,7 +39,7 @@ echo "SUBDIRS = $subdirs" > Makefile.am
 cat >configure.in <<EOF
 AC_INIT(`echo $subdirs | sed 's|\([a-z][a-z]*\).*|\1/\1.c|'`)
 AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(test_am, 1.0)
+AM_INIT_AUTOMAKE($me, 1.0)
 AC_PROG_CC
 AC_OUTPUT(Makefile `echo $subdirs | sed 's|\([a-z][a-z]*\)|\1/Makefile|g'`)
 EOF
@@ -45,15 +48,11 @@ EOF
 CFLAGS=
 export CFLAGS
 
-touch README NEWS AUTHORS ChangeLog
-
 mkdir build
 
-# We use gcc and not gcc -traditional as the latter fails on some
-# Linux boxes (Red Hat 5.1 in particular).
-$ACLOCAL \
-   && $AUTOCONF \
-   && $AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
 
 # Regression test for bug where `.c.o:' is followed by blank line.
 (while read line; do
@@ -61,11 +60,15 @@ $ACLOCAL \
        read next
        if test -z "$next"; then
          Exit 1
+       else
+          : # for shells with broken 'set -e'
        fi
        break
     fi
  done) < foo/Makefile.in || Exit 1
 
-cd build \
-   && ../configure \
-   && $MAKE distcheck || Exit 1
+cd build
+../configure
+$MAKE distcheck
+
+:
index dab9734..4638b52 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 Free Software Foundation, Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # Test for bug in PR 9.
+# "make dist" incorrect when AC_CONFIG_AUX_DIR is present.
+#
+# == Report ==
+# When AC_CONFIG_AUX_DIR is set (in my case to `support'), make dist
+# no longer automatically includes config.guess, config.sub, install-sh,
+# ltconfig, ltmain.sh, mdate-sh, missing, and mkinstalldirs.  In fact,
+# the entire `support/' directory is omitted.
 
 required=gzip
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(support)
-AM_INIT_AUTOMAKE(pr9, 0)
-AC_OUTPUT(Makefile)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([support])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 : > Makefile.am
 
 mkdir support
 
-$ACLOCAL || Exit 1
+$ACLOCAL
+
+$AUTOCONF
+$AUTOMAKE -a -c
+./configure
+$MAKE
+$MAKE distcheck
+
+distdir=$me-1.0
+
+gzip -d $distdir.tar.gz
 
-$AUTOCONF || Exit 1
-$AUTOMAKE -a -c || Exit 1
-./configure || Exit 1
-$MAKE || Exit 1
-$MAKE distcheck || Exit 1
+tar tf $distdir.tar | $FGREP support
 
-gunzip pr9-0.tar.gz || Exit 1
+tar xf $distdir.tar
+ls -l . $distdir # for debugging
+test -d $distdir/support
+ls -l $distdir/support # for debugging
+test -f $distdir/support/install-sh
 
-tar tf pr9-0.tar | $FGREP support
+:
index 8199bd4..8ba92ef 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2010 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,8 @@
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 END
@@ -27,5 +29,7 @@ bnidir = $(prefix)/bni
 bni_PROGRAMS = zardoz
 EOF
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
index ac5e54f..a866f8f 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 2010 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 +27,7 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep 'EXTRA_PROGRAMS' stderr
+grep 'bin_PROGRAMS.*configure substitution' stderr
+grep 'EXTRA_PROGRAMS.*not defined' stderr
+
+:
index faa7aed..2fb3a60 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002, 2003  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 2001, 2002, 2003, 2010 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
@@ -29,4 +30,6 @@ END
 
 $ACLOCAL
 AUTOMAKE_fails
-grep EXTRA_PROGRAMS stderr
+grep 'EXTRA_PROGRAMS.*configure substitution' stderr
+
+:
index 578d053..afccd0c 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2004  Free Software Foundation, Inc.
+# Copyright (C) 2004, 2010 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,3 +38,5 @@ $AUTOCONF
 $AUTOMAKE
 ./configure
 $MAKE
+
+:
index 8881b9d..31745b7 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1996, 1998, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
+set -e
+
 cat > Makefile.am << 'END'
 bin_SCRIPTS = zardoz qbert brownie
 END
 
-$ACLOCAL || Exit 1
+$ACLOCAL
 $AUTOMAKE
+
+:
diff --git a/tests/silent8.test b/tests/silent8.test
new file mode 100755 (executable)
index 0000000..4c08da0
--- /dev/null
@@ -0,0 +1,68 @@
+#!/bin/sh
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Check texinfo rules in silent-rules mode.
+
+required='makeinfo-html tex texi2dvi-o dvips'
+. ./defs
+
+set -e
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+info_TEXINFOS = foo.texi
+EOF
+
+cat > foo.texi <<'EOF'
+\input texinfo
+@c %**start of header
+@setfilename foo.info
+@settitle foo manual
+@c %**end of header
+@bye
+EOF
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure --disable-silent-rules
+
+# Make sure that all labels work in silent-mode
+$MAKE V=0 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'DVIPS    foo.ps' stdout || Exit 1
+grep 'MAKEINFO foo.html' stdout || Exit 1
+# NetBSD make will print `./foo.info' instead of `foo.info'.
+grep 'MAKEINFO.*foo.info' stdout || Exit 1
+grep 'TEXI2DVI foo.dvi' stdout || Exit 1
+grep 'TEXI2PDF foo.pdf' stdout || Exit 1
+
+# Now make sure the labels don't appear in verbose mode.
+$MAKE clean || Exit 1
+$MAKE V=1 dvi html info ps pdf >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'DVIPS    foo.ps' stdout && Exit 1
+grep 'MAKEINFO foo.html' stdout && Exit 1
+grep 'MAKEINFO.*foo.info' stdout && Exit 1
+grep 'TEXI2DVI foo.dvi' stdout && Exit 1
+grep 'TEXI2PDF foo.pdf' stdout && Exit 1
+
+:
index 64edd0e..39dc1b9 100755 (executable)
@@ -39,10 +39,10 @@ cat stderr >&2
 grep 'install.*compile' stderr
 test -f compile
 
-$FGREP 'generic/a.$(OBJEXT)' Makefile.in
+grep '^generic/a\.\$(OBJEXT):' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
 
 # Opportunistically test for a different bug.
-grep '^generic/b.\$(OBJEXT):.*dirstamp' Makefile.in
+grep '^generic/b\.\$(OBJEXT):.*dirstamp' Makefile.in
 
 :
index a589e45..dbddf29 100755 (executable)
@@ -21,8 +21,8 @@ required=gcc  # avoid compiler errors.
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 AM_INIT_AUTOMAKE([subdir-objects])
 
 AM_PROG_AS
@@ -45,8 +45,6 @@ mkdir src
 : >src/c.s
 : >d.s
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE -a
@@ -54,3 +52,5 @@ $AUTOMAKE -a
 ./configure
 $MAKE
 $MAKE distcheck
+
+:
index 1282f80..87a4671 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 1999, 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2010 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
@@ -35,4 +35,6 @@ $AUTOMAKE
 
 $FGREP 'generic/a.$(OBJEXT)' Makefile.in
 grep '[^/]a\.\$(OBJEXT)' Makefile.in && Exit 1
-$FGREP -e '-c -o' Makefile.in
+grep '.*-c -o' Makefile.in
+
+:
index a4ba765..4fe685c 100755 (executable)
@@ -1,6 +1,6 @@
 #! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006  Free Software
-# Foundation, Inc.
+# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2006, 2010 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
@@ -22,16 +22,17 @@ required=gcc
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(sub/hello.c)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
 dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(hello,0.23)
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AC_PROG_CC_STDC
 AM_PROG_CC_C_O
 AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -63,3 +64,5 @@ $AUTOMAKE -a
 ./configure
 ANSI2KNR=./ansi2knr U=_ $MAKE -e
 ./hello
+
+:
index f98ae5b..ead2305 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
 
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
 AC_PROG_CXX
-AC_OUTPUT(d1/Makefile d2/Makefile)
+AC_CONFIG_FILES([d1/Makefile d2/Makefile])
+AC_OUTPUT
 END
 
 mkdir d1 d2
@@ -43,7 +46,9 @@ END
 : > compile
 : > d2/z.c
 
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '\$(CC) .*\.\./d2/z\.c' d1/Makefile.in
 
-grep 'CC.*z' d1/Makefile.in
+:
index 9c9568a..c857e73 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(generic/a.c)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([generic/Makefile])
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile generic/Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
@@ -36,10 +37,12 @@ mkdir generic
 : > generic/a.c
 : > generic/Makefile.am
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
+
 ./configure
+
 $MAKE dist
+
+:
index 42b6e14..228a1e9 100755 (executable)
@@ -1,5 +1,6 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2003, 2004, 2010 Free Software Foundation,
+# Inc.
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -20,6 +21,8 @@
 required=gcc
 . ./defs || Exit 1
 
+set -e
+
 cat >> configure.in << 'END'
 AM_PROG_CC_C_O
 AC_OUTPUT
@@ -38,9 +41,6 @@ test-distclean: distclean
        test ! -f generic/$(am__dirstamp)
 END
 
-# The ac-init file.
-: > f
-
 mkdir generic
 cat > generic/a.c << 'END'
 #include <stdio.h>
@@ -51,8 +51,6 @@ int main ()
 }
 END
 
-set -e
-
 $ACLOCAL
 $AUTOCONF
 $AUTOMAKE --include-deps --copy --add-missing
@@ -86,3 +84,5 @@ cd build2
 ../configure
 $MAKE
 $MAKE mostlyclean
+
+:
index d77670c..dd1a8fe 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2004, 2010 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
 
 set -e
 
-cat > configure.in << 'END'
-AC_INIT(f)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
 END
 
 cat > Makefile.am << 'END'
index 63a02d1..ae9b09b 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2001, 2002  Free Software Foundation, Inc.
+# Copyright (C) 2001, 2002, 2010 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
 
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AC_CONFIG_AUX_DIR(tools)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([tools])
+AM_INIT_AUTOMAKE
 AC_PROG_CC
 AM_PROG_CC_C_O
-AC_OUTPUT(Makefile foo/Makefile)
+AC_CONFIG_FILES([Makefile foo/Makefile])
+AC_OUTPUT
 END
 
 mkdir tools foo foo/bar
@@ -33,12 +36,14 @@ cat > Makefile.am << 'END'
 SUBDIRS = foo
 END
 
-cat > foo/Makefile.am << 'EOF'
+cat > foo/Makefile.am << 'END'
 AUTOMAKE_OPTIONS = subdir-objects
 bin_PROGRAMS = mumble
 mumble_SOURCES = bar/a.c
-EOF
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+test -f tools/compile
 
-$ACLOCAL || Exit 1
-$AUTOMAKE --add-missing || Exit 1
-test -f tools/compile || Exit 1
+:
index 2b331e0..2045d58 100755 (executable)
 required='libtoolize g++'
 . ./defs || Exit 1
 
-cat > configure.in << 'END'
-AC_INIT(x, 0, x)
-AM_INIT_AUTOMAKE([subdir-objects])
+set -e
 
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([subdir-objects])
 AC_PROG_CXX
 AM_PROG_LIBTOOL
-
 AC_CONFIG_FILES([Makefile])
 AC_OUTPUT
 END
@@ -33,7 +33,7 @@ END
 cat > Makefile.am << 'END'
 noinst_LTLIBRARIES = libfoo.la
 libfoo_la_SOURCES = src/foo.cc .//src/bar.cc  # the `.//' is meant.
-
+.PHONY: print
 print:
        @echo BEG1: "$(LTCXXCOMPILE)" :1END
        @echo BEG2: "$(CXXLINK)" :2END
@@ -55,7 +55,6 @@ int doit2 (void)
 }
 END
 
-set -e
 
 libtoolize --force
 $ACLOCAL
@@ -65,17 +64,19 @@ $AUTOMAKE -a
 # Skip this test on configure errors (e.g., broken C++ compilers).
 ./configure || Exit 77
 
-# opportunistically check that --tag=CXX is used when supported
-if test -n "`./libtool --help | grep tag=TAG`"; then
-  $MAKE print >stdout
+# Opportunistically check that --tag=CXX is used when supported.
+if ./libtool --help | grep tag=TAG; then
+  $MAKE print >stdout || { cat stdout; Exit 1; }
   cat stdout
   grep 'BEG1: .*--tag=CXX.*--mode=compile.* :1END' stdout
   grep 'BEG2: .*--tag=CXX.*--mode=link.* :2END' stdout
 fi
 
 $MAKE
-$MAKE distcheck 2>&1 | tee out
+$MAKE distcheck >output 2>&1 || { cat output; Exit 1; }
+cat output
 # GNU Make used to complain that the Makefile contained two rules
 # for `src/.dirstamp' and `.//src/.dirstamp'.
-grep 'overriding commands' out && Exit 1
+grep 'overriding commands' output && Exit 1
+
 :
index 79584cf..a8128bb 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2010 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,3 +70,5 @@ dobj=`sed -n '/^am_d_OBJECTS = / {
                p
               }' Makefile.in`
 test "$cobj" = "$dobj"
+
+:
diff --git a/tests/subst5.test b/tests/subst5.test
new file mode 100755 (executable)
index 0000000..7ffa1ad
--- /dev/null
@@ -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 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# Complain about configure substitutions in EXTRA_PRIMARY variables.
+# Rationale: we need to know the literal values of, say, PROGRAMS.
+# Thus, we allow substitutions in bin_PROGRAMS, but then EXTRA_PROGRAMS
+# needs to list possible values of that substitution, literally.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_CC
+AC_SUBST([substed1])
+AC_SUBST([substed2])
+END
+
+cat > Makefile.am <<'END'
+bin_PROGRAMS = @substed1@
+EXTRA_PROGRAMS = @substed2@
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bin_PROGRAMS.*contains configure substitution' stderr && Exit 1
+grep 'EXTRA_PROGRAMS.*contains configure substitution' stderr
+
+Exit 0
diff --git a/tests/tags2.test b/tests/tags2.test
new file mode 100755 (executable)
index 0000000..f6e018c
--- /dev/null
@@ -0,0 +1,44 @@
+#! /bin/sh
+# Copyright (C) 2010 Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# TAGS_DEPENDENCIES only make sense if other tag-worthy things (such as
+# sources) exist.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat >Makefile.am << 'END'
+TAGS_DEPENDENCIES = foo
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr
+
+cat >>Makefile.am << 'END'
+bin_PROGRAMS = bar
+END
+
+AUTOMAKE_run 0
+grep 'define.*TAGS_DEPENDENCIES.*without' stderr && Exit 1
+
+:
index 6b738ab..f7467f5 100755 (executable)
@@ -30,7 +30,7 @@ L05 = "$(bad boy)"
 L06 = $(this:is= ok)
 L07 = ${three errors}${on this} $(long line)
 L08$(o u c h): $(wildcard *.c)
-       ${another error}
+       ${another Error}
        echo $${ok-this is}
 L11: $(thisis) $(ok)
        ${here}
@@ -70,7 +70,7 @@ grep 'on this' stderr
 grep 'long line' stderr
 grep 'o u c h' stderr
 grep 'wildcard' stderr
-grep 'another error' stderr
+grep 'another Error' stderr
 grep 'thisis' stderr && Exit 1
 grep 'here' stderr && Exit 1
 
index 6d96400..b472164 100755 (executable)
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2002, 2003, 2004  Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2004, 2010  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
@@ -46,14 +46,15 @@ END
 $ACLOCAL
 AUTOMAKE_fails
 # The expected diagnostic is
-#   Makefile.am:3: unused variable: `foo_SOURCES'
-#   sub/Makefile.am:2: `INCLUDES' is the old name for `AM_CPPFLAGS'
+#   Makefile.am:3: warning: variable `foo_SOURCES' is defined but no program or
+#                           library has `foo' as canonical name (possible typo)
+#   sub/Makefile.am:2: warning: `INCLUDES' is the old name for `AM_CPPFLAGS'
 grep '^Makefile.am:.*foo_SOURCES' stderr
 grep '^sub/Makefile.am:.*INCLUDES' stderr
 grep '^sub/Makefile.am:.*foo_SOURCES' stderr && Exit 1
 grep '^Makefile.am:.*INCLUDES' stderr && Exit 1
 # Only three lines of warnings.
-test `wc -l < stderr` = 3
+test `grep -v 'warnings are treated as errors' stderr | wc -l` = 3
 
 # On fast machines the autom4te.cache created during the above run of
 # $AUTOMAKE is likely to have the same time stamp as the configure.in
diff --git a/tests/werror4.test b/tests/werror4.test
new file mode 100755 (executable)
index 0000000..831d0fd
--- /dev/null
@@ -0,0 +1,68 @@
+#! /bin/sh
+# Copyright (C) 2010  Free Software Foundation, Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program.  If not, see <http://www.gnu.org/licenses/>.
+
+# -Werror and local -Werror settings should be flagged for the user.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<\END
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+cat >sub/Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
+SUB = foo
+SUB = bar
+END
+cat >Makefile.am <<\END
+AUTOMAKE_OPTIONS = -Werror
+VAR = foo
+VAR = bar
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' sub/Makefile.am > t
+mv -f t sub/Makefile.am
+
+AUTOMAKE_fails -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+sed '/AUTOMAKE_OPTIONS/d' Makefile.am > t
+mv -f t Makefile.am
+
+AUTOMAKE_fails -Werror
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+test `grep -c 'warnings are treated as errors' stderr` -eq 1
+
+AUTOMAKE_run 0 -Wno-error
+grep 'VAR multiply defined' stderr
+grep 'SUB multiply defined' stderr
+grep 'warnings are treated as errors' stderr && Exit 1
+
+: