config.status
config.status.lineno
configure.lineno
+cscope.files
+cscope.in.out
+cscope.out
+cscope.po.out
tags
TAGS
* tests/man8.test: Remove shell comments from makefile rule
commands, as they are not portable to (at least) Tru64 make.
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix sed-related buglet in test "subdir5.test"
+ * tests/subdir5.test: Always terminate text passed to the
+ `i' sed command with a newline, to work around limitations
+ in e.g. older OpenBSD sed.
+
+2010-12-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix spurious failures in tests on AC_CONFIG_AUX_DIR.
+ * tests/auxdir7.test: Do not try to needlessly overwrite the files
+ `install-sh' and `missing'. This avoid spurious failures in "make
+ distcheck", when those files might be copied as read-only from the
+ `lib' directory.
+ * tests/auxdir8.test: Likewise.
+
+2010-12-18 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Make test 'posixsubst-script' portable to MinGW/MSYS.
+ * tests/posixsubst-script.test: Ensure that the generated dummy
+ scripts really start with a shebang line, to work around a
+ limitation of 'test -x' on MinGW/MSYS.
+ Reported by Ralf Wildenhues.
+
+ Improve comments in tests `posixsubst*.test'.
+ * tests/posixsubst-data.test: Improve comment explaining why we
+ try also empty match suffix.
+ * tests/posixsubst-extradist.test: Likewise.
+ * tests/posixsubst-ldadd.test: Likewise.
+ * tests/posixsubst-libraries.test: Likewise.
+ * tests/posixsubst-ltlibraries.test: Likewise.
+ * tests/posixsubst-programs.test: Likewise.
+ * tests/posixsubst-scripts.test: Likewise.
+ * tests/posixsubst-sources.test: Likewise.
+ * tests/posixsubst-tests.test: Likewise.
+ Suggested by Ralf Wildenhues.
+
+2010-12-18 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ docs: fix blunder in example about python extension modules
+ * doc/automake.texi (Python): Use `quaternion_la_SOURCES',
+ not `quaternion_SOURCES', to declare the sources of python
+ extension module `quaternion.la'.
+
+2010-12-16 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ docs: list LTLIBRARIES among Automake primaries
+ * doc/automake.texi (Uniform): List `LTLIBRARIES' among
+ the Automake primaries.
+
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Tests defs: requirement 'xsi-shell' must be synced with libtool.
+ * tests/defs (xsi-shell): Add comment telling to keep the
+ XSI-conformance checks in sync with libtool.
+
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend, fix and improve tests on Lex and Yacc support.
+ * tests/lexcpp.test: New test script, on support for Lex + C++.
+ * tests/lexvpath.test: New test script, test build and rebuild
+ rules for lexers in VPATH setup.
+ * tests/yacc-basic.test: New test script, run simple "semantic"
+ checks on basic Yacc support (similarly to what lex3.test does
+ for Lex support).
+ * tests/lex.test: Don't create useless dummy source file joe.l.
+ Remove extra blank lines.
+ * tests/lex4.test: Add trailing `:' command. Do not create dummy
+ useless lex source file.
+ * tests/lex2.test: Likewise. Call automake with the `-a' option,
+ so that it doesn't fail for the absence of `ylwrap' script. Make
+ grepping of automake stderr stricter.
+ * tests/yacc7.test: Add trailing `:' command. Enable `errexit'
+ shell flag earlier (just after having sourced ./defs).
+ * tests/yacc4.test: Likewise. Also ...
+ (configure.in): Use pre-populated skeleton set up by ./defs,
+ instead of writing one from scratch.
+ Other minor cosmetic changes.
+ * tests/yacc5.test: Likewise.
+ * tests/yaccvpath.test: Likewise. Also ...
+ ($distdir): New variable.
+ Use it throughout.
+ * tests/lex5.test: Likewise.
+ * tests/lex3.test: Likewise. Check the distdir, rather than
+ grepping the distribution tarball. Extend the test on the
+ created binary, and be sure to avoid hangs. Add some comments.
+ * tests/yacc.test: Use stricter grepping. Add trailing `:'.
+ * tests/yacc6.test: Likewise.
+ * tests/yacc3.test: Likewise. Do not create the unused file
+ `Makefile.sed'. Remove useless rules from Makefile.am. Other
+ minor cosmetic changes.
+ * tests/yacc2.test: Make grepping of generated `Makefile.in' and
+ of automake error messages stricter. Do not redirect output of
+ grep to /dev/null. Move call to aclocal earlier. Reduce the
+ number of empty blank lines. Fix a typo in comments.
+ * tests/yacc8.test: Fixed bugs that reduced the completeness of
+ the tests. Added trailing `:' command.
+ (configure.in): Use pre-populated skeleton set up by ./defs,
+ instead of writing one from scratch.
+ * tests/yaccpp.test: Test also extensions `.y++', `.ypp', and
+ `.yxx', rather than only `.yy'.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-12-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Minor cleanups in canon7.test.
+ * tests/canon7.test (_foo_bar_SOURCES): Remove libs.c.
+ (configure.in): Remove AC_PROG_CXX.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Avoid false positive in sc_tests_plain_make maintainer-check.
+ * Makefile.am (sc_tests_plain_make): Ensure to only match full
+ `make' words. Avoid false positive with remake11.test.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix canon7.test failure.
+ * tests/canon7.test (_foo_bar_SOURCES): Add foobar.c.
+ (lib.h, libd.c, libs.c): Use const for constant strings.
+
+2010-12-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix typos in test comments.
+ * tests/posixsubst-data.test, tests/posixsubst-extradist.test,
+ tests/posixsubst-ldadd.test, tests/posixsubst-libraries.test,
+ tests/posixsubst-ltlibraries.test, tests/posixsubst-programs.test,
+ tests/posixsubst-scripts.test, tests/posixsubst-sources.test,
+ tests/posixsubst-tests.test: Fix typos.
+
+2010-12-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ More uses of AS_HELP_STRING in automake macros.
+ * m4/depend.m4 (AM_DEP_TRACK): Use `AS_HELP_STRING' to format
+ the help message added to the generated configure.
+ * m4/dmalloc.m4 (AM_WITH_DMALLOC): Likewise.
+ * m4/lispdir.m4 (AM_PATH_LISPDIR): Likewise.
+ * m4/maintainer.m4 (AM_MAINTAINER_MODE): Likewise.
+ * m4/multi.m4 (AM_ENABLE_MULTILIB): Likewise.
+ Also, bumped all serial numbers of the modified m4 files.
+
+2010-12-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve tests on generated portions of configure help screen.
+ * tests/help-depend.test: Grepping of configure help screen
+ relaxed to cater for possible line wrapping, and tightened in
+ other respects.
+ * tests/help-depend2.test: Likewise.
+ * tests/help-dmalloc.test: Likewise.
+ * tests/help-lispdir.test: Likewise.
+ * tests/help-maintainer.test: Likewise.
+ * tests/help-multilib.test: Likewise.
+ * tests/help-silent.test: Likewise.
+ * tests/help-upc.test: Likewise.
+ * tests/help-init.test: Grepping of configure help screen
+ tightened.
+
+2010-12-15 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extended tests on AC_CONFIG_AUX_DIR.
+ * tests/auxdir.test: Enable `errexit' shell flag. Prefer `$me'
+ over hard-coded test name. Use proper m4 quoting. Add trailing
+ `:' command.
+ * tests/auxdir2.test: Likewise. Try to call automake also with
+ the `-a' option, so that it will not fail for spurious reasons.
+ * tests/auxdir3.test: Add an explanatory comment and a trailing
+ `:' command.
+ * tests/auxdir4.test: Prefer `$me' over hard-coded test name.
+ Make grepping of automake stderr slightly stricter. Also, now
+ this test just checks about Automake's reaction to unportable
+ auxiliary directory names (and it has been extended in this
+ respect). Moved the checks about non-existent auxiliary
+ directories to ...
+ * tests/auxdir5.test: ... this new test.
+ * tests/auxdir6.test: New test.
+ * tests/auxdir7.test: Likewise.
+ * tests/auxdir8.test: Likewise.
+ * tests/auxdir9.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests: extend checks on remake rules.
+ This adds proper semantical tests (i.e. run make to check the
+ rebuild rules are correctly triggered) in addition to tentative
+ grepping of the generated Makefile.in(s).
+ * tests/remake.test: Enable `errexit' shell flag, and related
+ changes. Modernize `configure.in'. Add trailing `:' command.
+ Improve heading comments, and add a reference to new sister test
+ remake1a.test.
+ * tests/remake3.test: Likewise (but with sister test being
+ remake3a.test).
+ * tests/remake2.test: Improve heading comments. Enable `errexit'
+ shell flag, and related changes. Modernize `configure.in'. Make
+ grepping of `Makefile.in' slightly stricter. Add trailing `:'
+ command.
+ * tests/remake5.test: Also run the `distcheck' target. Add
+ trailing `:' command. Use proper m4 quoting in configure.in.
+ * tests/remake4.test: Prefer `$me' over hard-coded test name.
+ * tests/remake7.test: Use the `configure.in' stub created by
+ ./defs, rather than writing it from scratch.
+ * tests/remake6.test: Likewise. Also, add trailing `:' command,
+ and ensure verbose printing of captured make output.
+ * tests/remake1a.test: New test, sister of remake.test.
+ * tests/remake3a.test: New test, sister of remake3.test.
+ * tests/remake8a.test: New test.
+ * tests/remake8b.test: Likewise.
+ * tests/remake9a.test: Likewise.
+ * tests/remake9b.test: Likewise.
+ * tests/remake9c.test: Likewise.
+ * tests/remake9d.test: Likewise.
+ * tests/remake10a.test: Likewise.
+ * tests/remake10b.test: Likewise.
+ * tests/remake10c.test: Likewise.
+ * tests/remake11.test: Likewise.
+ * tests/remake12.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on canonicalization.
+ * tests/canon-name.test: Add trailing `:' command. When writing
+ configure.in, prefer to use $me instead of hard-coding the test
+ name.
+ * tests/canon3.test: Prefer trailing `:' over trailing `Exit 0'.
+ * tests/canon4.test: Likewise. Make grepping of Makefile.in
+ stricter. Improve heading comment, and add reference to ...
+ * tests/canon6.test: ... this new test (sister test of the
+ previous one).
+ * tests/canon.test: Prefer cat + here-doc over echo to append
+ text to configure.in. Extend grepping of Automake stderr. Add
+ trailing `:' command.
+ * tests/canon5.test: Likewise.
+ * tests/canon7.test: New file, stress test on canonicalization.
+ * tests/canon8.test: New test, for better coverage (check that
+ the `@' character is not transliterated in canonicalizations).
+ * tests/Makefile.am: Updated.
+
+2010-12-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Libobj tests: refer to automake bug tracker for limitations.
+ * tests/libobj15b.test (configure.in): In the comment explaining
+ why an apparently redundant AC_OUTPUT is indeed needed, refer
+ to the relevant entry in the Automake bug tracker rather than
+ describing the bug in detail with a FIXME-style comment.
+ * tests/libobj15c.test: Likewise.
+ * tests/libobj20b.test: Likewise.
+
+ Libobj tests: do not use `##' automake comments in-line.
+ * tests/libobj19.test (Makefile.am): Do not use inline `##'
+ comments in the definition of AUTOMAKE_OPTIONS.
+ * tests/libobj20c.test: Likewise.
+ Report by Ralf Wildenhues.
+
+2010-12-13 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix testsuite failure of check12.test without DejaGNU.
+ * tests/check12.test: Require runtest.
+
+2010-12-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: more uses of $top_testsrcdir.
+ * tests/compile6.test: Use `$top_testsrcdir' instead of
+ `$testsrcdir/..'.
+
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests required tools: also try `-v' option for GNU compilers.
+ * tests/defs.in: In the loop on "$required" tools, for gcc
+ and g++, also run "gcc -v" (resp. "g++ -v"), to get more
+ information, and for consistency with gcj.
+
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+ Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Tests defs: avoid some useless subshells.
+ * tests/defs: In the loop on "$required" tools: avoid subshells
+ where not needed.
+
+2010-12-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend tests on AC_LIBOBJ and friends.
+ * tests/aclibobj.test: Removed, superseded by ...
+ * tests/libobj-basic.test: ... this new test, which runs autoconf,
+ ./configure and make, to ensure everything really works.
+ * tests/libobj3.test: Add trailing `:' command. Escape literal
+ dot in grep regexp.
+ * tests/libobj4.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use proper m4 quoting.
+ * tests/ltlibobjs.test: Likewise.
+ * tests/libobj5.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Make more robust by using
+ longer filenames to be grepped.
+ * tests/libobj8.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+ * tests/libobj2.test: Likewise. Also, add calls to autoconf,
+ ./configure and make, to ensure everything really works.
+ * tests/libobj7.test: Likewise, and ensure that at least one
+ function listed in AC_REPLACE_FUNCTIONS is truly replaced.
+ * tests/libobj13.test: Make grepping of Automake stderr slightly
+ stricter. Add trailing `:' command.
+ * tests/libobj12.test: Likewise. Also, prefer "cat + here-doc"
+ over "echo" to append to Makefile.am, and some cosmetic changes
+ in spacing.
+ * tests/libobj14.test: Call `Exit 1' if sourcing of ./defs fails.
+ Slighty improve m4 quoting. Add trailing `:' command.
+ * tests/libobj10.test: Add calls to autoconf, ./configure and
+ make, to ensure everything really works. Also, remove tests that
+ nonexistent source for AC_LIBOBJ cause an Automake failure: this
+ is already checked by ...
+ * tests/libobj15a.test: ... this new test.
+ * tests/libobj15b.test: New test, sister test of libobj15a.test,
+ checks AC_LIBSOURCE instead of AC_LIBOBJ.
+ * tests/libobj15c.test: New test, sister test of libobj15a.test,
+ checks AC_LIBSOURCES instead of AC_LIBOBJ.
+ * tests/libobj11.test: Removed, superseded by ...
+ * tests/libobj16a.test: ... this new test.
+ * tests/libobj16b.test: New test, sister test of libobj16a.test,
+ but using oldish/deprecated idioms.
+ * tests/libobj17.test: New test.
+ * tests/libobj18.test: Likewise.
+ * tests/libobj19.test: Likewise.
+ * tests/libobj20a.test: Likewise.
+ * tests/libobj20b.test: Likewise.
+ * tests/libobj20c.test: Likewise.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Test `$(var:suf=rpl)' expansion in special automake variables.
+ * tests/posixsubst-data.test: New test.
+ * tests/posixsubst-extradist.test: Likewise.
+ * tests/posixsubst-ldadd.test: Likewise.
+ * tests/posixsubst-libraries.test: Likewise.
+ * tests/posixsubst-ltlibraries.test: Likewise.
+ * tests/posixsubst-programs.test: Likewise.
+ * tests/posixsubst-scripts.test: Likewise.
+ * tests/posixsubst-sources.test: Likewise.
+ * tests/posixsubst-tests.test: Likewise.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-12-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Make tests `colon*.test' more "semantic".
+ Prefer running configure and make over grepping the generated
+ files; this is both more correct and less fragile.
+ * tests/colon.test: Made more "semantic", as described above.
+ * tests/colon5.test: Likewise.
+ * tests/colon6.test: Likewise.
+ * tests/colon7.test: Likewise.
+ * tests/colon2.test: Likewise, and improve syncing with sister
+ test `colon3.test'.
+ * tests/colon3.test: Likewise (but with the sister test being
+ `colon2.test' here).
+
+2010-12-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Extend and improve tests on DejaGnu support.
+ * tests/dejagnu.test: Do not create useless dummy test script.
+ Add trailing `:' command. In heading comments, add reference
+ to ...
+ * tests/check12.test: ... this new "semantic" test, covering
+ concurrent use of dejagnu tests, simple tests and `check-local'
+ target.
+ * tests/dejagnu2.test: Make test more reliable, by avoid weak
+ grepping of make output. Prefer `cat' over `echo' to append
+ to configure.in. Quote literal dots in grep regexps. Prefer
+ `grep -c ...' over `grep ... | wc -l'. Make grepping of
+ automake stderr slightly stricter. Add trailing `:' command.
+ * tests/dejagnu3.test: Prefer `cat' over `echo' to append to
+ configure.in. Check stderr of expected-to-fail "make" call.
+ Remove extra blank lines from Makefile.am.
+ * tests/dejagnu4.test: Prefer `cat' over `echo' to append to
+ configure.in. Prefer `mv -f' over plain `mv' when the target
+ file already exists. Avoid extra mkdir calls by creating more
+ directories at once. Better use of blank lines. Check that
+ the `*.log' and `*.sum' files are created by runtest also when
+ "make check" fails.
+ * tests/dejagnu7.test: Prefer `cat' over `echo' to append to
+ configure.in. Better use of blank lines. Add a trailing `:'
+ command.
+ * tests/dejagnu6.test: Likewise, and give the dejagnu test a
+ more descriptive name.
+ * tests/dejagnu5.test: Likewise. Also, simply define package
+ name to `$me' rather than using a non-obvious sed script to
+ extract it from `AC_INIT', and write the Makefile.am with only
+ one command.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-12-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Avoid running installed automake from 'libtool --help'.
+ * tests/subobj9.test: Export AUTOCONF and AUTOMAKE.
+ Together with fixed Libtool, this fixes check-coverage to not
+ invoke installed automake.
+
+2010-12-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Separate checks on target overriding into multiple test scripts.
+ * tests/overrid.test: Deleted, its contents separated into ...
+ * tests/override-suggest-local.test: ... this new test ...
+ * tests/override-html.test: ... and this new test ...
+ * tests/override-conditional-1.test: ... and this new test ...
+ * tests/override-conditional-2.test: ... and this new test (still
+ xfailing).
+ * tests/Makefile.am (TESTS, XFAIL_TESTS): Updated.
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/implicit.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command.
+ * tests/insh2.test: Likewise.
+ * tests/instman2.test: Likewise.
+ * tests/interp.test: Likewise.
+ * tests/interp2.test: Likewise.
+ * tests/library.test: Likewise.
+ * tests/mclean.test: Likewise.
+ * tests/info.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Remove useless chaff from
+ generated Makefile.am. Add a "FIXME" comment.
+ * tests/include.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Prefer cat + here-doc over
+ echo to append to configure.in. Make tests more robust by using
+ longer and less common names to grep. Remove an useless call to
+ echo. Remove an useless subshell.
+ * tests/header.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add excerpts from the original
+ report of the bug tested for by this script.
+ * tests/gcj.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Add trailing `:' command.
+ * tests/gcj3.test: Likewise.
+ * tests/ldflags.test: Likewise.
+ * tests/libtool.test: Likewise.
+ * tests/listval.test: Likewise.
+ * tests/javaprim.test: Likewise, and prefer cat + here-doc over
+ echo to append to configure.in.
+ * tests/javasubst.test: Likewise.
+ * tests/discorver.test: Enable `errexit' shell flag. Prefer
+ trailing `:' over trailing `Exit 0'.
+ * tests/instdat.test: Enable `errexit' shell flag, and related
+ changes. Use proper m4 quoting. Avoid usless subshell. Prefer
+ cat + here-doc over echo to append to configure.in.
+ * tests/libtool2.test: Enable `errexit' shell flag, and related
+ changes. Add trailing `:' command. Use the configure.in
+ stub provided by ./defs, rather than writing it from scratch.
+
+ Modernize, improve and/or tweak some test scripts.
+ * tests/maintclean.test: Use proper m4 quoting. Add trailing `:'
+ command.
+ * tests/sinclude.test: Likewise, and add a couple of blank lines,
+ for clarity.
+ * tests/make.test: Move setting of `errexit' shell flag earlier in
+ the script (just after inclusion of ./defs). Use the configure.in
+ stub created by ./defs, rather than writing it from scratch. Some
+ cosmetic changes in spacing. Ensure we wait enough time before
+ touching configure.in to trigger the rebuild rules.
+ * tests/makej.test: Use `$me' instead of hard-coding the test
+ name. Add trailing `:' command.
+ * tests/version7.test: Likewise.
+ * tests/space.test: Enable `errexit' shell flag, and related
+ changes.
+ * tests/makevars.test: Likewise. Also, prefer trailing `:' over
+ trailing `Exit 0', and be more tolerant of white spaces when
+ grepping Makefile.in.
+
+2010-12-02 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ * tests/silent8.test: Use "|| Exit 1" after ". ./defs".
+
+ Enable `set -e' in more tests (plus some tweakings).
+ * tests/mkinstall.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command, if needed.
+ * tests/mdate2.test: Likewise.
+ * tests/objc.test: Likewise.
+ * tests/noinst.test: Likewise.
+ * tests/outdir.test: Likewise.
+ * tests/number.test: Likewise.
+ * tests/pluseq.test: Likewise.
+ * tests/req.test: Likewise.
+ * tests/rulepat.test: Likewise.
+ * tests/specflg6.test: Likewise.
+ * tests/spell3.test: Likewise.
+ * tests/parse.test: Likewise, and ...
+ (configure.in): Use the stub created by ./defs, rather than
+ writing it from scratch. Remove useless calls to AC_PROG_RANLIB
+ and AC_OUTPUT.
+ * tests/mdate4.test: Likewise.
+ * tests/mkinstall.test: Likewise, and ...
+ (configure.in): ... drop useless call to `AC_OUTPUT'.
+ * tests/output.test: Enable `errexit' shell flag, and related
+ changes. Add a trailing `:' command.
+ (configure.in): Modernize.
+ * tests/output2.test: Likewise.
+ * tests/output3.test: Likewise.
+ * tests/output4.test: Likewise.
+ * tests/mdate3.test: Enable `errexit' shell flag, and related
+ changes. Prefer `$me' over hard-coded test name. Do not move
+ non-existent or useless files in the build auxiliary directory.
+ * tests/nodistdir.test: Enable `errexit' shell flag, and related
+ changes. Prefer trailing `:' over trailing `Exit 0'.
+ * tests/nodist.test: Likewise. Also, prefer cat + here-doc over
+ echo to create input test files, and do not create useless dummy
+ C source files.
+ * tests/nodist2.test: Likewise.
+ * tests/ppf77.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Do not create useless
+ dummy source files.
+ * tests/spelling.test: Enable `errexit' shell flag, with related
+ changes. Add a trailing `:' command. Also, grep Automake error
+ message.
+ * tests/specflg3.test: Enable `errexit' shell flag, with related
+ changes. Avoid unportable use of `-e' option of fgrep. Prefer
+ trailing `:' over trailing `Exit 0'. Remove extra empty lines,
+ and cosmetic changes to whitespaces.
+ * tests/obsolete.test: Enable `errexit' shell flag, with related
+ changes. Improve verbosity. Other miscellanous changes.
+
+2010-11-30 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Improve and extend tests on `:=' variable assignments.
+ * tests/colneq.test: Avoid redundant use of variable assignments
+ in Makefile.am. Use command-line automake options instead of
+ editing AUTOMAKE_OPTIONS in Makefile.am. Make grepping of the
+ generated Makefile.in slightly stricter. Add a trailing `:'
+ command.
+ * tests/colneq2.test: Do not create unneeded dummy files. Run
+ also autoconf, ./configure and make. Add trailing `:' command.
+ * tests/colneq3.test: New test, similar to colneq.test, but
+ running also autoconf, ./configure and make.
+ * tests/Makefile.am (TESTS): Update.
+
+2010-11-26 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Remove long-deprecated options --Werror and --Wno-error.
+ These options has been deprecated at least since commit
+ "Release-1-6-1b-35-gc037f20", dated 2002-07-06.
+ * automake.in (parse_arguments): Do not recognize anymore options
+ `--Werror' and `--Wno-error' as synonyms of respectively `-Werror'
+ and `-Wno-error'.
+ * tests/werror.test: Update: use `-Werror' instead of `--Werror'.
+ * NEWS: Update.
+
+2010-11-25 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix spurious failures in `silent*.test' for $CC != gcc
+ In some tests on automake-produced silent rules, we forced the
+ use of gcc depmode to improve testsuite coverage; but this has
+ unsurprisingly led to spurious failures when some non-GNU C
+ compilers were used. So we are now careful to require GCC in
+ tests that force gcc depmode.
+ From reports by Ralf Wildenhues.
+ * silent5.test: Test removed, its content split into ...
+ * silent-many-generic.test, silent-many-gcc.test: ... these new
+ sister tests, the latter of which forces gcc depmode and lists
+ "gcc" in $required.
+ * silentlex.test: Test removed, its content split into ...
+ * silent-lex-generic.test, silent-lex-gcc.test: ... these new
+ sister tests, the latter of which forces gcc depmode and lists
+ "gcc" in $required.
+ * silentyacc.test: Test removed, its content split into ...
+ * silent-yacc-generic.test, silent-yacc-gcc.test: ... these new
+ sister tests, the latter of which forces gcc depmode and lists
+ "gcc" in $required.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-11-21 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests: consistently use "|| Exit 1" after ". ./defs".
+ * tests/autohdr.test: Use `. ./defs || Exit 1', not bare
+ `. ./defs', for consistency with other tests.
+ * tests/autohdr2.test: Likewise.
+ * tests/autohdr3.test: Likewise.
+ * tests/autohdr4.test: Likewise.
+ * tests/cond23.test: Likewise.
+ * tests/cond24.test: Likewise.
+ * tests/cond25.test: Likewise.
+ * tests/cond26.test: Likewise.
+ * tests/cond27.test: Likewise.
+ * tests/cond28.test: Likewise.
+ * tests/cond29.test: Likewise.
+ * tests/cond30.test: Likewise.
+ * tests/cond31.test: Likewise.
+ * tests/cond32.test: Likewise.
+ * tests/cond33.test: Likewise.
+ * tests/cond34.test: Likewise.
+ * tests/cond35.test: Likewise.
+ * tests/cond36.test: Likewise.
+ * tests/cond37.test: Likewise.
+ * tests/cond38.test: Likewise.
+ * tests/cond39.test: Likewise.
+ * tests/cond40.test: Likewise.
+ * tests/cond41.test: Likewise.
+ * tests/cond42.test: Likewise.
+ * tests/cond43.test: Likewise.
+ * tests/cond44.test: Likewise.
+ * tests/cond45.test: Likewise.
+ * tests/dollarvar.test: Likewise.
+ * tests/dollarvar2.test: Likewise.
+ * tests/hfs.test: Likewise.
+ * tests/libobj14.test: Likewise.
+ * tests/percent.test: Likewise.
+ * tests/percent2.test: Likewise.
+ * tests/phony.test: Likewise.
+ * tests/silent.test: Likewise.
+ * tests/silent2.test: Likewise.
+ * tests/silent3.test: Likewise.
+ * tests/silent4.test: Likewise.
+ * tests/silent5.test: Likewise.
+ * tests/silent6.test: Likewise.
+ * tests/silent7.test: Likewise.
+ * tests/silent9.test: Likewise.
+ * tests/silentcxx.test: Likewise.
+ * tests/silentf77.test: Likewise.
+ * tests/silentf90.test: Likewise.
+ * tests/silentlex.test: Likewise.
+ * tests/silentyacc.test: Likewise.
+
+ Avoid useless cleaning in some `silent*.test' tests.
+ * tests/silentf77.test: Removed useless calls to "make clean"
+ and "make maintainer-clean".
+ * tests/silentf90.test: Likewise.
+ * tests/silent3.test: Removed useless call to "make distclean".
+ * tests/silent4.test: Likewise.
+ * tests/silent9.test: Likewise.
+
+2010-11-19 Ian Lance Taylor <iant@google.com>
+
+ Sync config-ml.in from GCC.
+ * config-ml.in: Add Go support: treat GOC and GOCFLAGS like other
+ compiler/flag environment variables.
+
+2010-11-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ release-stats: account for more generated tests.
+ * Makefile.am (release-stats): Be sure to take into account all
+ the generated tests, by grepping the test scripts to decide which
+ ones of them are automatically generated.
+
+2010-11-20 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Code cleanup after removal of option `--output-directory'.
+ * automake.in ($output_directory): Remove, it's unconditionally
+ defined to `.' and used only ...
+ (generate_makefile): ... in this subroutine, which now has been
+ edited and simplified accordingly.
+
+ Remove obsolete automake option `--output-directory'.
+ This option has been deprecated since version 1.7 (2002/2003).
+ * automake.in ($output_directory): Define to `.' unconditionally.
+ (parse_arguments): Remove handling of equivalent options `-o' and
+ `--output-directory'.
+ * tests/outdir.test: Removed.
+ * tests/no-outdir-option.test: New test.
+ * tests/Makefile.am (TESTS): Updated.
+ * NEWS: Updated.
+
+2010-11-19 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Automake::Config: remove extra trailing semicolon.
+ * lib/Automake/Config.in: Remove extra trailing semicolon.
+
+ help4.test: fix botched heading comment.
+ * tests/help4.test: Fixed the heading comment, since it
+ didn't correctly describe what checks the testcase was
+ supposed to perform.
+
+ help2.test: add checks on aclocal too.
+ * tests/help2.test: Check that also `aclocal --version' and
+ `aclocal --help' work with configure.in and acinclude.m4 both
+ broken.
+
+2010-11-19 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ New test on repeated automake options.
+ * tests/repeated-options.test: New test, check that automake
+ does not complain on repeated options, nor generate broken or
+ incorrect makefiles.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-11-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix spurious failures of silent-rules tests with Sun Fortran.
+ * tests/silentf77.test: Strip from the make output some verbose
+ messages possibly printed by the SunStudio fortran compilers, to
+ avoid spurious failures. Add a trailing `:' command.
+ * tests/silentf90.test: Likewise.
+
+2010-11-17 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix spurious failures of silent5.test with Sun Fortran.
+ * tests/silent5.test: Strip from the make output some verbose
+ messages possibly printed by the SunStudio fortran compilers,
+ to avoid spurious failures. This bug has been there from the
+ very first version of this test script.
+
+2010-11-16 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix regression in colon{5,6}.test (failures on AIX 5.3).
+ * tests/colon5.test: Also substitute `@SHELL@' with `$SHELL' when
+ post-processing the generated Makefile.in, to work around a bug
+ of AIX 5.3 make which doesn't allow setting the `$(SHELL)' macro
+ on the commend line. Calls to `$MAKE' adjusted accordingly.
+ * tests/colon6.test: Likewise.
+ Regression introduced in commit v1.11-175-gf9fe878 "Modernize,
+ improve and/or extend tests `colon*.test", and reported by Ralf
+ Wildenhues.
+
+2010-11-16 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix regression in ansi.test (failure on AIX 5.3).
+ * tests/ansi.test: Remove redundant hackish check done using a
+ hand-postprocessed Makefile.in. This check worked by setting
+ the `$(SHELL)' macro on the command line of make, but this is
+ not supported by the AIX 5.3 make implementation.
+ This bug has been lurking for a long time, and was activated by
+ commit v1.11-125-gc1f6cdb "Enable `errexit' shell flag in various
+ tests". Report by Ralf Wildenhues.
+
+2010-11-16 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ backcompat5.test: avoid '##'-style comments inside recipe commands.
+ * tests/backcompat5.test: Remove double-hash comments
+ from makefile rule commands, they are not part of the
+ Automake API. Fixes testsuite failure with Tru64 make.
+
+ tests: avoid '##'-style comments inside recipe commands.
+ * tests/confh.test, tests/confh8.test: Remove
+ double-hash comments from makefile rule commands, they
+ are not part of the Automake API.
+
+2010-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ tests: work around dash quoting issue in case statements.
+ * tests/color.test, tests/color2.test: Quote variable in case
+ pattern, to avoid skipping tests with dash 0.5.5.1.
+
+2010-11-16 Peter Rosin <peda@lysator.liu.se>
+
+ Skip MSVC oriented tests if the shell is not capable.
+ * tests/defs: New required entry 'xsi-shell'.
+ * tests/ar-lib.test, tests/compile3.test, tests/compile6.test:
+ Require a XSI capable shell.
+ Reported by Ralf Wildenhues.
+
+2010-11-15 Peter Rosin <peda@lysator.liu.se>
+
+ compile: clear the `eat' variable earlier.
+ * lib/compile: Clear the `eat' variable earlier.
+ ($scriptversion): Update.
+ * tests/compile3.test: Prevent regressions.
+
+2010-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ More stable configure output from sanity check.
+ * m4/sanity.m4 (AM_SANITY_CHECK): Always print check line
+ about ensuring newer files, even if we don't actually need
+ to wait any more.
+
+2010-11-14 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Rebuild menus in the manual.
+ * doc/automake.texi: Rebuild menus (using ^C ^U ^A in emacs).
+ Thanks to Ian Lance Taylor for the suggestion.
+
+ Fix install-strip when $(STRIP) contains several words.
+ * lib/am/install.am (install-strip): Update comment. Use
+ separate sub-make invocations for empty and nonempty $(STRIP),
+ to fix quoting issues.
+ * tests/strip2.test, tests/strip3.test: New tests.
+ * tests/Makefile.am (TESTS): Adjust.
+
+2010-11-10 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix yaccdry.test failure: require bison.
+ * tests/yaccdry.test: Require bison.
+ Found by NixOS Hydra.
+
+2010-11-12 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix bug in test `backcompat6.test' (MSYS portability).
+ * tests/backcompat6.test (Makefile.am): Grep the output from the
+ test program, rather than diffing it, to avoid spurious failures
+ on MinGW/MSYS due to LF vs. CRLF line endings.
+ Reported by Ralf Wildenhues.
+
+2010-11-13 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Deprecate obsolete macro AM_WITH_REGEX.
+ * m4/regex.m4: Document the `AM_WITH_REGEX' macro as obsolete,
+ and state that it should be removed two years from now.
+ (AM_WITH_REGEX): Raise an m4-time warning of the "obsolete"
+ category when this macro is used.
+ * doc/automake.texi (Public Macros): Move description of
+ `AM_WITH_REGEX' from here ...
+ (Obsolete Macros): ... to here, and declare it as obsolete
+ and "to be removed in a future version".
+ * tests/regex-obsolete.test: New test.
+ * tests/Makefile.am (TESTS): Update.
+
2010-11-08 Stefano Lattarini <stefano.lattarini@gmail.com>
Improve and extend tests on man pages support.
* tests/man.test: Enable `errexit' shell flag, and related changes.
- Make grepping of generated Makefile.in slighty stricter.
+ Make grepping of generated Makefile.in slightly stricter.
* tests/man3.test: Add trailing `:' command.
* tests/man5.test: Prefer cat + here-doc over echo to append to
configure.in.
checks for a bug in distcheck w.r.t. generated manpages. Passes
with GNU make and Solaris make, still fails with BSD make.
+2010-11-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Minor improvements and extensions to various tests.
+ * tests/defun.test: Also run autoconf and grep the generated
+ configure to make sure that aclocal truly picks up all the
+ required macros.
+ * tests/compile_f_c_cxx.test: Prefer trailing `:' over trailing
+ `Exit 0'. Do not create useless dummy source files. Do not set
+ useless `$(foo_LDADD)' variable in `Makefile.am'. Do not call
+ useless macro `AC_F77_LIBRARY_LDFLAGS' in `configure.in'.
+ * tests/compile_f90_c_cxx.test: Likewise.
+ * tests/suffix10.test: Slightly stricter grepping of make output.
+ * tests/compile.test: Add trailing `:' command.
+ * tests/defun2.test: Likewise.
+ * tests/vars3.test: Likewise.
+ * tests/vartar.test: Likewise.
+ * tests/vars.test: Likewise. Also, extend test by checking
+ that the definition of `MY_FLAGS*' variables is preserved in
+ the generated `Makefile.in'.
+ * tests/stamph2.test: Prefer trailing `:' over trailing `Exit 0'.
+ Use proper m4 quoting in `configure.in'.
+
+2010-11-11 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: improve messages for skipped tests.
+ * tests/defs: Give meaningful messages about the reasons of a
+ test skip; this is especially useful as this file is run without
+ verbose xtraces on. Related reorderings in the code and new
+ comments.
+
+2010-11-10 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: move static definitions in a new file `defs-static'.
+ The new file is meant to be idempotent w.r.t. multiple inclusions.
+ * tests/defs.in: Removed, its contents split among ...
+ * tests/defs-static.in: ... this new file ...
+ * tests/defs: ... and this new file, including the former.
+ * configure.ac (AC_CONFIG_FILES): Remove `tests/defs', add
+ `tests/defs-static'.
+ (AC_CONFIG_LINKS): Add `tests/defs'.
+ * tests/Makefile.am ($(parallel_tests)): Update.
+ ($(instspc_tests)): Likewise.
+ * tests/.gitignore: Update.
+
+ Tests defs: $testsbuilddir is now AC_SUBST'ed.
+ * tests/defs.in ($testsbuilddir): Substitute from @abs_builddir@.
+ Add sanity check on $testsbuilddir, similar to those on
+ $testsrcdir and $top_testsrcdir.
+
+ Tests defs: do not print message "Running test $0" anymore.
+ * tests/defs.in: Printing the message "=== Running test $0" at
+ the beginning of each tests made sense when Automake used the old
+ test-driver, which sent all the output directly to stdout/stderr.
+ Now that the parallel test-driver is used, which saves output of
+ each test in its corresponding log file, that old message is just
+ useless noise.
+
+ Tests defs: rename $curdir -> $testbuilddir
+ * tests/defs.in: Rename $curdir to $testbuildir, for clarity and
+ consistency with $testsrcdir and $top_testsrcdir.
+
+ Tests defs: prefer "$curdir" over "`pwd`".
+ * tests/defs.in: We already save the value of `pwd` in $curdir
+ early in the file, so there no need to recalculate it later, when
+ the current working directory is not changed.
+
+ Tests defs: use `$me' in more error messages.
+ * tests/defs.in: Also use `$me' in error messages referring to
+ missing `defs' or `defs.in', since that variable is now defined
+ before those checks.
+
+ Tests defs: do not use `Exit' where plain `exit' suffices.
+ * tests/defs.in: Use "exit 77" rather than "Exit 77" to skip the
+ test when required libtool/gettext macros are not found, since
+ such skips would take place before the exit trap is installed.
+
+ Tests defs: improve and extends comments.
+ * tests/defs.in: Improve and extends some comments, especially in
+ relation with the changes introduced by the previous reordering.
+
+ Tests defs: various reorderings.
+ * tests/defs.in: Reordered various snippets of code in a
+ clearer way.
+
+2010-11-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix bug in test `backcompat4.test' (stale autom4te cache).
+ * tests/backcompat4.test: Remove stale autom4te cache directory
+ before re-running aclocal and automake. Also, since we are at
+ it, be more verbose in displaying contents of generated files,
+ to ease debuggability.
+ Reported by Ralf Wildenhues.
+
2010-11-07 Stefano Lattarini <stefano.lattarini@gmail.com>
- Fix a bug in variable concatanation with `+='.
+ Fix a bug in variable concatenation with `+='.
* lib/Automake/VarDef.pm (append): Since the content of the
"appended-to" variable is going to be unconditionally normalized
later, simply separate the appended value with a single whitespace
- character, instead of trying to be uselesssly smarter by using
+ character, instead of trying to be uselessly smarter by using
escaped newlines. This fixes a bug in which extra backslashes
where erroneously inserted in the variable's final value.
* tests/pluseq11.test: New test, exposing the bug.
* tests/Makefile.am (TESTS): Update.
Reported by Andy Wingo.
+2010-11-07 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Modernize, improve and/or tweak various test scripts.
+ * tests/stamph2.test: Improve m4 quoting in `configure.in', and
+ prefer trailing `:' over trailing `Exit 0'.
+ * tests/syntax.test: Escape literal dots in grep regexps.
+ * tests/copy.test: Enable `errexit' shell flag. Extend test by
+ checking with `test' utility that the script `install-sh' is
+ copied, but not symlinked.
+ * tests/depdist.test: Move setting of `errexit' shell flag earlier
+ in the script (just after inclusion of ./defs). Avoid obsoleted
+ constructs in generated `configure.in'. Prefer to do our checks
+ by running configure and make over grepping Makefile.in.
+ * tests/target-cflags: Move setting of `errexit' shell flag
+ earlier in the script (just after inclusion of ./defs). Use the
+ `configure.in' stub created by `./defs', rather than writing it
+ from scratch.
+ * tests/target-clash: Do not uselessly run autoconf.
+ * tests/ctarget1.test: Renamed ...
+ * tests/cond-basic.test: ... to this. Use the `configure.in' stub
+ created by `./defs', rather than writing it from scratch.
+ Move setting of `errexit' shell flag earlier in the script (just
+ after inclusion of ./defs). Other minor cosmetic changes.
+ * tests/Makefile.am (TESTS): Updated.
+
+2010-11-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ New tests on obsoleted usages of automake/autoconf macros (such
+ as AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT).
+ * tests/backcompat.test: New test script.
+ * tests/backcompat2.test: Likewise.
+ * tests/backcompat3.test: Likewise.
+ * tests/backcompat4.test: Likewise.
+ * tests/backcompat5.test: Likewise.
+ * tests/backcompat6.test: Likewise.
+ * tests/init.test: Extended and improved, esp. by trying more
+ combinations of calls to AC_INIT and AM_INIT_AUTOMAKE with few
+ arguments.
+ * tests/Makefile.am (TESTS): Updated.
+
2010-11-06 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix bug in rules for creating vala vapi/header files.
New tests.
* tests/Makefile.am (TESTS): Update.
+2010-11-05 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Fix potential bug in generated tests `instpc-*.test'.
+ This bug is due to the changes introduced by the recently-merged
+ "tests-init" branch. In that branch, `tests/defs' didn't define
+ anymore `$srcdir', instead defining directly `$testsrcdir'; but
+ the generated tests were using `$srcdir', hence the bug.
+ Luckily, since the Automake parallel test driver automatically
+ exports `srcdir' to a proper value, that prevented the bug from
+ manifesting itself.
+ * tests/Makefile.am ($(instspc_tests)): In the generated test
+ scripts, use `$testsrcdir', not `$srcdir'.
+
+2010-11-03 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Overhauled and modularized tests in `instspc.test'.
+ The test `instspc.test' was way too big and fragile. Its running
+ time was very long. It also produced a log that was nearly
+ unreadable due to its length, making it very difficult to find
+ out the reason for failures.
+ Also, it was too much monolithic, with a single (maybe spurious)
+ failure in a corner case causing the whole test to fail (even if
+ everything worked as expected in the other 99% of cases).
+ The present change should solve these problems, by separating
+ `instspc.test' into many smaller, self-contained, auto-generated
+ tests.
+ * tests/instspc.test: Removed.
+ * tests/instspc-tests.sh: New script, fulfilling a double role:
+ 1. it generates a Makefile.am snippet `tests/instspc-tests.am',
+ containing the definition of a list of new tests which will take
+ over the older `instspc.test', and
+ 2. it is sourced by said generated tests with proper parameters
+ pre-set, to run the "meat" of the checks.
+ This apparent abuse is indeed required because the test generation
+ code and test execution code are inevitably intertwined.
+ * tests/Makefile.am ($(srcdir)/instspc-tests.am): Include this
+ snippet, which (among the other things) defines ...
+ (instspc_tests): ... this new macro, containing the list of the
+ newly generated `instspc*.test' tests, and ...
+ (instspc_xfail_tests): ... this new macro, containing the list
+ of the `instspc*.test' tests expected to fail.
+ ($(instspc_tests)): New rule, generates the `instspc*.test' tests.
+ ($(instspc_tests:.test=.log)): New rule, registers the dependency
+ of all `instspc*.test' tests on the `instspc-tests.sh' script.
+ (TESTS): Add `$(instspc_tests)', remove `instspc.test'.
+ (XFAIL_TESTS): Add `$(xfail_instspc_tests)'.
+ (EXTRA_DIST): Distribute instspc-tests.sh.
+ (MAINTAINERCLEANFILES): Added $(instspc_tests).
+ Other minor cosmetic changes.
+ * bootstrap: Generate instspc-tests.am.
+ * tests/.gitignore: Updated.
+
2010-11-01 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add FAQ entry for bug reporting instructions.
* doc/automake.texi (Reporting Bugs): New section.
(Introduction): Refer to it.
+2010-10-07 Peter Rosin <peda@lysator.liu.se>
+
+ depcomp: add new one-pass depmode for MSVC 7 and later.
+ * lib/depcomp: Add new depmodes 'msvc7' and 'msvc7msys' which
+ make use of the -showIncludes option added in MSVC 7.
+ * m4/depend.m4 (_AM_DEPENDENCIES): Handle the new depmodes
+ similarly to 'msvisualcpp' and 'msvcmsys' as MSVC does not
+ support the -o option.
+
+2010-10-05 Jim Meyering <meyering@redhat.com>
+
+ dist-xz, dist-bzip2: don't hard-code -9: honor envvar settings
+ * lib/am/distdir.am (dist-xz): Do not hard-code xz's -9: that
+ made it impossible to override. Instead, use its XZ_OPT envvar,
+ defaulting to -9 if not defined. Thus no change in behavior
+ when XZ_OPT is not set, and now, this rule honors the setting
+ of that envvar when it is set. Suggested by Lasse Collin.
+ (dist-bzip2): Likewise for it's corresponding envvar: BZIP2.
+ * NEWS (Miscellaneous changes): Mention it.
+ * doc/automake.texi (The Types of Distributions): Describe the
+ newly enabled environment variables.
+
2010-10-04 Stefano Lattarini <stefano.lattarini@gmail.com>
Add support for newer python versions.
* tests/help3.test: Likewise, and fix a botched comment.
* tests/help.test: Likewise. Also, use "AUTOMAKE_fails ..."
instead of "$AUTOMAKE ... && Exit 1", for consistency and to
- please maintainet-check.
+ please maintainer-check.
* tests/help2.test: Likewise.
2010-10-03 Stefano Lattarini <stefano.lattarini@gmail.com>
2010-10-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ tests: fix ar-lib.test for echo that interprets backslashes.
+ * tests/ar-lib.test: Use printf instead of echo. Avoid test -a.
+ More robust quoting.
+
+2010-10-03 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ maintainer-check coverage for variables before rules.
+ * Makefile.am (sc_ensure_testsuite_has_run): Suggest keeping
+ around the test directories.
+ (sc_tests_makefile_variable_order): New rule with a heuristic to
+ catch ordering violations.
+
Document and fix expansion of variables before rules.
* doc/automake.texi (General Operation): Document that variables
are expanded before rules.
2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Coverage and minor fixes for variable typo detection.
+ * automake.in (check_typos): Remove `EXTRA_' prefix when
+ computing canonical name.
+ * tests/vartypo2.test, tests/vartypos.test: New tests.
+ * tests/Makefile.am (TESTS): Update.
+
+ Implement EXTRA_maude_DEPENDENCIES for programs and libraries.
+ * automake.in (handle_programs, handle_libraries)
+ (handle_ltlibraries): Mark EXTRA_*_DEPENDENCIES as recognized.
+ * doc/automake.texi (Linking, Program and Library Variables)
+ (LIBOBJS): Document EXTRA_*_DEPENDENCIES.
+ * lib/am/library.am (%LIBRARY%): Also depend on
+ $(EXTRA_%XLIBRARY%_DEPENDENCIES).
+ * lib/am/ltlibrary.am (%LTLIBRARY%): Also depend on
+ (%XLTLIBRARY%_DEPENDENCIES).
+ * lib/am/program.am (%PROGRAM%%EXEEXT%): Also depend on
+ $(EXTRA_%XPROGRAM%_DEPENDENCIES).
+ * tests/extradep.test, tests/extradep2.test: New tests.
+ * tests/Makefile.am (TESTS): Update.
+ * NEWS: Update.
+ Suggested by Eric Blake.
+
+ tests: avoid running into timing issues due to sanity change.
+ * tests/acloca10.test, tests/acloca18.test, tests/aclocal9.test:
+ Insert strategic sleep before aclocal reruns, to ensure files
+ are newer.
+ * tests/python11.test: Use --force for repeated autotools runs.
+ Reports from the NixOS Hydra build daemon via Ludovic Courtès.
+
+ Fix timestamp issues by ensuring configure takes at least a second.
+ * m4/sanity.m4 (AM_SANITY_CHECK): If we didn't sleep here,
+ start a sleep in the background and wait for it to finish
+ before creating config.status, hopefully fixing all spurious
+ testsuite failures involving botched time stamps.
+ * NEWS: Update.
+ Reports by Ludovic Courtès, Peter Breitenlohner, and others.
+
+2010-10-02 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
Revert "parallel-tests: avoid command-line length limit issue."
This reverts commit 24e3b4ee2f8cb9f72dd94a05a893f3d4e88b7835,
because it re-opened the bug fixed by v1.11-10-g218e678.
seems to have been removed, substituted by multiple release
tarballs now).
+2010-09-21 Peter Rosin <peda@lysator.liu.se>
+
+ compile: implement library search to support MSVC static linking
+ * lib/compile (func_cl_wrapper): Implement library search and
+ -static option so that the user can select whether to prefer
+ dll import libraries or static libraries. This enables MSVC to
+ link against dlls generated by libtool without requiring libtool
+ or workarounds such as -lfoo.dll etc. Makes the tests/static.at
+ test case in libtool pass.
+ * tests/compile3.test: Don't trip up if there happens to exist
+ a "foo" library in the library search path.
+ * tests/compile6.test: New test, verifying the library search.
+ * tests/Makefile.am (TESTS): Update.
+
2010-09-17 Eric Blake <eblake@redhat.com>
Avoid triple-space after period.
* tests/help-silent.test: Likewise.
* tests/help-upc.test: Likewise.
* tests/mmode.test: Remove tests on `configure --help' output,
- they are supersed by tests in `help-maintainer.test'.
+ they are superseded by tests in `help-maintainer.test'.
* tests/Makefile.am (TESTS): Update.
2010-09-14 Stefano Lattarini <stefano.lattarini@gmail.com>
* HACKING: Hint at old commits with `git describe' output.
+2010-09-14 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Prefer `$(am__cd)' to plain `cd' in our Makefiles.
+ * Makefile.am (recheck, dist-hook, git-dist, path-check, fetch)
+ (release-stats): Use `$(am__cd)' rather than plain `cd'.
+ * tests/Makefile.am ($(srcdir)/parallel-tests.am): Likewise.
+
2010-09-12 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix regression in test `colon4.test'.
* tests/colon4.test: Fix botched editing to `configure.in'
that made the test useless. Since we are at it, improve
- comments and make grepping of generated Makefile.in slighty
+ comments and make grepping of generated Makefile.in slightly
stricter.
Regression introduced by change "Modernize, improve and/or
extend tests `colon*.test" (Stefano Lattarini, 2010-08-08).
* tests/pr9.test: Likewise.
From a suggestion by Ralf Wildenhues.
+2010-09-09 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Use AS_HELP_STRING in AM_SILENT_RULES.
+ * m4/silent.m4 (AM_SILENT_RULES): Use `AS_HELP_STRING' to format
+ help message regarding configure options `--enable-silent-rules'
+ and `--disable-silent-rules'. Also throw in a couple of cosmetic
+ changes in the related `case' statement (indentation, balancing
+ of parentheses).
+ * THANKS: Update.
+ From a report by Jeff A. Daily.
+
+2010-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Make some `confh*.test' tests more "semantic" (plus tweakings).
* tests/confh.test: Run "autoconf", "configure" and "make check",
instead of munging/grepping the generated `Makefile.in'.
* tests/confh4.test: Relax the grepping of Makefile.in w.r.t.
- white spaces. Do not create usless dummy source file `foo.c'
+ white spaces. Do not create useless dummy source file `foo.c'
and useless dummy header file `acconfig.h'.
(configure.in): Remove superfluous call to `AC_OUTPUT'.
* tests/confh6.test: Add trailing `:' command.
* tests/Makefile.am (TESTS): Updated.
Prompted by a report from Ralf Wildenhues.
+2010-09-08 Stefano Lattarini <stefano.lattarini@gmail.com>
+
Remove useless whitespace padding in XFAIL_TESTS definition.
* tests/Makefile.am (XFAIL_TESTS): Remove whitespace padding.
Posix 2008 requires make to set errexit.
* lib/am/check.am: Update comment.
+2010-09-06 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: remove variable $testaclocaldir.
+ * tests/defs.in ($testaclocaldir): Removed.
+ * tests/aclocal.test: Use `$top_testsrcdir/m4' directly, not
+ `$testaclocaldir'.
+
+ Tests defs: $srcdir and $top_srcdir renaming.
+ * tests/defs.in ($srcdir): Remove, define $testsrcdir directly.
+ * tests/Makefile.am ($(parallel_tests)): Generation of derived
+ tests updated.
+
+ Tests defs: new variable $top_testsrcdir.
+ * tests/defs.in ($top_testsrcdir): Define unconditionally
+ to @abs_top_srcdir@. Use it throughout.
+ * tests/ar-lib.test: Use `$top_testsrcdir' instead of
+ `$testsrcdir/..'.
+ * tests/auxdir.test: Likewise.
+ * tests/compile.test: Likewise.
+ * tests/compile2.test: Likewise.
+ * tests/compile3.test: Likewise.
+ * tests/compile5.test: Likewise.
+ * tests/mdate6.test: Likewise.
+ * tests/mkinst3.test: Likewise.
+ * tests/multlib.test: Likewise.
+ * tests/txinfo22.test: Likewise.
+
+ Tests defs: $srcdir is unconditionally substituted.
+ * tests/defs.in ($srcdir): Define unconditionally to @abs_srcdir@.
+ Remove code for $srcdir normalization, which is now useless.
+
+2010-09-02 Stefano Lattarini <stefano.lattarini@gmail.com>
+
+ Tests defs: make spacing more consistent.
+ * tests/defs.in: Make spacing more consistent in indentation.
+ Especially, indent using only spaces, not tabs. Also, move
+ a comment to a better position.
+
+ Improve code for requiring libtool and gettext in tests.
+ * tests/defs.in: Stricter (and more correct) detection of wheter
+ libtool, libtoolize and/or gettext are in $required.
+
+
2010-08-27 Stefano Lattarini <stefano.lattarini@gmail.com>
Fix bug in test missing6.test.
that do not support $LINENO. Also throw in a couple of cosmetic
changes.
+2010-09-02 Peter Rosin <peda@lysator.liu.se>
+
+ Make ar-lib support backslashed files in archives.
+ * lib/ar-lib: If an archive member contains a backslash, make sure
+ it is escaped when the archive member is extracted.
+ * tests/ar-lib.test: Test the above.
+
+2010-08-31 Peter Rosin <peda@lysator.liu.se>
+
+ Do file name conversion for object files in the compile wrapper.
+ * lib/compile (func_cl_wrapper): Do file name conversion for object
+ files (i.e. extensions .obj, .OBJ, .o and .O) if needed.
+ * tests/compile4.test: Test the above.
+
2010-08-21 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+ Speed up removal of auxiliary linker output files for ltlibraries.
+ * lib/am/ltlib.am (clean-%DIR%LTLIBRARIES): Rewrite using just
+ one `rm' invocation.
+ Report by Bob Friesenhahn.
+
Improve robustness of mdate-sh script.
* lib/mdate-sh: Sanitize zsh behavior on startup, to ensure
$ls_command is word-split properly upon invocation.
Don't hide the table of contents.
* doc/automake.texi: Move the table of contents to the beginning.
+2010-08-16 Peter Rosin <peda@lysator.liu.se>
+
+ Optimize compile script on MSYS.
+ * lib/compile (func_file_conv): Add new argument 'lazy' which
+ takes an optional list of conversion types where the requested
+ conversion isn't needed.
+ (func_cl_wrapper): Take advantage of the above for cases where
+ MSYS is doing the conversion for us.
+ Suggested by Ralf Wildenhues.
+
+2010-08-16 Peter Rosin <peda@lysator.liu.se>
+
+ Support more C++ file extensions for MSVC in the compile script.
+ * lib/compile (func_cl_wrapper): MSVC only recognizes the .cpp
+ file extension as C++, unless it's given a hint. So hint about
+ .cc, .CC, .cxx, .CXX, c++ and C++. Also do path conversion on
+ .c, .cpp, .CPP, .lib, .LIB and .Lib files.
+ * tests/compile3.test: Test the C++ hinting.
+
+2010-08-12 Peter Rosin <peda@lysator.liu.se>
+
+ Enable the use of "link -lib" as the wrapped archiver.
+ * lib/ar-lib: Enable the use of "link -lib" as the wrapped
+ archiver, as well as allowing some other options to be passed
+ 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.
`$me' over hard-coded test name.
* tests/aclocal6.test: Likewise.
* tests/aclocal18.test: Add trailing `:' command, and make
- some grepping slighty stricter.
+ some grepping slightly stricter.
* tests/acloca14.test: Likewise. Also, prefer `diff' over
`cmp', and add some "cosmetic" blank lines.
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
+ * tests/pr9.test: Likewise. Also, avoid obsolescent 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
+ * tests/pr243.test: Avoid obsolescent 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
+ * tests/pr279.test: Avoid obsolescent 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/confvar.test: Likewise, and make grepping of Makefile.in
stricter.
* tests/confvar2.test: Likewise.
- * tests/conflnk3.test: Cosmetic changes, and re-enable a temporarly
+ * tests/conflnk3.test: Cosmetic changes. Re-enable a temporarily
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
* 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
+ it's not in in the environment, rather than 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
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
+ * tests/depcomp6.test: Consistently 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/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
+ stdout. Avoid useless 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/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/ar-lib: New auxiliary script.
+ * lib/Makefile.am: Add above.
+ * tests/ar-lib.test: New test.
+ * tests/Makefile.am: Add above.
+ * automake.in (@common_files): Distribute the 'ar-lib' script.
+ * doc/automake.texi (Auxiliary Programs): Mention the new
+ 'ar-lib' script.
+ (Optional): Mention 'ar-lib' in AC_CONFIG_AUX_DIR.
+ * NEWS: Update.
+
+2010-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
+
+ Fix shell pattern negation in compile script.
+ * 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: 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.
+ * lib/compile: MSVC supports naming the output file, the option
+ is just not called -o, so transform -o into the appropriate form
+ for MSVC. Also wrap some other options while at it (-L, -l, -Wl,
+ -Xlinker and -I) and convert file names to windows form where
+ needed for those options to make MSVC more usable in an
+ autotooled environment.
+ * doc/automake.texi (Auxiliary Programs): Document the above
+ extension of the compile script.
+ * NEWS: Updated.
+ * tests/defs.in: New required entry 'cl'.
+ * tests/compile3.test: New test.
+ * tests/compile4.test: New test.
+ * tests/compile5.test: New test.
+ * tests/Makefile.am: Update.
+
2010-07-31 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
Add example git work flow; discuss merge --log in HACKING.
source file.
* tests/suffix7.test: Likewise.
* tests/suffix5.test: Enable `errexit' shell flag, and related
- changes. Make grepping of Makefile.in slighty stricter.
+ changes. Make grepping of Makefile.in slightly stricter.
* tests/suffix.test: Enable `errexit' shell flag, and related
changes. Also, do not redirect grep output to /dev/null, as this
might unmotivatedly hide useful information.
$FGREP rather than plain grep.
* tests/suffix11.test: Likewise.
* tests/suffix12.test: Likewise.
- * tests/suffix9.test: Prefet cat + here-doc over echo to append to
+ * tests/suffix9.test: Prefer cat + here-doc over echo to append to
the `configure.in' stub. Cosmetic changes.
* tests/suffix13.test: Cosmetic spacing change.
* 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
+ * tests/obsolete.test: Add a comment explaining why we need
an indirection in adding $AUTOUPDATE to $required.
Normalize whitespaces in 'tests/Makefile.am'.
* 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.
changes, and a couple of unrelated cosmetic changes.
* tests/recurs.test: Use the `configure.in' stub created by
`./defs', rather than writing one from scratch. Make grepping
- of Automake stderr slighty stricter.
+ of Automake stderr slightly stricter.
* tests/substtarg.test: Likewise.
* tests/strip.test: Likewise, and move the call to `set -e'
earlier (just after the inclusion of `./defs'). Also, make sure
in ./defs). Avoid potential problems with unpredictable make
output. Finally, make grepping of Makefile.in stricter.
* tests/substre2.test: Ensure verbose printing of the captured
- make's output, and make its grepping slighty stricter.
+ make's output, and make its grepping slightly stricter.
* tests/cygwin32.test: Enable `errexit' shell flag, and related
changes. Also, do not create useless dummy source/data files.
* tests/scripts.test: Likewise.
here-doc, not using echo.
* tests/pluseq10.test: Make sure that the captured output of
`make' command is always displayed. Where possible, use $FGREP
- instead of grep (this change makes some checks slighty stricter).
+ instead of grep (this change makes some checks slightly stricter).
* tests/pluseq8.test: Enable `errexit' shell flag, with related
changes.
* tests/pluseq.test: Likewise. Also, do not create useless dummy
* tests/pluseq4.test: Likewise.
* tests/pluseq6.test: Likewise.
* tests/pluseq7.test: Do not create useless dummy source file.
- * tests/pluseq9.test: Slighty extended w.r.t. the grepping of
+ * tests/pluseq9.test: Slightly 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
2010-06-11 Stefano Lattarini <stefano.lattarini@gmail.com>
Improve determination of PATH separator in bootstrap script.
- * bootstrap: Detemine what the PATH separator is the same way
+ * bootstrap: Determine what the PATH separator is the same way
autoconf does.
Minor improvements in bootstrap script.
$AUTOMAKE, and improve the positioning of an $ACLOCAL call.
* tests/exeext4.test: Use $FGREP instead of grep, where possible.
Make auxiliary rules in the generated Makefile more silent.
- These changes make some checks slighty stricter.
+ These changes make some checks slightly stricter.
* tests/ext2.test: Call `Exit 1' if inclusion of `./defs' fails.
* tests/gettext2.test: Place final `:' at the end of the script,
rather than in the middle.
* tests/python2.test: Improved verbose messages.
Make test `ammissing.test' stricter.
- * tests/ammissing.test: Fail if $ACLOCAL succeds unexpectedly.
+ * tests/ammissing.test: Fail if $ACLOCAL succeeds unexpectedly.
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).
* tests/nodep.test: Likewise.
* tests/nodepcomp.test: Likewise.
* tests/f90only.test: Likewise, and remove botched/obsoleted
- comments and unecessary commands.
+ comments and unnecessary commands.
* tests/fonly.test: Likewise, and remove botched/obsoleted
- comments and unecessary commands.
+ comments and unnecessary commands.
* tests/discover.test: Likewise, and made stricter.
Enable `errexit' shell flag in all tests cxx*.test.
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.
* tests/nostdinc.test: Enable `errexit' shell flag. Related and
unrelated minor changes. Make the grepping of the generated
- Makefile.in slighty stricter. Generate and run configure, so that
+ Makefile.in slightly stricter. Generate and run configure, so that
the generated Makefile can be grepped too.
2010-05-23 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
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.
* 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
* 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.
================================================================
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 \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
+ || eval $$failcom; \
+ done; \
+ test -z "$$fail"
################################################################
##
# Ensure tests are world-executable
dist-hook:
- cd $(distdir)/tests && chmod a+rx *.test
+ $(am__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.
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
sc_tests_PATH_SEPARATOR \
+sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
## Tests should never call make directly.
sc_tests_plain_make:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*make'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
exit 1; \
fi
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.
+## Suggest keeping test directories around for greppability of the Makefile.in files.
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`env keep_testdirs=yes 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
+
+## Ensure variables are listed before rules in Makefile.in files we generate.
+sc_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+ @for file in `find tests -name Makefile.in -print`; do \
+ latevars=`sed -n \
+ -e :x -e 's/#.*//' \
+ -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+## Literal TAB.
+ -e '1,/^ /d' \
+## Allow @ so we match conditionals.
+ -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
+ if test -n "$$latevars"; then \
+ echo 'Ensure variables are expanded before rules' >&2; \
+ echo "Variables are expanded too late in $$file:" >&2; \
+ echo "$$latevars" | sed 's/^/ /' >&2; \
+ exit 1; \
+ fi; \
+ done
+
## Using `:' as a PATH separator is not portable.
sc_tests_PATH_SEPARATOR:
@if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
## Finally, if anything was successful, commit the last changes and tag
## the release in the repository. We don't use RCS keywords so it's OK
## to distribute the files before they were committed.
- cd $(srcdir) && git commit -a -s && \
+ $(am__cd) $(srcdir) && git commit -a -s && \
git tag -s "v$(VERSION)" -m "Release $(VERSION)"
git-release: git-dist
## Check our path lengths.
path-check: distdir
- (cd $(distdir) && \
+ ($(am__cd) $(distdir) && \
## FIXME there's got to be a better way! pathchk should take the list
## of files on stdin, at least.
find . -print | xargs pathchk -p); \
rm -rf Fetchdir > /dev/null 2>&1
mkdir Fetchdir
## If a get fails then that is a problem.
- (cd Fetchdir && \
+ ($(am__cd) Fetchdir && \
$(WGET_SV_GIT_CF)config.guess -O config.guess && \
$(WGET_SV_GIT_CF)config.sub -O config.sub && \
$(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
>>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; \
aml=`cat $$dot_am_files | wc -l` && \
m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
- doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+ doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
echo "$$doc_text" && \
rm -f doc/unused.ps && \
doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
else :; fi && \
t=`ls -1 $$tests | wc -l` && \
- tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+ tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
today=`date +%Y-%m-%d` && \
echo "add this to the table in doc/automake.texi after verification:" && \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
-# 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,
$(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 \
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 \
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)
{ 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,'; \
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@
-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.
sc_tests_plain_sleep \
sc_tests_plain_egrep_fgrep \
sc_tests_PATH_SEPARATOR \
+sc_tests_logs_duplicate_prefixes \
+sc_tests_makefile_variable_order \
sc_mkdir_p \
sc_perl_at_substs \
sc_unquoted_DESTDIR \
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)'; \
&& $(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)
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)
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(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)
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--9} xz -c >$(distdir).tar.xz
+ $(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
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*) \
&& $(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'
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
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)
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:
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 \
+ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $@) \
+ || eval $$failcom; \
+ done; \
+ test -z "$$fail"
################################################################
# Ensure tests are world-executable
dist-hook:
- cd $(distdir)/tests && chmod a+rx *.test
+ $(am__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
fi
sc_tests_plain_make:
- @if grep -v '^#' $(srcdir)/tests/*.test | grep ':[ ]*make'; then \
+ @if grep -v '^#' $(srcdir)/tests/*.test | $(EGREP) ':[ ]*make( |$$)'; then \
echo 'Do not run "make" in the above tests. Use "$$MAKE" instead.' 1>&2; \
exit 1; \
fi
exit 1; \
fi
+sc_ensure_testsuite_has_run:
+ @if test ! -f tests/test-suite.log; then \
+ echo "Run \`env keep_testdirs=yes 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_tests_makefile_variable_order: sc_ensure_testsuite_has_run
+ @for file in `find tests -name Makefile.in -print`; do \
+ latevars=`sed -n \
+ -e :x -e 's/#.*//' \
+ -e '/\\\\$$/{' -e N -e 'b x' -e '}' \
+ -e '1,/^ /d' \
+ -e '/^ *[a-zA-Z_@]\{1,\} *=/p' $$file`; \
+ if test -n "$$latevars"; then \
+ echo 'Ensure variables are expanded before rules' >&2; \
+ echo "Variables are expanded too late in $$file:" >&2; \
+ echo "$$latevars" | sed 's/^/ /' >&2; \
+ exit 1; \
+ fi; \
+ done
+
sc_tests_PATH_SEPARATOR:
@if grep -E '\bPATH=.*:.*' $(srcdir)/tests/*.test ; then \
echo "Use \`$$PATH_SEPARATOR', not \`:', in PATH definitions above." 1>&2; \
exit 1; \
fi
$(MAKE) $(AM_MAKEFLAGS) distcheck
- cd $(srcdir) && git commit -a -s && \
+ $(am__cd) $(srcdir) && git commit -a -s && \
git tag -s "v$(VERSION)" -m "Release $(VERSION)"
git-release: git-dist
> $(PACKAGE)-$$prevno-$(VERSION).diff
path-check: distdir
- (cd $(distdir) && \
+ ($(am__cd) $(distdir) && \
find . -print | xargs pathchk -p); \
estatus=$$?; \
find $(distdir) -type d '!' -perm -200 -exec chmod u+w {} ';'; \
fetch:
rm -rf Fetchdir > /dev/null 2>&1
mkdir Fetchdir
- (cd Fetchdir && \
+ ($(am__cd) Fetchdir && \
$(WGET_SV_GIT_CF)config.guess -O config.guess && \
$(WGET_SV_GIT_CF)config.sub -O config.sub && \
$(WGET_SV_CVS)texinfo/texinfo/doc/texinfo.tex -O texinfo.tex && \
>>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; \
aml=`cat $$dot_am_files | wc -l` && \
m4f=`ls -1 $(srcdir)/m4/*.m4 | wc -l` && \
m4l=`cat $(srcdir)/m4/*.m4 | wc -l` && \
- doc_text=`cd doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
+ doc_text=`$(am__cd) doc && LC_ALL=C pstops 0 automake.ps unused.ps 2>&1` && \
echo "$$doc_text" && \
rm -f doc/unused.ps && \
doc=`echo "$$doc_text" | sed -n 's/.*Wrote \([1-9][0-9]*\) pages.*/\1/p'` && \
if test . != '$(srcdir)'; then tests="$$tests $(srcdir)/tests/*.test"; \
else :; fi && \
t=`ls -1 $$tests | wc -l` && \
- tgen=`ls -1 $$tests | grep '.-p\.test' | wc -l` && \
+ tgen=`grep 'GENERATED AUTOMATICALLY' $$tests | wc -l` && \
today=`date +%Y-%m-%d` && \
echo "add this to the table in doc/automake.texi after verification:" && \
printf '@item %s @tab %-6s @tab %4d @tab %4d @tab %4d @tab %4d %-4s @tab %4d %-4s @tab %3d @tab %d %-4s\n' \
-New in 1.11.0a:
+New in 1.11a:
+
+* Changes to automake:
+
+ - automake now generates silenced rules for texinfo outputs.
+ - The deprecated options `--output-dir', `--Werror' and `--Wno-error'
+ have been removed.
+
+* New targets:
+
+ - New `cscope' target to build a cscope database for the source tree.
* 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.
-Bugs fixed in 1.11.0a:
+ - "make dist" can now create lzip-compressed tarballs.
+
+ - You may adjust the compression options used in dist-xz and dist-bzip2.
+ The default is still -9 for each, but you may specify a different
+ level via the XZ_OPT and BZIP2 envvars respectively. E.g.,
+ "make dist-xz XZ_OPT=-7" or "make dist-xz BZIP2=-5"
+
+ - 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.
+
+ - Automake's early configure-time sanity check now tries to avoid sleeping
+ for a second, which slowed down cached configure runs noticeably. In that
+ case, it will check back at the end of the configure script to ensure that
+ at least one second has passed, to avoid time stamp issues with makefile
+ rules rerunning autotools programs.
+
+ - For programs and libraries, automake now detects EXTRA_foo_DEPENDENCIES and
+ adds them to the normal list of dependencies, but without overwriting the
+ foo_DEPENDENCIES variable, which is normally computed by automake.
+
+Bugs fixed in 1.11a:
+
+ - Lots of minor bugfixes.
* Bugs introduced by 1.11:
- 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.
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
Jason Duell jcduell@lbl.gov
Jason Molenda crash@cygnus.co.jp
Jeff Bailey Jbailey@phn.ca
+Jeff A. Daily jeff.daily@pnl.gov
Jeff Garzik jgarzik@pobox.com
Jeff Squyres jsquyres@lam-mpi.org
Jens Elkner elkner@imsgroup.de
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
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};
}
}
# 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");
}
}
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)
$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;
{
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
}
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");
}
}
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])
while (1)
{
++$loop;
- prog_error "Too many loops." if $loop > 2;
+ prog_error "too many loops" if $loop > 2;
reset_maps;
scan_m4_files;
-# 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.
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])
my @common_files =
(qw(ABOUT-GNU ABOUT-NLS AUTHORS BACKLOG COPYING COPYING.DOC COPYING.LIB
COPYING.LESSER ChangeLog INSTALL NEWS README THANKS TODO
- ansi2knr.1 ansi2knr.c compile config.guess config.rpath config.sub
- depcomp elisp-comp install-sh libversion.in mdate-sh missing
- mkinstalldirs py-compile texinfo.tex ylwrap),
+ ansi2knr.1 ansi2knr.c ar-lib compile config.guess config.rpath
+ config.sub depcomp elisp-comp install-sh libversion.in mdate-sh
+ missing mkinstalldirs py-compile texinfo.tex ylwrap),
@libtool_files, @libtool_sometimes);
# Commonly used files we auto-include, but only sometimes. This list
# Names used in AC_CONFIG_LINKS call.
my @config_links = ();
-# Directory where output files go. Actually, output files are
-# relative to this directory.
-my $output_directory;
-
# List of Makefile.am's to process, and their corresponding outputs.
my @input_files = ();
my %output_files = ();
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'.
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");
}
}
}
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;
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_';
# 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 ();
}
"use `${xname}_LDADD', not `${xname}_LIBADD'");
set_seen ($xname . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xname . '_DEPENDENCIES');
set_seen ($xname . '_LDFLAGS');
# Determine program to use for link.
# Make sure we at look at this.
set_seen ($xlib . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
&handle_source_transform ($xlib, $onelib, $obj, $where,
NONLIBTOOL => 1, LIBTOOL => 0);
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");
# Make sure we look at these.
set_seen ($xlib . '_LDFLAGS');
set_seen ($xlib . '_DEPENDENCIES');
+ set_seen ('EXTRA_' . $xlib . '_DEPENDENCIES');
# Generate support for conditional object inclusion in
# libraries.
for my $cond ($var->conditions->conds)
{
- $varname =~ /^(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
+ $varname =~ /^(?:EXTRA_)?(?:nobase_)?(?:dist_|nodist_)?(.*)_[[:alnum:]]+$/;
msg_var ('syntax', $var, "variable `$varname' is defined but no"
. " program or\nlibrary has `$1' as canonical name"
. " (possible typo)")
$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,
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");
}
my ($mostlyclean, $clean, $maintclean) = ('', '', '');
if ($info_texinfos)
{
+ define_verbose_texinfo;
($mostlyclean, $clean, $maintclean) = handle_texinfo_helper ($info_texinfos);
chomp $mostlyclean;
chomp $clean;
$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'));
}
{
my @tag_deps = ();
my @ctag_deps = ();
+ my @cscope_deps = ();
if (var ('SUBDIRS'))
{
$output_rules .= ("tags-recursive:\n"
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)
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
# 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";
}
}
{
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;
}
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
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)
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];
. "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
{
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);
}
{
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");
}
}
}
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;
'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',
$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
# 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");
}
}
}
check_typos;
- my ($out_file) = $output_directory . '/' . $makefile_in;
-
if ($exit_code != 0)
{
- verb "not writing $out_file because of earlier errors";
+ verb "not writing $makefile_in because of earlier errors";
return;
}
- if (! -d ($output_directory . '/' . $am_relative_dir))
- {
- mkdir ($output_directory . '/' . $am_relative_dir, 0755);
- }
+ mkdir ($am_relative_dir, 0755) if ! -d $am_relative_dir;
# We make sure that `all:' is the first target.
my $output =
# * other dependencies, specific to the Makefile.am being processed
# (such as the Makefile.am itself, or any Makefile fragment
# it includes).
- my $timestamp = mtime $out_file;
+ my $timestamp = mtime $makefile_in;
if (! $force_generation
&& $configure_deps_greatest_timestamp < $timestamp
&& $output_deps_greatest_timestamp < $timestamp
- && $output eq contents ($out_file))
+ && $output eq contents ($makefile_in))
{
- verb "$out_file unchanged";
+ verb "$makefile_in unchanged";
# No need to update.
return;
}
- if (-e $out_file)
+ if (-e $makefile_in)
{
- unlink ($out_file)
- or fatal "cannot remove $out_file: $!\n";
+ unlink ($makefile_in)
+ or fatal "cannot remove $makefile_in: $!";
}
- my $gm_file = new Automake::XFile "> $out_file";
- verb "creating $out_file";
+ my $gm_file = new Automake::XFile "> $makefile_in";
+ verb "creating $makefile_in";
print $gm_file $output;
}
# Print usage information.
sub usage ()
{
- print "Usage: $0 [OPTION] ... [Makefile]...
+ print "Usage: $0 [OPTION]... [Makefile]...
Generate Makefile.in for configure from Makefile.am.
$cli_where); },
'no-force' => sub { $force_generation = 0; },
'f|force-missing' => \$force_missing,
- 'o|output-dir=s' => \$output_directory,
'a|add-missing' => \$add_missing,
'c|copy' => \$copy_missing,
'v|verbose' => sub { setup_channel 'verb', silent => 0; },
'W|warnings=s' => \&parse_warnings,
- # These long options (--Werror and --Wno-error) for backward
- # compatibility. Use -Werror and -Wno-error today.
- 'Werror' => sub { parse_warnings 'W', 'error'; },
- 'Wno-error' => sub { parse_warnings 'W', 'no-error'; },
);
use Getopt::Long;
Getopt::Long::config ("bundling", "pass_through");
Getopt::Long::GetOptions %cli_options, 'version' => sub {}, 'help' => sub {}
or exit 1;
- if (defined $output_directory)
- {
- msg 'obsolete', "`--output-dir' is deprecated\n";
- }
- else
- {
- # In the next release we'll remove this entirely.
- $output_directory = '.';
- }
-
return unless @ARGV;
if ($ARGV[0] =~ /^-./)
}
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.
# Create temporary replacement for automake.
dosubst automake.in automake.tmp
-# Create tests/parallel-tests.am.
+# Create required makefile snippets.
cd tests
$BOOTSTRAP_SHELL ./gen-parallel-tests > parallel-tests.am
+$BOOTSTRAP_SHELL ./instspc-tests.sh --generate-makefile > instspc-tests.am
cd ..
# Run the autotools.
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.68 for GNU Automake 1.11.
+# Generated by GNU Autoconf 2.68 for GNU Automake 1.11a.
#
# Report bugs to <bug-automake@gnu.org>.
#
# 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/'
PERL
pkgvdatadir
APIVERSION
+AM_BACKSLASH
+AM_DEFAULT_VERBOSITY
am__untar
am__tar
AMTAR
ac_subst_files=''
ac_user_opts='
enable_option_checking
+enable_silent_rules
'
ac_precious_vars='build_alias
host_alias
# 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]...
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/>.
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-GNU Automake configure 1.11
+GNU Automake configure 1.11a
generated by GNU Autoconf 2.68
Copyright (C) 2010 Free Software Foundation, Inc.
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
+It was created by GNU Automake $as_me 1.11a, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ $0 $@
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
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
+ am_has_slept=no
for am_try in 1 2; do
- echo timestamp > conftest.file
+ echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$*" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
- rm -f conftest.file
if test "$*" != "X $srcdir/configure conftest.file" \
&& test "$*" != "X conftest.file $srcdir/configure"; then
fi
# Just in case.
sleep 1
+ am_has_slept=yes
done
test "$2" = conftest.file
)
fi
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
$as_echo "yes" >&6; }
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+
+rm -f conftest.file
+
test "$program_prefix" != NONE &&
program_transform_name="s&^&$program_prefix&;$program_transform_name"
# Use a double $ so make ignores it.
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."
# Define the identity of the package.
PACKAGE='automake'
- VERSION='1.11'
+ VERSION='1.11a'
cat >>confdefs.h <<_ACEOF
sh_errexit_works=$am_cv_sh_errexit_works
-ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs"
+ac_config_files="$ac_config_files Makefile doc/Makefile lib/Automake/Makefile lib/Automake/tests/Makefile lib/Makefile lib/am/Makefile m4/Makefile tests/Makefile tests/defs-static"
+
+ac_config_links="$ac_config_links tests/defs:tests/defs"
ac_config_files="$ac_config_files tests/aclocal-${APIVERSION}:tests/aclocal.in"
LTLIBOBJS=$ac_ltlibobjs
+{ $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5
+$as_echo_n "checking that generated files are newer than configure... " >&6; }
+ if test -n "$am_sleep_pid"; then
+ wait $am_sleep_pid
+ fi
+ { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5
+$as_echo "done" >&6; }
: "${CONFIG_STATUS=./config.status}"
# 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
+This file was extended by GNU Automake $as_me 1.11a, which was
generated by GNU Autoconf 2.68. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
# Files that config.status was made for.
config_files="$ac_config_files"
+config_links="$ac_config_links"
_ACEOF
Configuration files:
$config_files
+Configuration links:
+$config_links
+
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/>."
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
+GNU Automake config.status 1.11a
configured by $0, generated by GNU Autoconf 2.68,
with options \\"\$ac_cs_config\\"
"lib/am/Makefile") CONFIG_FILES="$CONFIG_FILES lib/am/Makefile" ;;
"m4/Makefile") CONFIG_FILES="$CONFIG_FILES m4/Makefile" ;;
"tests/Makefile") CONFIG_FILES="$CONFIG_FILES tests/Makefile" ;;
- "tests/defs") CONFIG_FILES="$CONFIG_FILES tests/defs" ;;
+ "tests/defs-static") CONFIG_FILES="$CONFIG_FILES tests/defs-static" ;;
+ "tests/defs") CONFIG_LINKS="$CONFIG_LINKS tests/defs:tests/defs" ;;
"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" ;;
# bizarre bug on SunOS 4.1.3.
if $ac_need_defaults; then
test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+ test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links
fi
# Have a temporary directory for convenience. Make it in the build tree
fi # test -n "$CONFIG_FILES"
-eval set X " :F $CONFIG_FILES "
+eval set X " :F $CONFIG_FILES :L $CONFIG_LINKS "
shift
for ac_tag
do
|| as_fn_error $? "could not create $ac_file" "$LINENO" 5
;;
+ :L)
+ #
+ # CONFIG_LINK
+ #
+
+ if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then
+ :
+ else
+ # Prefer the file from the source tree if names are identical.
+ if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then
+ ac_source=$srcdir/$ac_source
+ fi
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5
+$as_echo "$as_me: linking $ac_source to $ac_file" >&6;}
+ if test ! -r "$ac_source"; then
+ as_fn_error $? "$ac_source: file not found" "$LINENO" 5
+ fi
+ rm -f "$ac_file"
+
+ # Try a relative symlink, then a hard link, then a copy.
+ case $ac_source in
+ [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;;
+ *) ac_rel_source=$ac_top_build_prefix$ac_source ;;
+ esac
+ ln -s "$ac_rel_source" "$ac_file" 2>/dev/null ||
+ ln "$ac_source" "$ac_file" 2>/dev/null ||
+ cp -p "$ac_source" "$ac_file" ||
+ as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5
+ fi
+ ;;
esac
# 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/])])
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.
lib/am/Makefile
m4/Makefile
tests/Makefile
- tests/defs
+ tests/defs-static
])
+AC_CONFIG_LINKS([tests/defs:tests/defs])
AC_CONFIG_FILES([tests/aclocal-${APIVERSION}:tests/aclocal.in],
[chmod +x tests/aclocal-${APIVERSION}],
[APIVERSION=$APIVERSION])
$(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)
# 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) \
-# 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,
$(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
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
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=$@
$(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 \
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 $@; \
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)
&& $(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
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
.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)
# 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) \
* General Operation:: General operation of Automake
* Strictness:: Standards conformance checking
* Uniform:: The Uniform Naming Scheme
-* Canonicalization:: How derived variables are named
* Length Limitations:: Staying below the command line length limit
+* Canonicalization:: How derived variables are named
* User Variables:: Variables reserved for the user
* Auxiliary Programs:: Programs automake might require
* Program Sources:: Defining program sources
* Linking:: Linking with libraries or extra objects
* Conditional Sources:: Handling conditional sources
-* Conditional Programs:: Building program conditionally
+* Conditional Programs:: Building a program conditionally
Building a Shared Library
* LTLIBOBJS:: Using $(LTLIBOBJS) and $(LTALLOCA)
* Libtool Issues:: Common Issues Related to Libtool's Use
+Common Issues Related to Libtool's Use
+
+* Error required file ltmain.sh not found:: The need to run libtoolize
+* Objects created both with libtool and without:: Avoid a specific build race
+
Fortran 77 Support
* Preprocessing Fortran 77:: Preprocessing Fortran 77 sources
* Texinfo:: Texinfo
* Man Pages:: Man pages
-Installation
+What Gets Installed
* Basics of Installation:: What gets installed where
* The Two Parts of Install:: Installing data and programs separately
* Staged Installs:: Installation in a temporary location
* Install Rules for the User:: Useful additional rules
-Distribution
+What Goes in a Distribution
* Basics of Distribution:: Files distributed by default
* Fine-grained Distribution Control:: @code{dist_} and @code{nodist_} prefixes
* Checking the Distribution:: @samp{make distcheck} explained
* The Types of Distributions:: A variety of formats and compression methods
-Support for Test Suites
+Support for test suites
* Simple Tests:: Listing programs and scripts in @code{TESTS}
* Simple Tests using parallel-tests:: More powerful test driver
Miscellaneous Rules
-* Tags:: Interfacing to etags and mkid
+* Tags:: Interfacing to cscope, etags and mkid
* Suffixes:: Handling new file extensions
* Multilibs:: Support for multilibs.
* Dependency Tracking Evolution:: Evolution of Automatic Dependency Tracking
* Releases:: Statistics about Automake Releases
-Dependency Tracking Evolution
+Dependency Tracking in Automake
* First Take on Dependencies:: Precomputed dependency tracking
* Dependencies As Side Effects:: Update at developer compile time
* Dependencies for the User:: Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies:: Alternative approaches
* Recommendations for Tool Writers:: What tool writers can do to help
* Future Directions for Dependencies:: Languages Automake does not know
* General Operation:: General operation of Automake
* Strictness:: Standards conformance checking
* Uniform:: The Uniform Naming Scheme
-* Canonicalization:: How derived variables are named
* Length Limitations:: Staying below the command line length limit
+* Canonicalization:: How derived variables are named
* User Variables:: Variables reserved for the user
* Auxiliary Programs:: Programs automake might require
@end menu
objects are not installed either.
The current primary names are @samp{PROGRAMS}, @samp{LIBRARIES},
-@samp{LISP}, @samp{PYTHON}, @samp{JAVA}, @samp{SCRIPTS}, @samp{DATA},
-@samp{HEADERS}, @samp{MANS}, and @samp{TEXINFOS}.
+@samp{LTLIBRARIES}, @samp{LISP}, @samp{PYTHON}, @samp{JAVA},
+@samp{SCRIPTS}, @samp{DATA}, @samp{HEADERS}, @samp{MANS}, and
+@samp{TEXINFOS}.
@vindex PROGRAMS
@vindex LIBRARIES
+@vindex LTLIBRARIES
@vindex LISP
@vindex PYTHON
@vindex JAVA
source in case you need more recent versions.
@table @code
+@item ar-lib
+This is a wrapper primarily for the Microsoft lib archiver, to make
+it more POSIX-like.
+
@item ansi2knr.c
@itemx ansi2knr.1
These two files are used for de-ANSI-fication support (obsolete
@item compile
This is a wrapper for compilers that do not accept options @option{-c}
and @option{-o} at the same time. It is only used when absolutely
-required. Such compilers are rare.
+required. Such compilers are rare, with the Microsoft C/C++ Compiler
+as the most notable exception. This wrapper also makes the following
+common options available for that compiler, while performing file name
+translation where needed: @option{-I}, @option{-L}, @option{-l},
+@option{-Wl,} and @option{-Xlinker}.
@item config.guess
@itemx config.sub
Automake will look for various helper scripts, such as
@file{install-sh}, in the directory named in this macro invocation.
@c This list is accurate relative to version 1.8
-(The full list of scripts is: @file{config.guess}, @file{config.sub},
-@file{depcomp}, @file{elisp-comp}, @file{compile}, @file{install-sh},
-@file{ltmain.sh}, @file{mdate-sh}, @file{missing}, @file{mkinstalldirs},
-@file{py-compile}, @file{texinfo.tex}, and @file{ylwrap}.) Not all
-scripts are always searched for; some scripts will only be sought if the
-generated @file{Makefile.in} requires them.
+(The full list of scripts is: @file{ar-lib}, @file{config.guess},
+@file{config.sub}, @file{depcomp}, @file{elisp-comp}, @file{compile},
+@file{install-sh}, @file{ltmain.sh}, @file{mdate-sh}, @file{missing},
+@file{mkinstalldirs}, @file{py-compile}, @file{texinfo.tex}, and
+@file{ylwrap}.) Not all scripts are always searched for; some scripts
+will only be sought if the generated @file{Makefile.in} requires them.
If @code{AC_CONFIG_AUX_DIR} is not given, the scripts are looked for in
their standard locations. For @file{mdate-sh},
the user runs @command{configure} with @option{--with-dmalloc}, then
define @code{WITH_DMALLOC} and add @option{-ldmalloc} to @code{LIBS}.
-@item AM_WITH_REGEX
-@acindex AM_WITH_REGEX
-@vindex WITH_REGEX
-@opindex --with-regex
-@cindex regex package
-@cindex rx package
-Adds @option{--with-regex} to the @command{configure} command line. If
-specified (the default), then the @samp{regex} regular expression
-library is used, @file{regex.o} is put into @code{LIBOBJS}, and
-@code{WITH_REGEX} is defined. If @option{--without-regex} is given, then
-the @code{rx} regular expression library is used, and @file{rx.o} is put
-into @code{LIBOBJS}.
-
@end table
@samp{yes}. If not, set the variable to @samp{no}. This macro is obsolete,
you should use Autoconf's @code{AC_SYS_POSIX_TERMIOS} instead.
+@item AM_WITH_REGEX
+@acindex AM_WITH_REGEX
+@vindex WITH_REGEX
+@opindex --with-regex
+@cindex regex package
+@cindex rx package
+Adds @option{--with-regex} to the @command{configure} command line. If
+specified (the default), then the @samp{regex} regular expression
+library is used, @file{regex.o} is put into @code{LIBOBJS}, and
+@code{WITH_REGEX} is defined. If @option{--without-regex} is given, then
+the @samp{rx} regular expression library is used, and @file{rx.o} is put
+into @code{LIBOBJS}. This macro is obsolete now (since @samp{rx} doesn't
+seem to be maintained), and will be removed in a future version of
+Automake. Consider using gnulib if you need regex functionality.
+
@end table
@cindex @code{_DEPENDENCIES}, defined
@vindex maude_DEPENDENCIES
+@vindex EXTRA_maude_DEPENDENCIES
It is also occasionally useful to have a program depend on some other
target that is not actually part of that program. This can be done
-using the @code{@var{prog}_DEPENDENCIES} variable. Each program
-depends on the contents of such a variable, but no further
-interpretation is done.
+using either the @code{@var{prog}_DEPENDENCIES} or the
+@code{EXTRA_@var{prog}_DEPENDENCIES} variable. Each program depends on
+the contents both variables, but no further interpretation is done.
Since these dependencies are associated to the link rule used to
create the programs they should normally list files used by the link
@ref{Conditional Sources} shows a situation where @code{_DEPENDENCIES}
may be used.
+The @code{EXTRA_@var{prog}_DEPENDENCIES} may be useful for cases where
+you merely want to augment the @command{automake}-generated
+@code{@var{prog}_DEPENDENCIES} rather than replacing it.
+
@cindex @code{LDADD} and @option{-l}
@cindex @option{-l} and @code{LDADD}
We recommend that you avoid using @option{-l} options in @code{LDADD}
@subsection Common Issues Related to Libtool's Use
@menu
-* Error required file ltmain.sh not found:: The need to run libtoolize
-* Objects created both with libtool and without:: Avoid a specific build race
+* Error required file ltmain.sh not found:: The need to run libtoolize
+* Objects created both with libtool and without:: Avoid a specific build race
@end menu
@node Error required file ltmain.sh not found
the compiler or linker flags). @xref{Libtool Flags}.
@item maude_DEPENDENCIES
+@itemx EXTRA_maude_DEPENDENCIES
It is also occasionally useful to have a target (program or library)
depend on some other file that is not actually part of that target.
This can be done using the @code{_DEPENDENCIES} variable. Each
objects. @xref{Conditional Sources}, and @ref{Conditional Libtool
Sources}.
+The @code{EXTRA_*_DEPENDENCIES} variable may be useful for cases where
+you merely want to augment the @command{automake}-generated
+@code{_DEPENDENCIES} variable rather than replacing it.
+
@item maude_LINK
You can override the linker on a per-program basis. By default the
linker is chosen according to the languages used by the program. For
automatically adds @samp{$(LIBOBJS)} and @samp{$(ALLOCA)} to the
dependencies, and it will discover the list of corresponding source
files automatically (by tracing the invocations of the
-@code{AC_LIBSOURCE} Autoconf macros). However, if you have already
-defined @samp{*_DEPENDENCIES} explicitly for an unrelated reason, then
-you have to add these variables manually.
+@code{AC_LIBSOURCE} Autoconf macros). If you have already defined
+@samp{*_DEPENDENCIES} explicitly for an unrelated reason, then you
+either need to add these variables manually, or use
+@samp{EXTRA_*_DEPENDENCIES} instead of @samp{*_DEPENDENCIES}.
These variables are usually used to build a portability library that
is linked with all the programs of the project. We now review a
@example
pyexec_LTLIBRARIES = quaternion.la
-quaternion_SOURCES = quaternion.c support.c support.h
+quaternion_la_SOURCES = quaternion.c support.c support.h
quaternion_la_LDFLAGS = -avoid-version -module
@end example
distributions in various formats. Their targets are:
@table @asis
+@vindex BZIP2
@item @code{dist-bzip2}
Generate a bzip2 tar archive of the distribution. bzip2 archives are
frequently smaller than gzipped archives.
+By default, this rule makes @samp{bzip2} use a compression option of @option{-9}.
+To make it use a different one, set the @env{BZIP2} environment variable.
+For example, @samp{make dist-bzip2 BZIP2=-7}.
@trindex dist-bzip2
@item @code{dist-gzip}
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.
Generate a shar archive of the distribution.
@trindex dist-shar
+@vindex XZ_OPT
@item @code{dist-xz}
Generate an @samp{xz} tar archive of the distribution. @command{xz}
archives are frequently smaller than @command{bzip2}-compressed archives.
The @samp{xz} format displaces the obsolete @samp{lzma} format.
+By default, this rule makes @samp{xz} use a compression option of @option{-9}.
+To make it use a different one, set the @env{XZ_OPT} environment variable.
+For example, run this command to use the default compression ratio, but
+with a progress indicator: @samp{make dist-xz XZ_OPT=-7e}.
@trindex dist-xz
@item @code{dist-zip}
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
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.
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
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
* First Take on Dependencies:: Precomputed dependency tracking
* Dependencies As Side Effects:: Update at developer compile time
* Dependencies for the User:: Update at user compile time
-* Techniques for Dependencies:: Alternative approaches
+* Techniques for Dependencies:: Alternative approaches
* Recommendations for Tool Writers:: What tool writers can do to help
* Future Directions for Dependencies:: Languages Automake does not know
@end menu
@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
verb ($MESSAGE, [%OPTIONS]);
switch_warning ($CATEGORY);
parse_WARNINGS ();
- parse_warning ($OPTION, $ARGUMENT);
+ parse_warnings ($OPTION, $ARGUMENT);
Automake::ChannelDefs::set_strictness ($STRICTNESS_NAME);
=head1 DESCRIPTION
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
}
}
-=item C<parse_warning ($OPTION, $ARGUMENT)>
+=item C<parse_warnings ($OPTION, $ARGUMENT)>
Parse the argument of C<--warning=CATEGORY> or C<-WCATEGORY>.
}
else
{
- prog_error "level `$name' not recognized\n";
+ prog_error "level `$name' not recognized";
}
}
=cut
+1;
+
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
## perl-indent-level: 2
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>
=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>
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]);
else
{
$location ||= $me;
- $msg = _format_sub_message ("$location: ", $opts{'header'}
- . $message . $opts{'footer'});
+ $msg = _format_sub_message ("$location: ", $msg);
}
return $msg;
}
}
-# 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.
$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)
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;
}
-# 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
};
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)
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;
}
}
# Undocumented, shouldn't be needed outside of this class.
-sub has ($$)
+sub _has ($$)
{
my ($self, $cond) = @_;
return exists $self->{'hash'}{$cond};
sub false ($ )
{
my ($self) = @_;
- return $self->has ('FALSE');
+ return $self->_has ('FALSE');
}
=item C<$cond-E<gt>true>
# exists in $WHEN.
foreach my $cond ($self->conds)
{
- return 0 unless $when->has ($cond);
+ return 0 unless $when->_has ($cond);
}
return 1;
}
return (values %res);
}
+=back
+
=head2 Other helper functions
=over 4
return $cond;
}
+=back
+
=head1 SEE ALSO
L<Automake::DisjConditions>.
our $libdir = '@datadir@/@PACKAGE@-@APIVERSION@';
our $perl_threads = @PERL_THREADS@;
-1;;
+1;
### Setup "GNU" style for perl-mode and cperl-mode.
## Local Variables:
-# Copyright (C) 2003, 2005, 2006, 2010 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
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 (;@)
{
msg ('unsupported',
"`$configure_ac' and `$configure_in' both present.\n"
- . "proceeding with `$configure_ac'.");
+ . "proceeding with `$configure_ac'");
}
return $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 (@_);
-# 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
...
}
- # 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
=cut
+=head2 Methods
+
+=over
+
+=item C<$where = new Automake::Location ([$position])>
+
+Create and return a new Location object.
+
+=cut
+
sub new ($;$)
{
my ($class, $position) = @_;
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) = @_;
$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) = @_;
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) = @_;
return $other;
}
+=item C<$res = $location-E<gt>dump>
+
+Print the location and the stack of context (for debugging).
+
+=cut
+
sub dump ($)
{
my ($self) = @_;
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) = @_;
return @serial;
}
+=item C<new Automake::Location::deserialize ($queue)>
+
+De-serialize: recreate a Location object from a queue.
+
+=cut
+
sub deserialize ($)
{
my ($queue) = @_;
return $self;
}
+=back
+
=head1 SEE ALSO
L<Automake::Channels>
## $(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
-# 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,
$(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 \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
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)'; \
&& $(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
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
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 \
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.
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'
}
else
{
- prog_error "level `$strictness_name' not recognized\n";
+ prog_error "level `$strictness_name' not recognized";
}
}
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
## 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");
}
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);
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");
}
}
# Never reached.
- prog_error ("Unreachable place reached.");
+ prog_error ("unreachable place reached");
}
# Conditions for which the rule should be defined.
# 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;
-# 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
=head1 DESCRIPTION
This class gathers data related to one Makefile-rule definition.
+It shouldn't be needed outside of F<Rule.pm>.
=head2 Constants
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) = @_;
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) = @_;
-# 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
=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>
# 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");
{
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,
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");
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.");
}
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;
-# 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
=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);
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.).
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;
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
{
$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
{
binmode $fh if $file =~ /^\s*>/;
}
-################################################
-## Close
-##
+=item C<$fh-E<gt>close>
+
+Close the file, handling errors.
+
+=cut
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.
return $_;
}
-################################################
-## Getlines
-##
+=item C<@lines = $fh-E<gt>getlines>
+
+Slurp lines from the files.
+
+=cut
sub getlines
{
return @res;
}
-################################################
-## Name
-##
+=item C<$name = $fh-E<gt>name>
+
+Return the name of the file.
+
+=cut
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
{
}
}
-################################################
-## Seek
-##
+=item C<$fh-E<gt>seek ($position, [$whence])>
+
+Seek file to C<$position>. Die if seeking fails.
+
+=cut
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
{
}
}
+=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.
--- /dev/null
+# 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);
--- /dev/null
+# 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");
-# 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.
#
BEGIN {
use Config;
if (eval { require 5.007_002; } # for CLONE support
- && $Config{useithreads})
+ && $Config{useithreads}
+ && !$ENV{WANT_NO_THREADS})
{
require threads;
import threads;
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)
{
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;
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:
-# 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.
#
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)
{
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;
}
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:
--- /dev/null
+# 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);
--- /dev/null
+# 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");
-# 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.
#
BEGIN {
use Config;
if (eval { require 5.007_002; } # for CLONE support
- && $Config{useithreads})
+ && $Config{useithreads}
+ && !$ENV{WANT_NO_THREADS})
{
require threads;
import threads;
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;
-# 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.
#
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 (@)
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)
-# 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,
$(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,
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
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
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__sh_e_setup); \
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
-# Copyright (C) 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2003, 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
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 = (
['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;
--- /dev/null
+# prog_error due to invalid $VERSION.
+
+use Automake::Version;
+
+Automake::Version::check ('', '1.2.3');
--- /dev/null
+# prog_error due to invalid $REQUIRED.
+
+use Automake::Version;
+
+Automake::Version::check ('1.2.3', '');
-# Copyright (C) 2003 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2009 Free Software Foundation, Inc.
#
# This file is part of GNU Automake.
#
# 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;
}
}
+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
"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;
## Makefile for Automake lib.
-# Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 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
scriptdir = $(pkgvdatadir)
dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
- symlink-tree
+ symlink-tree ar-lib
EXTRA_DIST = gnupload
-# 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,
@SET_MAKE@
-# Copyright (C) 2001, 2003, 2004, 2009 Free Software Foundation, Inc.
+# Copyright (C) 2001, 2003, 2004, 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
subdir = lib
DIST_COMMON = $(dist_pkgvdata_DATA) $(dist_script_DATA) \
$(srcdir)/Makefile.am $(srcdir)/Makefile.in COPYING INSTALL \
- ansi2knr.1 ansi2knr.c compile config.guess config.sub depcomp \
- elisp-comp install-sh mdate-sh missing mkinstalldirs \
+ ansi2knr.1 ansi2knr.c ar-lib compile config.guess config.sub \
+ depcomp elisp-comp install-sh mdate-sh missing mkinstalldirs \
py-compile texinfo.tex ylwrap
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
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 \
reldir="$$dir2"
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
scriptdir = $(pkgvdatadir)
dist_script_DATA = config.guess config.sub install-sh mdate-sh missing \
mkinstalldirs elisp-comp ylwrap acinstall depcomp compile py-compile \
- symlink-tree
+ symlink-tree ar-lib
EXTRA_DIST = gnupload
all: all-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)'; \
&& $(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
installcheck: installcheck-recursive
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
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
-# 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,
$(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'`;
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
## 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
## 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
{ 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%
## 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%
.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)
+ tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2
+ $(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)
+ tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--9} xz -c >$(distdir).tar.xz
+ $(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%
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%
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*) \
## 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'
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009 Free Software
+## Copyright (C) 2001, 2002, 2003, 2004, 2006, 2008, 2009, 2010 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## It's OK to override both with INSTALL_STRIP_PROGRAM, because
## INSTALL_STRIP_PROGRAM uses install-sh (see m4/strip.m4 for a rationale).
##
-## Use double quotes here because we might need to interpolate some
-## backquotes at runtime.
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+## Use double quotes for the *_PROGRAM settings because we might need to
+## interpolate some backquotes at runtime.
+##
+## The case for empty $(STRIP) is separate so that it is quoted correctly for
+## multiple words, but does not expand to an empty words if STRIP is empty.
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009 Free Software
+## Copyright (C) 1994, 1995, 1996, 1999, 2003, 2009, 2010 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LIBRARY%: $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_DEPENDENCIES) $(EXTRA_%XLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%SILENT%-rm -f %LIBRARY%
%VERBOSE%$(%XLIBRARY%_AR) %LIBRARY% $(%XLIBRARY%_OBJECTS) $(%XLIBRARY%_LIBADD)
%SILENT%$(RANLIB) %LIBRARY%
## `so_locations' files are created by some linkers (IRIX, OSF) when
## building a shared object. Libtool places these files in the
## directory where the shared object is created.
- @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
- dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
- test "$$dir" != "$$p" || dir=.; \
- echo "rm -f \"$${dir}/so_locations\""; \
- rm -f "$${dir}/so_locations"; \
- done
+ @list='$(%DIR%_LTLIBRARIES)'; \
+ locs=`for p in $$list; do echo $$p; done | \
+ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+ sort -u`; \
+ test -z "$$locs" || { \
+ echo rm -f $${locs}; \
+ rm -f $${locs}; \
+ }
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009 Free Software
+## Copyright (C) 1994, 1995, 1996, 2003, 2005, 2008, 2009, 2010 Free Software
## Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
+%LTLIBRARY%: $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_DEPENDENCIES) $(EXTRA_%XLTLIBRARY%_DEPENDENCIES) %DIRSTAMP%
%VERBOSE%$(%XLINK%) %RPATH% $(%XLTLIBRARY%_OBJECTS) $(%XLTLIBRARY%_LIBADD) $(LIBS)
## automake - create Makefile.in from Makefile.am
-## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009
+## Copyright (C) 1994, 1995, 1996, 1997, 2001, 2003, 2005, 2009, 2010
## Free Software Foundation, Inc.
## This program is free software; you can redistribute it and/or modify
## You should have received a copy of the GNU General Public License
## along with this program. If not, see <http://www.gnu.org/licenses/>.
-%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
+%PROGRAM%%EXEEXT%: $(%XPROGRAM%_OBJECTS) $(%XPROGRAM%_DEPENDENCIES) $(EXTRA_%XPROGRAM%_DEPENDENCIES) %DIRSTAMP%
## Remove program before linking. Otherwise the link will fail if the
## program is running somewhere. FIXME: this could be a loss if
## you're using an incremental linker. Maybe we should think twice?
## 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
-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 } \
&& 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. ##
## ---------- ##
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%
## 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
?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%
## 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 \
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
--- /dev/null
+#! /bin/sh
+# Wrapper for Microsoft lib.exe
+
+me=ar-lib
+scriptversion=2010-09-02.19; # UTC
+
+# Copyright (C) 2010 Free Software
+# Foundation, Inc.
+# Written by Peter Rosin <peda@lysator.liu.se>.
+#
+# 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/>.
+
+# As a special exception to the GNU General Public License, if you
+# distribute this file as part of a program that contains a
+# configuration script generated by Autoconf, you may include it under
+# the same distribution terms that you use for the rest of that program.
+
+# This file is maintained in Automake, please report
+# bugs to <bug-automake@gnu.org> or send patches to
+# <automake-patches@gnu.org>.
+
+
+# func_error message
+func_error ()
+{
+ echo "$me: $1" 1>&2
+ exit 1
+}
+
+file_conv=
+
+# func_file_conv build_file
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Win32 hosts.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv in
+ mingw)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_at_file at_file operation archive
+# Iterate over all members in AT_FILE performing OPERATION on ARCHIVE
+# for each of them.
+# When interpreting the content of the @FILE, do NOT use func_file_conv,
+# since the user would need to supply preconverted file names to
+# binutils ar, at least for MinGW.
+func_at_file ()
+{
+ operation=$2
+ archive=$3
+ at_file_contents=`cat "$1"`
+ eval set x "$at_file_contents"
+ shift
+
+ for member
+ do
+ $AR -NOLOGO $operation:"$member" "$archive" || exit $?
+ done
+}
+
+case $1 in
+ '')
+ func_error "no command. Try \`$0 --help' for more information."
+ ;;
+ -h | --h*)
+ cat <<EOF
+Usage: $me [--help] [--version] PROGRAM ACTION ARCHIVE [MEMBER...]
+
+Members may be specified in a file named with @FILE.
+EOF
+ exit $?
+ ;;
+ -v | --v*)
+ echo "$me, version $scriptversion"
+ exit $?
+ ;;
+esac
+
+if test $# -lt 3; then
+ func_error "you must specify a program, an action and an archive"
+fi
+
+AR=$1
+shift
+while :
+do
+ if test $# -lt 2; then
+ func_error "you must specify a program, an action and an archive"
+ fi
+ case $1 in
+ -lib | -LIB \
+ | -ltcg | -LTCG \
+ | -machine* | -MACHINE* \
+ | -subsystem* | -SUBSYSTEM* \
+ | -verbose | -VERBOSE \
+ | -wx* | -WX* )
+ AR="$AR $1"
+ shift
+ ;;
+ *)
+ action=$1
+ shift
+ break
+ ;;
+ esac
+done
+orig_archive=$1
+shift
+func_file_conv "$orig_archive"
+archive=$file
+
+# strip leading dash in $action
+action=${action#-}
+
+delete=
+extract=
+list=
+replace=
+create=
+
+while test -n "$action"
+do
+ case $action in
+ d*) delete=yes ;;
+ x*) extract=yes ;;
+ t*) list=yes ;;
+ r*) replace=yes ;;
+ c*) create=yes ;;
+ u*) ;; # TODO: don't ignore the update modifier
+ *)
+ func_error "unknown action specified"
+ ;;
+ esac
+ action=${action#?}
+done
+
+case $delete$extract$list$replace in
+ yes)
+ ;;
+ yesyes*)
+ func_error "more than one action specified"
+ ;;
+ *)
+ func_error "no action specified"
+ ;;
+esac
+
+if test -n "$delete"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -REMOVE "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -REMOVE:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+
+elif test -n "$extract"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ if test $# -gt 0; then
+ for member
+ do
+ case $1 in
+ @*)
+ func_at_file "${1#@}" -EXTRACT "$archive"
+ ;;
+ *)
+ func_file_conv "$1"
+ $AR -NOLOGO -EXTRACT:"$file" "$archive" || exit $?
+ ;;
+ esac
+ done
+ else
+ $AR -NOLOGO -LIST "$archive" | sed -e 's/\\/\\\\/g' | while read member
+ do
+ $AR -NOLOGO -EXTRACT:"$member" "$archive" || exit $?
+ done
+ fi
+
+elif test -n "$replace"; then
+ if test ! -f "$orig_archive"; then
+ if test -z "$create"; then
+ echo "$me: creating $orig_archive"
+ fi
+ orig_archive=
+ else
+ orig_archive=$archive
+ fi
+
+ for member
+ do
+ case $1 in
+ @*)
+ func_file_conv "${1#@}"
+ set x "$@" "@$file"
+ ;;
+ *)
+ func_file_conv "$1"
+ set x "$@" "$file"
+ ;;
+ esac
+ shift
+ shift
+ done
+
+ if test -n "$orig_archive"; then
+ $AR -NOLOGO -OUT:"$archive" "$orig_archive" "$@" || exit $?
+ else
+ $AR -NOLOGO -OUT:"$archive" "$@" || exit $?
+ fi
+
+elif test -n "$list"; then
+ if test ! -f "$orig_archive"; then
+ func_error "archive not found"
+ fi
+ $AR -NOLOGO -LIST "$archive" || exit $?
+fi
#! /bin/sh
# Wrapper for compilers which do not understand `-c -o'.
-scriptversion=2009-10-06.20; # UTC
+scriptversion=2010-11-15.09; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009 Free Software
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2009, 2010 Free Software
# Foundation, Inc.
# Written by Tom Tromey <tromey@cygnus.com>.
#
# bugs to <bug-automake@gnu.org> or send patches to
# <automake-patches@gnu.org>.
+nl='
+'
+
+# We need space, tab and new line, in precisely that order. Quoting is
+# there to prevent tools from complaining about whitespace usage.
+IFS=" "" $nl"
+
+file_conv=
+
+# func_file_conv build_file lazy
+# Convert a $build file to $host form and store it in $file
+# Currently only supports Win32 hosts. If the determined conversion
+# type is listed in (the comma separated) LAZY, no conversion will
+# take place.
+func_file_conv ()
+{
+ file=$1
+ case $file in
+ / | /[!/]*) # absolute file, and not a UNC file
+ if test -z "$file_conv"; then
+ # lazily determine how to convert abs files
+ case `uname -s` in
+ MINGW*)
+ file_conv=mingw
+ ;;
+ CYGWIN*)
+ file_conv=cygwin
+ ;;
+ *)
+ file_conv=wine
+ ;;
+ esac
+ fi
+ case $file_conv/,$2, in
+ *,$file_conv,*)
+ ;;
+ mingw/*)
+ file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
+ ;;
+ cygwin/*)
+ file=`cygpath -m "$file" || echo "$file"`
+ ;;
+ wine/*)
+ file=`winepath -w "$file" || echo "$file"`
+ ;;
+ esac
+ ;;
+ esac
+}
+
+# func_cl_wrapper cl arg...
+# Adjust compile command to suit cl
+func_cl_wrapper ()
+{
+ # Assume a capable shell
+ lib_path=
+ shared=:
+ linker_opts=
+ for arg
+ do
+ if test -n "$eat"; then
+ eat=
+ else
+ case $1 in
+ -o)
+ # configure might choose to run compile as `compile cc -o foo foo.c'.
+ eat=1
+ case $2 in
+ *.o | *.[oO][bB][jJ])
+ func_file_conv "$2"
+ set x "$@" -Fo"$file"
+ shift
+ ;;
+ *)
+ func_file_conv "$2"
+ set x "$@" -Fe"$file"
+ shift
+ ;;
+ esac
+ ;;
+ -I*)
+ func_file_conv "${1#-I}" mingw
+ set x "$@" -I"$file"
+ shift
+ ;;
+ -l*)
+ lib=${1#-l}
+ found=no
+ save_IFS=$IFS
+ IFS=';'
+ for dir in $lib_path $LIB
+ do
+ IFS=$save_IFS
+ if $shared && test -f "$dir/$lib.dll.lib"; then
+ found=yes
+ set x "$@" "$dir/$lib.dll.lib"
+ break
+ fi
+ if test -f "$dir/$lib.lib"; then
+ found=yes
+ set x "$@" "$dir/$lib.lib"
+ break
+ fi
+ done
+ IFS=$save_IFS
+
+ test "$found" != yes && set x "$@" "$lib.lib"
+ shift
+ ;;
+ -L*)
+ func_file_conv "${1#-L}"
+ if test -z "$lib_path"; then
+ lib_path=$file
+ else
+ lib_path="$lib_path;$file"
+ fi
+ linker_opts="$linker_opts -LIBPATH:$file"
+ ;;
+ -static)
+ shared=false
+ ;;
+ -Wl,*)
+ arg=${1#-Wl,}
+ save_ifs="$IFS"; IFS=','
+ for flag in $arg; do
+ IFS="$save_ifs"
+ linker_opts="$linker_opts $flag"
+ done
+ IFS="$save_ifs"
+ ;;
+ -Xlinker)
+ eat=1
+ linker_opts="$linker_opts $2"
+ ;;
+ -*)
+ set x "$@" "$1"
+ shift
+ ;;
+ *.cc | *.CC | *.cxx | *.CXX | *.[cC]++)
+ func_file_conv "$1"
+ set x "$@" -Tp"$file"
+ shift
+ ;;
+ *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO])
+ func_file_conv "$1" mingw
+ set x "$@" "$file"
+ shift
+ ;;
+ *)
+ set x "$@" "$1"
+ shift
+ ;;
+ esac
+ fi
+ shift
+ done
+ if test -n "$linker_opts"; then
+ linker_opts="-link$linker_opts"
+ fi
+ exec "$@" $linker_opts
+ exit 1
+}
+
+eat=
+
case $1 in
'')
echo "$0: No command. Try \`$0 --help' for more information." 1>&2
echo "compile $scriptversion"
exit $?
;;
+ cl | *[/\\]cl | cl.exe | *[/\\]cl.exe )
+ func_cl_wrapper "$@" # Doesn't return...
+ ;;
esac
ofile=
cfile=
-eat=
for arg
do
# wanting multilib support.
#
# Copyright (C) 1995, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006, 2007 Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2010 Free Software Foundation, Inc.
#
# 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
prefix="$(prefix)" \
exec_prefix="$(exec_prefix)" \
GCJFLAGS="$(GCJFLAGS) $${flags}" \
+ GOCFLAGS="$(GOCFLAGS) $${flags}" \
CXXFLAGS="$(CXXFLAGS) $${flags}" \
LIBCFLAGS="$(LIBCFLAGS) $${flags}" \
LIBCXXFLAGS="$(LIBCXXFLAGS) $${flags}" \
break
fi
done
- ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags"'
+ ml_config_env='CC="${CC_}$flags" CXX="${CXX_}$flags" F77="${F77_}$flags" GCJ="${GCJ_}$flags" GFORTRAN="${GFORTRAN_}$flags" GOC="${GOC_}$flags"'
if [ "${with_target_subdir}" = "." ]; then
CC_=$CC' '
F77_=$F77' '
GCJ_=$GCJ' '
GFORTRAN_=$GFORTRAN' '
+ GOC_=$GOC' '
else
# Create a regular expression that matches any string as long
# as ML_POPDIR.
esac
done
+ GOC_=
+ for arg in ${GOC}; do
+ case $arg in
+ -[BIL]"${ML_POPDIR}"/*)
+ GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(-[BIL]${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X-[BIL]${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ "${ML_POPDIR}"/*)
+ GOC_="${GOC_}"`echo "X${arg}" | sed -n "s/X\\(${popdir_rx}\\).*/\\1/p"`/${ml_dir}`echo "X${arg}" | sed -n "s/X${popdir_rx}\\(.*\\)/\\1/p"`' ' ;;
+ *)
+ GOC_="${GOC_}${arg} " ;;
+ esac
+ done
+
if test "x${LD_LIBRARY_PATH+set}" = xset; then
LD_LIBRARY_PATH_=
for arg in `echo "$LD_LIBRARY_PATH" | tr ':' ' '`; do
#! /bin/sh
# depcomp - compile a program generating dependencies as side-effects
-scriptversion=2009-04-28.21; # UTC
+scriptversion=2010-10-07.20; # UTC
-# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 2009 Free
-# Software Foundation, Inc.
+# Copyright (C) 1999, 2000, 2003, 2004, 2005, 2006, 2007, 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
# This is just like msvisualcpp but w/o cygpath translation.
# Just convert the backslash-escaped backslashes to single forward
# slashes to satisfy depend.m4
- cygpath_u="sed s,\\\\\\\\,/,g"
+ cygpath_u='sed s,\\\\,/,g'
depmode=msvisualcpp
fi
+if test "$depmode" = msvc7msys; then
+ # This is just like msvc7 but w/o cygpath translation.
+ # Just convert the backslash-escaped backslashes to single forward
+ # slashes to satisfy depend.m4
+ cygpath_u='sed s,\\\\,/,g'
+ depmode=msvc7
+fi
+
case "$depmode" in
gcc3)
## gcc 3 implements dependency tracking that does exactly what
rm -f "$tmpdepfile"
;;
+msvc7)
+ if test "$libtool" = yes; then
+ showIncludes=-Wc,-showIncludes
+ else
+ showIncludes=-showIncludes
+ fi
+ "$@" $showIncludes > "$tmpdepfile"
+ stat=$?
+ grep -v '^Note: including file: ' "$tmpdepfile"
+ if test "$stat" = 0; then :
+ else
+ rm -f "$tmpdepfile"
+ exit $stat
+ fi
+ rm -f "$depfile"
+ echo "$object : \\" > "$depfile"
+ # The first sed program below extracts the file names and escapes
+ # backslashes for cygpath. The second sed program outputs the file
+ # name when reading, but also accumulates all include files in the
+ # hold buffer in order to output them again at the end. This only
+ # works with sed implementations that can handle large buffers.
+ sed < "$tmpdepfile" -n '
+/^Note: including file: *\(.*\)/ {
+ s//\1/
+ s/\\/\\\\/g
+ p
+}' | $cygpath_u | sort -u | sed -n '
+s/ /\\ /g
+s/\(.*\)/ \1 \\/p
+s/.\(.*\) \\/\1:/
+H
+$ {
+ s/.*/ /
+ G
+ p
+}' >> "$depfile"
+ rm -f "$tmpdepfile"
+ ;;
+
+msvc7msys)
+ # This case exists only to let depend.m4 do its work. It works by
+ # looking at the text of this script. This case will never be run,
+ # since it is checked for above.
+ exit 1
+ ;;
+
#nosideeffect)
# This comment above is used by automake to tell side-effect
# dependency tracking mechanisms from slower ones.
dprint()
{
- echo "Running $*..."
+ echo "Running $* ..."
}
if $dry_run; then
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
do
for file
do
- echo "Uploading $file to $dest..."
+ echo "Uploading $file to $dest ..."
stmt=
files="$file $file.sig"
destdir=`echo $dest | sed 's/[^:]*://'`
-# 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,
$(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'`;
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
distdir: $(DISTFILES)
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
clean-generic:
# 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
])
# 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]))])
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 11
+# serial 12
# There are a few dirty hacks below to avoid letting `AC_PROG_CC' be
# written in clear, in which case automake, when reading aclocal.m4,
break
fi
;;
- msvisualcpp | msvcmsys)
+ msvc7 | msvc7msys | msvisualcpp | msvcmsys)
# This compiler won't grok `-c -o', but also, the minuso test has
# not run yet. These depmodes are late enough in the game, and
# so weak that their functioning should not be impacted.
# AM_DEP_TRACK
# ------------
AC_DEFUN([AM_DEP_TRACK],
-[AC_ARG_ENABLE(dependency-tracking,
-[ --disable-dependency-tracking speeds up one-time build
- --enable-dependency-tracking do not reject slow dependency extractors])
+[AC_ARG_ENABLE([dependency-tracking], [dnl
+AS_HELP_STRING(
+ [--enable-dependency-tracking],
+ [do not reject slow dependency extractors])
+AS_HELP_STRING(
+ [--disable-dependency-tracking],
+ [speeds up one-time build])])
if test "x$enable_dependency_tracking" != xno; then
am_depcomp="$ac_aux_dir/depcomp"
AMDEPBACKSLASH='\'
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 4
+# serial 5
AC_DEFUN([AM_WITH_DMALLOC],
[AC_MSG_CHECKING([if malloc debugging is wanted])
-AC_ARG_WITH(dmalloc,
-[ --with-dmalloc use dmalloc, as in http://www.dmalloc.com],
+AC_ARG_WITH([dmalloc],
+[AS_HELP_STRING([--with-dmalloc],
+ [use dmalloc, as in http://www.dmalloc.com])],
[if test "$withval" = yes; then
AC_MSG_RESULT(yes)
AC_DEFINE(WITH_DMALLOC,1,
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 10
+# serial 11
# AM_PATH_LISPDIR
# ---------------
AC_ARG_VAR([EMACS], [the Emacs editor command])
AC_ARG_VAR([EMACSLOADPATH], [the Emacs library search path])
AC_ARG_WITH([lispdir],
- [ --with-lispdir override the default lisp directory],
+ [AS_HELP_STRING([--with-lispdir],
+ [override the default lisp directory])],
[ lispdir="$withval"
AC_MSG_CHECKING([where .elc files should go])
AC_MSG_RESULT([$lispdir])],
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 5
+# serial 6
# AM_MAINTAINER_MODE([DEFAULT-MODE])
# ----------------------------------
AC_MSG_CHECKING([whether to am_maintainer_other maintainer-specific portions of Makefiles])
dnl maintainer-mode's default is 'disable' unless 'enable' is passed
AC_ARG_ENABLE([maintainer-mode],
-[ --][am_maintainer_other][-maintainer-mode am_maintainer_other make rules and dependencies not useful
- (and sometimes confusing) to the casual installer],
- [USE_MAINTAINER_MODE=$enableval],
- [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
+ [AS_HELP_STRING([--]am_maintainer_other[-maintainer-mode],
+ am_maintainer_other[ make rules and dependencies not useful
+ (and sometimes confusing) to the casual installer])],
+ [USE_MAINTAINER_MODE=$enableval],
+ [USE_MAINTAINER_MODE=]m4_if(am_maintainer_other, [enable], [no], [yes]))
AC_MSG_RESULT([$USE_MAINTAINER_MODE])
AM_CONDITIONAL([MAINTAINER_MODE], [test $USE_MAINTAINER_MODE = yes])
MAINT=$MAINTAINER_MODE_TRUE
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 7
# AM_ENABLE_MULTILIB([MAKEFILE], [REL-TO-TOP-SRCDIR])
# ---------------------------------------------------
# Add --enable-multilib to configure.
AC_DEFUN([AM_ENABLE_MULTILIB],
[# Default to --enable-multilib
-AC_ARG_ENABLE(multilib,
-[ --enable-multilib build many library versions (default)],
+AC_ARG_ENABLE([multilib],
+[AS_HELP_STRING(
+ [--enable-multilib],
+ [build many library versions (default)])],
[case "$enableval" in
yes) multilib=yes ;;
no) multilib=no ;;
## --------------------------------- ## -*- Autoconf -*-
## Check if --with-regex was given. ##
## --------------------------------- ##
-# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
+# 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 7
+# serial 8
# AM_WITH_REGEX
# -------------
#
+# THIS MACRO IS OBSOLETE now, since rx doesn't seem to be maintained,
+# while regex is. This macro should be removed on 2013-01-01.
+#
# The idea is to distribute rx.[hc] and regex.[hc] together, for a
# while. The WITH_REGEX symbol is used to decide which of regex.h or
# rx.h should be included in the application. If `./configure
# package will use the system's rx which, on Linux at least, will
# result in a smaller executable file.
#
-# FIXME: This macro seems quite obsolete now since rx doesn't seem to
-# be maintained, while regex is.
AC_DEFUN([AM_WITH_REGEX],
[AC_PREREQ(2.50)dnl
+m4_warn([obsolete], [$0 is obsolete, since `rx' is unmantained now])dnl
AC_LIBSOURCES([rx.h, rx.c, regex.c, regex.h])dnl
AC_MSG_CHECKING([which of GNU rx or gawk's regex is wanted])
AC_ARG_WITH([regex],
# Check to make sure that the build environment is sane. -*- Autoconf -*-
-# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009
+# Copyright (C) 1996, 1997, 2000, 2001, 2003, 2005, 2008, 2009, 2010
# Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 6
+# serial 7
# AM_SANITY_CHECK
# ---------------
# (eg FreeBSD returns the mod time of the symlink's containing
# directory).
if (
+ am_has_slept=no
for am_try in 1 2; do
- echo timestamp > conftest.file
+ echo "timestamp, slept: $am_has_slept" > conftest.file
set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null`
if test "$[*]" = "X"; then
# -L didn't work.
set X `ls -t "$srcdir/configure" conftest.file`
fi
- rm -f conftest.file
if test "$[*]" != "X $srcdir/configure conftest.file" \
&& test "$[*]" != "X conftest.file $srcdir/configure"; then
fi
# Just in case.
sleep 1
+ am_has_slept=yes
done
test "$[2]" = conftest.file
)
AC_MSG_ERROR([newly created file is older than distributed files!
Check your system clock])
fi
-AC_MSG_RESULT(yes)])
+AC_MSG_RESULT(yes)
+# If we didn't sleep, we still need to ensure time stamps of config.status and
+# generated files are strictly newer.
+am_sleep_pid=
+if grep 'slept: no' conftest.file >/dev/null 2>&1; then
+ ( sleep 1 ) &
+ am_sleep_pid=$!
+fi
+AC_CONFIG_COMMANDS_PRE(
+ [AC_MSG_CHECKING([that generated files are newer than configure])
+ if test -n "$am_sleep_pid"; then
+ wait $am_sleep_pid
+ fi
+ AC_MSG_RESULT([done])])
+rm -f conftest.file
+])
## -*- Autoconf -*-
-# Copyright (C) 2009 Free Software Foundation, Inc.
+# Copyright (C) 2009, 2010 Free Software Foundation, Inc.
#
# This file is free software; the Free Software Foundation
# gives unlimited permission to copy and/or distribute it,
# with or without modifications, as long as this notice is preserved.
-# serial 1
+# serial 2
# AM_SILENT_RULES([DEFAULT])
# --------------------------
# Enable less verbose build rules; with the default set to DEFAULT
# (`yes' being less verbose, `no' or empty being verbose).
AC_DEFUN([AM_SILENT_RULES],
-[AC_ARG_ENABLE([silent-rules],
-[ --enable-silent-rules less verbose build output (undo: `make V=1')
- --disable-silent-rules verbose build output (undo: `make V=0')])
-case $enable_silent_rules in
-yes) AM_DEFAULT_VERBOSITY=0;;
-no) AM_DEFAULT_VERBOSITY=1;;
-*) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
+[AC_ARG_ENABLE([silent-rules], [dnl
+AS_HELP_STRING(
+ [--enable-silent-rules],
+ [less verbose build output (undo: `make V=1')])
+AS_HELP_STRING(
+ [--disable-silent-rules],
+ [verbose build output (undo: `make V=0')])dnl
+])
+case $enable_silent_rules in @%:@ (((
+ yes) AM_DEFAULT_VERBOSITY=0;;
+ no) AM_DEFAULT_VERBOSITY=1;;
+ *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);;
esac
AC_SUBST([AM_DEFAULT_VERBOSITY])dnl
AM_BACKSLASH='\'
aclocal-*
automake-*
-defs
+defs-static
+instspc-tests.am
parallel-tests.am
*.dir
*.log
*.log-t
*-p.test
+instspc-*-build.test
+instspc-*-install.test
+*.test-t
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+MAINTAINERCLEANFILES =
+EXTRA_DIST = ChangeLog-old
+
XFAIL_TESTS = \
all.test \
auxdir2.test \
cond17.test \
gcj6.test \
+override-conditional-2.test \
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)($(am__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 $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || 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 " . \"\$$testsrcdir/$$input\""; \
+ echo 'fi'; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+MAINTAINERCLEANFILES += $(parallel_tests)
+EXTRA_DIST += 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 $@
+include $(srcdir)/instspc-tests.am
+
+$(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
+ $(AM_V_GEN)($(am__cd) $(srcdir) \
+ && $(SHELL) ./instspc-tests.sh --generate-makefile) >$@
+
+$(instspc_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN) :; \
+ base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; \
+ name=`expr x"$$base" : x'\(.*\)-'`; \
+ action=`expr x"$$base" : x'.*-\(.*\)'`; \
+ { \
+ echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "instspc_test_name='$$name'"; \
+ echo "instspc_action='test-$$action'"; \
+ echo ". \$$testsrcdir/instspc-tests.sh"; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+# All instspc*.test tests work by sourcing the instspc-tests.sh script.
+$(instspc_tests:.test=.log): instspc-tests.sh
+
+MAINTAINERCLEANFILES += $(instspc_tests)
+EXTRA_DIST += instspc-tests.sh
+XFAIL_TESTS += $(instspc_xfail_tests)
-MAINTAINERCLEANFILES = $(parallel_tests)
TESTS = \
-aclibobj.test \
aclocal.test \
aclocal3.test \
aclocal4.test \
acloca20.test \
acloca21.test \
acloca22.test \
+acloca23.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
ansi8.test \
ansi9.test \
ansi10.test \
+ar-lib.test \
ar.test \
ar2.test \
asm.test \
auxdir2.test \
auxdir3.test \
auxdir4.test \
+auxdir5.test \
+auxdir6.test \
+auxdir7.test \
+auxdir8.test \
+auxdir9.test \
+backcompat.test \
+backcompat2.test \
+backcompat3.test \
+backcompat4.test \
+backcompat5.test \
+backcompat6.test \
backsl.test \
backsl2.test \
backsl3.test \
badprog.test \
block.test \
bsource.test \
+candist.test \
canon.test \
canon2.test \
canon3.test \
canon4.test \
canon5.test \
+canon6.test \
+canon7.test \
+canon8.test \
canon-name.test \
ccnoco.test \
ccnoco2.test \
check9.test \
check10.test \
check11.test \
+check12.test \
checkall.test \
clean.test \
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
commen11.test \
compile.test \
compile2.test \
+compile3.test \
+compile4.test \
+compile5.test \
+compile6.test \
compile_f90_c_cxx.test \
compile_f_c_cxx.test \
+cond-basic.test \
cond.test \
cond2.test \
cond3.test \
cond43.test \
cond44.test \
cond45.test \
+cond46.test \
condd.test \
condhook.test \
condhook2.test \
confvar.test \
confvar2.test \
copy.test \
-ctarget1.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
cxx.test \
cxx2.test \
cxxansi.test \
exsource.test \
ext.test \
ext2.test \
+ext3.test \
extra.test \
extra2.test \
extra3.test \
extra6.test \
extra7.test \
extra8.test \
+extra9.test \
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
f90only.test \
flavor.test \
flibs.test \
instmany.test \
instmany-mans.test \
instmany-python.test \
-instspc.test \
+$(instspc_tests) \
interp.test \
interp2.test \
java.test \
lex3.test \
lex4.test \
lex5.test \
+lexcpp.test \
+lexvpath.test \
lflags.test \
lflags2.test \
libexec.test \
+libobj-basic.test \
libobj2.test \
libobj3.test \
libobj4.test \
libobj7.test \
libobj8.test \
libobj10.test \
-libobj11.test \
libobj12.test \
libobj13.test \
libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
library.test \
library2.test \
library3.test \
link_fccxx.test \
link_fcxx.test \
link_f_only.test \
+link_override.test \
lisp2.test \
lisp3.test \
lisp4.test \
ltlibobjs.test \
ltlibsrc.test \
ltorder.test \
+lzip.test \
lzma.test \
maintclean.test \
make.test \
mmode.test \
mmodely.test \
multlib.test \
+no-outdir-option.test \
nobase.test \
nobase-libtool.test \
nobase-python.test \
objc.test \
objc2.test \
obsolete.test \
+oldvars.test \
order.test \
-outdir.test \
output.test \
output2.test \
output3.test \
output12.test \
output13.test \
output-order.test \
-overrid.test \
+override-conditional-1.test \
+override-conditional-2.test \
+override-html.test \
+override-suggest-local.test \
parallel-am.test \
parallel-am2.test \
parallel-am3.test \
pluseq9.test \
pluseq10.test \
pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
postproc.test \
ppf77.test \
pr2.test \
recurs.test \
recurs2.test \
remake.test \
+remake1a.test \
remake2.test \
remake3.test \
+remake3a.test \
remake4.test \
remake5.test \
remake6.test \
remake7.test \
+remake8a.test \
+remake8b.test \
+remake9a.test \
+remake9b.test \
+remake9c.test \
+remake9d.test \
+remake10a.test \
+remake10b.test \
+remake10c.test \
+remake11.test \
+remake12.test \
regex.test \
+regex-obsolete.test \
req.test \
reqd.test \
reqd2.test \
+repeated-options.test \
rulepat.test \
sanity.test \
scripts.test \
silent2.test \
silent3.test \
silent4.test \
-silent5.test \
silent6.test \
silent7.test \
+silent8.test \
silent9.test \
silentcxx.test \
silentf77.test \
silentf90.test \
-silentlex.test \
-silentyacc.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
sinclude.test \
srcsub.test \
srcsub2.test \
stdlib.test \
stdlib2.test \
strip.test \
+strip2.test \
+strip3.test \
subdir.test \
subdir2.test \
subdir3.test \
subst2.test \
subst3.test \
subst4.test \
+subst5.test \
substref.test \
substre2.test \
substtarg.test \
symlink2.test \
syntax.test \
tags.test \
+tags2.test \
tagsub.test \
tar.test \
tar2.test \
vars.test \
vars3.test \
vartar.test \
+vartypos.test \
+vartypo2.test \
version.test \
version2.test \
version3.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
+yacc-basic.test \
yacc.test \
yacc2.test \
yacc3.test \
yflags2.test \
$(parallel_tests)
-EXTRA_DIST = ChangeLog-old gen-parallel-tests $(TESTS)
+EXTRA_DIST += $(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
-# 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,
POST_UNINSTALL = :
build_triplet = @build@
DIST_COMMON = README $(srcdir)/Makefile.am $(srcdir)/Makefile.in \
- $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs.in \
+ $(srcdir)/aclocal.in $(srcdir)/automake.in $(srcdir)/defs \
+ $(srcdir)/defs-static.in $(srcdir)/instspc-tests.am \
$(srcdir)/parallel-tests.am
subdir = tests
ACLOCAL_M4 = $(top_srcdir)/aclocal.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 =
+CONFIG_CLEAN_FILES = defs-static aclocal-${APIVERSION} \
+ automake-${APIVERSION}
+CONFIG_CLEAN_VPATH_FILES = defs
+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,
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
ACLOCAL = @ACLOCAL@
AMTAR = @AMTAR@
+AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
APIVERSION = @APIVERSION@
AUTOCONF = @AUTOCONF@
AUTOHEADER = @AUTOHEADER@
top_build_prefix = @top_build_prefix@
top_builddir = @top_builddir@
top_srcdir = @top_srcdir@
-XFAIL_TESTS = \
-all.test \
-auxdir2.test \
-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
-
-MAINTAINERCLEANFILES = $(parallel_tests)
+MAINTAINERCLEANFILES = $(parallel_tests) $(instspc_tests)
+EXTRA_DIST = ChangeLog-old gen-parallel-tests instspc-tests.sh \
+ $(TESTS)
+XFAIL_TESTS = all.test auxdir2.test cond17.test gcj6.test \
+ override-conditional-2.test txinfo5.test \
+ $(instspc_xfail_tests)
+parallel_tests = backcompat5-p.test check-p.test check10-p.test \
+ check11-p.test check12-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 posixsubst-tests-p.test pr401-p.test \
+ pr401b-p.test pr401c-p.test
+instspc_tests = instspc-squote-build.test instspc-squote-install.test \
+ instspc-dquote-build.test instspc-dquote-install.test \
+ instspc-bquote-build.test instspc-bquote-install.test \
+ instspc-sharp-build.test instspc-sharp-install.test \
+ instspc-dollar-build.test instspc-dollar-install.test \
+ instspc-bang-build.test instspc-bang-install.test \
+ instspc-bslash-build.test instspc-bslash-install.test \
+ instspc-ampersand-build.test instspc-ampersand-install.test \
+ instspc-percent-build.test instspc-percent-install.test \
+ instspc-leftpar-build.test instspc-leftpar-install.test \
+ instspc-rightpar-build.test instspc-rightpar-install.test \
+ instspc-pipe-build.test instspc-pipe-install.test \
+ instspc-caret-build.test instspc-caret-install.test \
+ instspc-tilde-build.test instspc-tilde-install.test \
+ instspc-qmark-build.test instspc-qmark-install.test \
+ instspc-star-build.test instspc-star-install.test \
+ instspc-plus-build.test instspc-plus-install.test \
+ instspc-minus-build.test instspc-minus-install.test \
+ instspc-comma-build.test instspc-comma-install.test \
+ instspc-colon-build.test instspc-colon-install.test \
+ instspc-semicol-build.test instspc-semicol-install.test \
+ instspc-equal-build.test instspc-equal-install.test \
+ instspc-less-build.test instspc-less-install.test \
+ instspc-more-build.test instspc-more-install.test \
+ instspc-at-build.test instspc-at-install.test \
+ instspc-lqbrack-build.test instspc-lqbrack-install.test \
+ instspc-rqbrack-build.test instspc-rqbrack-install.test \
+ instspc-lcbrack-build.test instspc-lcbrack-install.test \
+ instspc-rcbrack-build.test instspc-rcbrack-install.test \
+ instspc-space-build.test instspc-space-install.test \
+ instspc-tab-build.test instspc-tab-install.test \
+ instspc-linefeed-build.test instspc-linefeed-install.test \
+ instspc-backspace-build.test instspc-backspace-install.test \
+ instspc-formfeed-build.test instspc-formfeed-install.test \
+ instspc-carriageret-build.test \
+ instspc-carriageret-install.test \
+ instspc-quadrigraph0-build.test \
+ instspc-quadrigraph0-install.test \
+ instspc-quadrigraph1-build.test \
+ instspc-quadrigraph1-install.test \
+ instspc-quadrigraph2-build.test \
+ instspc-quadrigraph2-install.test \
+ instspc-quadrigraph3-build.test \
+ instspc-quadrigraph3-install.test \
+ instspc-quadrigraph4-build.test \
+ instspc-quadrigraph4-install.test instspc-a_b-build.test \
+ instspc-a_b-install.test instspc-a__b-build.test \
+ instspc-a__b-install.test instspc-a_lf_b-build.test \
+ instspc-a_lf_b-install.test instspc-dotdotdot-build.test \
+ instspc-dotdotdot-install.test instspc-dosdrive-build.test \
+ instspc-dosdrive-install.test instspc-miscglob1-build.test \
+ instspc-miscglob1-install.test instspc-miscglob2-build.test \
+ instspc-miscglob2-install.test
+instspc_xfail_tests = instspc-squote-build.test \
+ instspc-dquote-build.test instspc-bquote-build.test \
+ instspc-sharp-build.test instspc-dollar-build.test \
+ instspc-bslash-build.test instspc-ampersand-build.test \
+ instspc-linefeed-build.test instspc-quadrigraph0-build.test \
+ instspc-a_lf_b-build.test instspc-squote-install.test \
+ instspc-dquote-install.test instspc-bquote-install.test \
+ instspc-sharp-install.test instspc-dollar-install.test \
+ instspc-linefeed-install.test instspc-a_lf_b-install.test
TESTS = \
-aclibobj.test \
aclocal.test \
aclocal3.test \
aclocal4.test \
acloca20.test \
acloca21.test \
acloca22.test \
+acloca23.test \
acoutnoq.test \
acoutpt.test \
acoutpt2.test \
ansi8.test \
ansi9.test \
ansi10.test \
+ar-lib.test \
ar.test \
ar2.test \
asm.test \
auxdir2.test \
auxdir3.test \
auxdir4.test \
+auxdir5.test \
+auxdir6.test \
+auxdir7.test \
+auxdir8.test \
+auxdir9.test \
+backcompat.test \
+backcompat2.test \
+backcompat3.test \
+backcompat4.test \
+backcompat5.test \
+backcompat6.test \
backsl.test \
backsl2.test \
backsl3.test \
badprog.test \
block.test \
bsource.test \
+candist.test \
canon.test \
canon2.test \
canon3.test \
canon4.test \
canon5.test \
+canon6.test \
+canon7.test \
+canon8.test \
canon-name.test \
ccnoco.test \
ccnoco2.test \
check9.test \
check10.test \
check11.test \
+check12.test \
checkall.test \
clean.test \
clean2.test \
colneq.test \
colneq2.test \
+colneq3.test \
colon.test \
colon2.test \
colon3.test \
commen11.test \
compile.test \
compile2.test \
+compile3.test \
+compile4.test \
+compile5.test \
+compile6.test \
compile_f90_c_cxx.test \
compile_f_c_cxx.test \
+cond-basic.test \
cond.test \
cond2.test \
cond3.test \
cond43.test \
cond44.test \
cond45.test \
+cond46.test \
condd.test \
condhook.test \
condhook2.test \
confvar.test \
confvar2.test \
copy.test \
-ctarget1.test \
+cscope.test \
+cscope2.test \
+cscope3.test \
cxx.test \
cxx2.test \
cxxansi.test \
exsource.test \
ext.test \
ext2.test \
+ext3.test \
extra.test \
extra2.test \
extra3.test \
extra6.test \
extra7.test \
extra8.test \
+extra9.test \
extra10.test \
extra11.test \
extra12.test \
+extradep.test \
+extradep2.test \
f90only.test \
flavor.test \
flibs.test \
instmany.test \
instmany-mans.test \
instmany-python.test \
-instspc.test \
+$(instspc_tests) \
interp.test \
interp2.test \
java.test \
lex3.test \
lex4.test \
lex5.test \
+lexcpp.test \
+lexvpath.test \
lflags.test \
lflags2.test \
libexec.test \
+libobj-basic.test \
libobj2.test \
libobj3.test \
libobj4.test \
libobj7.test \
libobj8.test \
libobj10.test \
-libobj11.test \
libobj12.test \
libobj13.test \
libobj14.test \
+libobj15a.test \
+libobj15b.test \
+libobj15c.test \
+libobj16a.test \
+libobj16b.test \
+libobj17.test \
+libobj18.test \
+libobj19.test \
+libobj20a.test \
+libobj20b.test \
+libobj20c.test \
library.test \
library2.test \
library3.test \
link_fccxx.test \
link_fcxx.test \
link_f_only.test \
+link_override.test \
lisp2.test \
lisp3.test \
lisp4.test \
ltlibobjs.test \
ltlibsrc.test \
ltorder.test \
+lzip.test \
lzma.test \
maintclean.test \
make.test \
mmode.test \
mmodely.test \
multlib.test \
+no-outdir-option.test \
nobase.test \
nobase-libtool.test \
nobase-python.test \
objc.test \
objc2.test \
obsolete.test \
+oldvars.test \
order.test \
-outdir.test \
output.test \
output2.test \
output3.test \
output12.test \
output13.test \
output-order.test \
-overrid.test \
+override-conditional-1.test \
+override-conditional-2.test \
+override-html.test \
+override-suggest-local.test \
parallel-am.test \
parallel-am2.test \
parallel-am3.test \
pluseq9.test \
pluseq10.test \
pluseq11.test \
+posixsubst-data.test \
+posixsubst-extradist.test \
+posixsubst-ldadd.test \
+posixsubst-libraries.test \
+posixsubst-ltlibraries.test \
+posixsubst-programs.test \
+posixsubst-scripts.test \
+posixsubst-sources.test \
+posixsubst-tests.test \
postproc.test \
ppf77.test \
pr2.test \
recurs.test \
recurs2.test \
remake.test \
+remake1a.test \
remake2.test \
remake3.test \
+remake3a.test \
remake4.test \
remake5.test \
remake6.test \
remake7.test \
+remake8a.test \
+remake8b.test \
+remake9a.test \
+remake9b.test \
+remake9c.test \
+remake9d.test \
+remake10a.test \
+remake10b.test \
+remake10c.test \
+remake11.test \
+remake12.test \
regex.test \
+regex-obsolete.test \
req.test \
reqd.test \
reqd2.test \
+repeated-options.test \
rulepat.test \
sanity.test \
scripts.test \
silent2.test \
silent3.test \
silent4.test \
-silent5.test \
silent6.test \
silent7.test \
+silent8.test \
silent9.test \
silentcxx.test \
silentf77.test \
silentf90.test \
-silentlex.test \
-silentyacc.test \
+silent-many-gcc.test \
+silent-many-generic.test \
+silent-lex-gcc.test \
+silent-lex-generic.test \
+silent-yacc-gcc.test \
+silent-yacc-generic.test \
sinclude.test \
srcsub.test \
srcsub2.test \
stdlib.test \
stdlib2.test \
strip.test \
+strip2.test \
+strip3.test \
subdir.test \
subdir2.test \
subdir3.test \
subst2.test \
subst3.test \
subst4.test \
+subst5.test \
substref.test \
substre2.test \
substtarg.test \
symlink2.test \
syntax.test \
tags.test \
+tags2.test \
tagsub.test \
tar.test \
tar2.test \
vars.test \
vars3.test \
vartar.test \
+vartypos.test \
+vartypo2.test \
version.test \
version2.test \
version3.test \
werror.test \
werror2.test \
werror3.test \
+werror4.test \
whoami.test \
xsource.test \
xz.test \
+yacc-basic.test \
yacc.test \
yacc2.test \
yacc3.test \
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:
.SUFFIXES: .html .log .test
-$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am $(am__configure_deps)
+$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/parallel-tests.am $(srcdir)/instspc-tests.am $(am__configure_deps)
@for dep in $?; do \
case '$(am__configure_deps)' in \
*$$dep*) \
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
$(am__aclocal_m4_deps):
-defs: $(top_builddir)/config.status $(srcdir)/defs.in
+defs-static: $(top_builddir)/config.status $(srcdir)/defs-static.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
aclocal-${APIVERSION}: $(top_builddir)/config.status $(srcdir)/aclocal.in
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@
ctags: CTAGS
CTAGS:
+cscope cscopelist:
+
$(TEST_SUITE_LOG): $(TEST_LOGS)
@$(am__sh_e_setup); \
fi; \
done
check-am: all-am
- $(MAKE) $(AM_MAKEFLAGS) $(check_SCRIPTS)
$(MAKE) $(AM_MAKEFLAGS) check-TESTS
check: check-am
all-am: Makefile
installcheck: installcheck-am
install-strip:
- $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
- install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
- `test -z '$(STRIP)' || \
- echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
+ if test -z '$(STRIP)'; then \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ install; \
+ else \
+ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
+ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
+ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \
+ fi
mostlyclean-generic:
-test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS)
-test -z "$(TEST_LOGS_TMP)" || rm -f $(TEST_LOGS_TMP)
maintainer-clean-generic mostlyclean mostlyclean-generic pdf \
pdf-am ps ps-am recheck recheck-html uninstall uninstall-am
+backcompat5-p.log: backcompat5.test
+check-p.log: check.test
+check10-p.log: check10.test
+check11-p.log: check11.test
+check12-p.log: check12.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
+posixsubst-tests-p.log: posixsubst-tests.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)($(am__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 $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || 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 " . \"\$$testsrcdir/$$input\""; \
+ echo 'fi'; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+$(srcdir)/instspc-tests.am: instspc-tests.sh Makefile.am
+ $(AM_V_GEN)($(am__cd) $(srcdir) \
+ && $(SHELL) ./instspc-tests.sh --generate-makefile) >$@
-$(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 $@
+$(instspc_tests): Makefile.am
+ $(AM_V_at)rm -f $@ $@-t
+ $(AM_V_GEN) :; \
+ base=`expr 'x/$@' : 'x.*/instspc-\(.*\)\.test$$'`; \
+ name=`expr x"$$base" : x'\(.*\)-'`; \
+ action=`expr x"$$base" : x'.*-\(.*\)'`; \
+ { \
+ echo '#!/bin/sh'; \
+ echo '# DO NOT EDIT! GENERATED AUTOMATICALLY!'; \
+ echo; \
+ echo '# Ensure proper definition of $$testsrcdir.'; \
+ echo '. ./defs-static || exit 99'; \
+ echo 'test -n "$$testsrcdir" || exit 99 # sanity check'; \
+ echo; \
+ echo "instspc_test_name='$$name'"; \
+ echo "instspc_action='test-$$action'"; \
+ echo ". \$$testsrcdir/instspc-tests.sh"; \
+ } > $@-t
+ $(AM_V_at)chmod a+rx $@-t && mv -f $@-t $@
+
+# All instspc*.test tests work by sourcing the instspc-tests.sh script.
+$(instspc_tests:.test=.log): instspc-tests.sh
+
+# 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
==============
-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
--------------
#! /bin/sh
-# Copyright (C) 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2005, 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 ! -f m4_1/macro.m4
test ! -f m4_2/macro.m4
+$sleep
$ACLOCAL -I m4_2 -I m4_1
$AUTOCONF
./configure
test ! -f m4_1/macro.m4
test ! -f m4_2/macro.m4
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I m4_1 -I m4_2'
$ACLOCAL --install
$AUTOCONF
test ! -f m4_2/macro.m4
cp aclocal.m4 copy.m4
+$sleep
echo '#GREPME' >>dirlist-test/macro.m4
$ACLOCAL --install
$AUTOCONF
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
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'
grep macro11 foo
grep macro21 foo
+$sleep
rm -f foo
$ACLOCAL --install
$AUTOCONF
grep macro12 foo
grep macro23 foo
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1 -I 2 -I 3'
rm -f foo
$ACLOCAL --install --dry-run
grep macro12 foo
grep macro23 foo
+$sleep
rm -f foo
$ACLOCAL --install
$AUTOCONF
grep macro14 foo
grep macro23 foo
+$sleep
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 'macro.*AM_MACRO2.*not found' stderr
+$sleep
ACLOCAL_TESTSUITE_FLAGS='-I 4 -I 1'
rm -f foo
$ACLOCAL --install
grep macro21 foo
+$sleep
mkdir dirlist-test
cat >dirlist-test/m1.m4 <<EOF
#serial 456
test ! -f 4/m1.m4
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
+
:
--- /dev/null
+#! /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
+
+:
$ACLOCAL --versi
-test "`$ACLOCAL --print-ac-dir`" = "$testaclocaldir"
+test x"`$ACLOCAL --print-ac-dir`" = x"$top_testsrcdir/m4"
:
#! /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
grep macro11 foo
grep macro21 foo
+$sleep
+
$ACLOCAL -I m4_2 -I m4_1
$AUTOCONF
./configure
: > ansi2knr.1
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test1
-
-$AUTOCONF
./configure
+
$MAKE test1
$MAKE test2
--- /dev/null
+#! /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 `ar-lib' wraps the Microsoft Library Manager (lib) correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+set -e
+
+cp "$top_testsrcdir/lib/ar-lib" .
+
+# Use a dummy lib, since lib isn't readily available on all systems.
+cat >lib <<'END'
+#! /bin/sh
+if test x"$2" = x-LIST && test x"$3" = xfake.lib; then
+ echo fake.obj
+elif test x"$2" = x-LIST && test x"$3" = xfake2.lib; then
+ printf "%s\n" "dir\\fake2.obj"
+else
+ printf "%s\n" "lib $*"
+fi
+END
+
+chmod +x ./lib
+
+# Check if ar-lib can create an archive with "cr"
+opts=`./ar-lib ./lib cr foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.obj"
+
+# Check if ar-lib can update an existing archive with "r"
+touch foo.lib
+opts=`./ar-lib ./lib r foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib foo.obj"
+
+# Check if ar-lib passes on @FILE with "r"
+opts=`./ar-lib ./lib r foo.lib @list`
+test x"$opts" = x"lib -NOLOGO -OUT:foo.lib foo.lib @list"
+
+# Check if ar-lib can delete a member from an archive with "d"
+opts=`./ar-lib ./lib d foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
+
+# Check if ar-lib can delete members in an @FILE
+echo foo.obj > foolist
+opts=`./ar-lib ./lib d foo.lib @foolist`
+test x"$opts" = x"lib -NOLOGO -REMOVE:foo.obj foo.lib"
+
+# Check if ar-lib can list archive members with "t"
+opts=`./ar-lib ./lib t foo.lib`
+test x"$opts" = x"lib -NOLOGO -LIST foo.lib"
+
+# Check if ar-lib can extract archive members with "x"
+touch fake.lib
+opts=`./ar-lib ./lib x fake.lib`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:fake.obj fake.lib"
+
+# Check if ar-lib can extract specified archive members with "x"
+opts=`./ar-lib ./lib x foo.lib foo.obj`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib can extract members in an @FILE
+opts=`./ar-lib ./lib x foo.lib @foolist`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib passes -lib and -LTCG through to the wrappee
+opts=`./ar-lib ./lib -lib -LTCG x foo.lib foo.obj`
+test x"$opts" = x"lib -lib -LTCG -NOLOGO -EXTRACT:foo.obj foo.lib"
+
+# Check if ar-lib can extract backslashed members
+touch fake2.lib
+opts=`./ar-lib ./lib x fake2.lib`
+test x"$opts" = x"lib -NOLOGO -EXTRACT:dir\\fake2.obj fake2.lib"
+
+:
# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-. ./defs
+. ./defs || Exit 1
set -e
# Check that autoheaders works, despite our AC_CONFIG_HEADERS hack.
-. ./defs
+. ./defs || Exit 1
set -e
# Check rebuild rules for autoheader.
required=GNUmake
-. ./defs
+. ./defs || Exit 1
set -e
# (This should also work without GNU Make.)
required=gcc
-. ./defs
+. ./defs || Exit 1
set -e
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007 Free Software Foundation, Inc.
+# Copyright (C) 1996, 2001, 2002, 2003, 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
. ./defs || Exit 1
+set -e
+
# The "./." is here so we don't have to mess with subdirs.
-cat > configure.in << 'END'
-AC_INIT([auxdir], [1.0])
-AC_CONFIG_AUX_DIR(./.)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([./.])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
END
pkgdata_DATA =
END
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep '/\./\./mkinstalldirs' Makefile.in
+
+:
. ./defs || Exit 1
-# The "./." is here so we don't have to mess with subdirs.
-cat > configure.in << 'END'
-AC_INIT([auxdir2], [1.0])
-AC_CONFIG_AUX_DIR($foo)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([\$foo)
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
END
: > Makefile.am
-$ACLOCAL || Exit 1
+$ACLOCAL
+# Both these two invocations are meant.
+# They exercise both code paths concerning auxiliary files.
+$AUTOMAKE -a
$AUTOMAKE
+
+:
set -e
cat >> configure.in << 'END'
-AC_CONFIG_AUX_DIR(.)
+AC_CONFIG_AUX_DIR([.]) dnl this will appear after AM_INIT_AUTOMAKE
END
: > Makefile.am
$ACLOCAL
AUTOMAKE_fails
grep 'AC_CONFIG_AUX_DIR.*AM_INIT_AUTOMAKE' stderr
+
+:
# 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 we diagnose dangerous AC_CONFIG_AUX_DIR names.
+# Make sure we diagnose unportable AC_CONFIG_AUX_DIR names.
. ./defs || Exit 1
set -e
-cat >configure.in <<'END'
-AC_INIT([auxdir4], [1.0])
+cat >configure.in <<END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([aux])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
$ACLOCAL
AUTOMAKE_fails
-grep 'configure.in:2:.*aux.*does not exist' stderr
-grep 'configure.in:2:.*aux.*W32' stderr
+grep '^configure\.in:2:.*aux.*W32' stderr
+
+if mkdir aux; then
+ AUTOMAKE_fails
+ grep '^configure\.in:2:.*aux.*W32' stderr
+fi
+
+:
--- /dev/null
+#! /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 we diagnose non-existent AC_CONFIG_AUX_DIR names.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([nonesuch])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile])
+END
+
+: > Makefile.am
+
+$ACLOCAL
+AUTOMAKE_fails
+grep '^configure\.in:2:.*nonesuch.* not exist' stderr
+
+:
--- /dev/null
+#! /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 AC_CONFIG_AUX_DIR works correctly.
+# This test calls AC_CONFIG_AUX_DIR with an explicit literal argument,
+# thus explicitly making the directory named by that argument the
+# config auxdir.
+# Keep this in sync with sister tests auxdir7.test and auxdir8.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([auxdir])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile subdir/Makefile])
+END
+
+mkdir subdir auxdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > auxdir/mkinstalldirs
+: > auxdir/install-sh
+: > auxdir/missing
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/auxdir/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/auxdir/mkinstalldirs' subdir/Makefile.in
+
+:
--- /dev/null
+#! /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 AC_CONFIG_AUX_DIR works correctly.
+# This test calls AC_CONFIG_AUX_DIR with a `.' argument, thus explicitly
+# making the top-level directory the config auxdir.
+# Keep this in sync with sister tests auxdir6.test and auxdir8.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([.])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([Makefile subdir/Makefile])
+END
+
+mkdir subdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > mkinstalldirs
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/mkinstalldirs' subdir/Makefile.in
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 1996, 2001, 2002, 2003, 2004, 2007 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 AC_CONFIG_AUX_DIR works correctly.
+# This test tries without an explicit call to AC_CONFIG_AUX_DIR;
+# the config auxdir should be implicitly defined to `.' since
+# the install-sh, mkinstalldirs, etc., scripts are in the top-level
+# directory.
+# Keep this in sync with sister tests auxdir6.test and auxdir7.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
+END
+
+mkdir subdir
+
+cat > Makefile.am << 'END'
+pkgdata_DATA =
+END
+
+cp Makefile.am subdir/Makefile.am
+
+: > mkinstalldirs
+
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP '$(top_srcdir)/mkinstalldirs' Makefile.in
+$FGREP '$(top_srcdir)/mkinstalldirs' subdir/Makefile.in
+
+:
--- /dev/null
+#! /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 that, if AC_CONFIG_AUX_DIR is not specified, Automake tries
+# to use `.', `..' and `../..', in precisely that order.
+
+. ./defs || Exit 1
+
+set -e
+
+nil=__no_such_program
+
+unset NONESUCH || :
+
+cat >>configure.in << END
+AM_MISSING_PROG([NONESUCH],[$nil])
+AC_OUTPUT
+END
+
+mkdir d3
+mkdir d3/d2
+mkdir d3/d2/d1
+mkdir d3/d2/d1/d0
+
+echo 'echo %%d3%% $*' > d3/missing
+chmod +x d3/missing
+echo 'echo %%d2%% $*' > d3/d2/missing
+chmod +x d3/d2/missing
+echo 'echo %%d1%% $*' > d3/d2/d1/missing
+chmod +x d3/d2/d1/missing
+echo 'echo %%d0%% $*' > d3/d2/d1/d0/missing
+chmod +x d3/d2/d1/d0/missing
+
+mv configure.in d3/d2/d1/d0/
+
+cd d3/d2/d1/d0
+
+cat > Makefile.am << 'EOF'
+.PHONY: test
+test:
+ $(NONESUCH) >$(out)
+EOF
+
+$ACLOCAL
+$AUTOCONF
+
+# ------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = . #
+# ------------------------------------------- #
+
+: > install-sh
+$AUTOMAKE
+./configure
+out=out0 $MAKE test
+cat out0
+grep "%%d0%%.*$nil" out0
+grep '%%d[123]' out0 && Exit 1
+
+rm -f missing install-sh
+
+# -------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = .. #
+# -------------------------------------------- #
+
+# Automake finds `install-sh' in `.', so it assumes that auxdir is `.';
+# but it won't find `missing' in `.', so it will fail.
+: > install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\./missing.*not found' stderr
+rm -f install-sh
+
+# Now things should work.
+: > ../install-sh
+$AUTOMAKE
+./configure
+out=out1 $MAKE test
+cat out1
+grep "%%d1%%.*$nil" out1
+grep '%%d[023]' out1 && Exit 1
+
+rm -f ../missing ../install-sh
+
+# ----------------------------------------------- #
+: We must end up with AC_CONFIG_AUX_DIR = ../.. #
+# ----------------------------------------------- #
+
+# Automake finds `install-sh' in `.', so it assumes that auxdir is `.';
+# but it won't find `missing' in `.', so it will fail.
+: > install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\./missing.*not found' stderr
+rm -f install-sh
+
+# Automake finds `install-sh' in `..', so it assumes that auxdir is `..';
+# but it won't find `missing' in `.', so it will fail.
+: > ../install-sh
+AUTOMAKE_fails
+grep 'required file.*[^.]\.\./missing.*not found' stderr
+rm -f ../install-sh
+
+# Now things should work.
+: > ../../install-sh
+$AUTOMAKE
+./configure
+out=out2 $MAKE test
+cat out2
+grep "%%d2%%.*$nil" out2
+grep '%%d[013]' out2 && Exit 1
+
+rm -f ../../missing ../../install-sh
+
+# --------------------------------------------------------- #
+: AC_CONFIG_AUX_DIR will not be found: automake must fail #
+# --------------------------------------------------------- #
+
+AUTOMAKE_fails
+grep 'required file.*missing.*not found' stderr
+
+:
--- /dev/null
+#! /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 usage of AM_INIT_AUTOMAKE with two ot three arguments, for
+# backward-compatibility.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am <<'END'
+.PHONY: test display
+
+## Might be useful for debugging.
+display:
+ ## The following should be substituted by AM_INIT_AUTOMAKE.
+ @echo PACKAGE = $(PACKAGE)
+ @echo VERSION = $(VERSION)
+ ## The following should not be substituted, as we used the
+ ## old form of AC_INIT.
+ @echo PACKAGE_NAME = $(PACKAGE_NAME)
+ @echo PACKAGE_VERSION = $(PACKAGE_VERSION)
+ @echo PACKAGE_TARNAME = $(PACKAGE_TARNAME)
+ @echo PACKAGE_STRING = $(PACKAGE_STRING)
+
+test: display
+ test x'$(PACKAGE)' = x'FooBar'
+ test x'$(VERSION)' = x'0.7.1'
+ test x'$(PACKAGE_NAME)' = x
+ test x'$(PACKAGE_VERSION)' = x
+ test x'$(PACKAGE_TARNAME)' = x
+ test x'$(PACKAGE_STRING)' = x
+END
+
+for ac_init in 'AC_INIT' 'AC_INIT([Makefile.am])'; do
+ for am_extra_args in '' ', []' ', [:]' ', [false]'; do
+ rm -rf autom4te*.cache config* Makefile.in Makefile
+ cat > configure.in <<END
+$ac_init
+AM_INIT_AUTOMAKE([FooBar], [0.7.1]$am_extra_args)
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $ACLOCAL
+ $AUTOCONF
+ $AUTOMAKE
+ ./configure
+ $MAKE test
+ done
+done
+
+:
--- /dev/null
+#! /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/>.
+
+# Backward-compatibility test: check that AM_INIT_AUTOMAKE with two or
+# three arguments does AC_DEFINE the symbols PACKAGE and VERSION iff the
+# third argument is empty or non-existent.
+
+. ./defs || Exit 1
+
+set -e
+
+# A trick to make the test run muuuch faster, by avoiding repeated
+# runs of aclocal (one order of magnitude improvement in speed!).
+echo 'AC_INIT(x,0) AM_INIT_AUTOMAKE' > configure.in
+$ACLOCAL
+rm -rf configure.in autom4te.*
+
+cat > config.h.in <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+for am_arg3 in ':' 'false' '#' ' '; do
+ cat > configure.in <<END
+AC_INIT
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([pkgname], [pkgversion], [$am_arg3])
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $AUTOCONF
+ ./configure
+ cat config.h # might be useful for debugging
+ # The non-empty third argument should prevent PACKAGE and VERSION
+ # from being AC_DEFINE'd.
+ $EGREP 'pkg(name|version)' config.h && Exit 1
+done
+
+for am_extra_args in '' ',' ', []'; do
+ cat > configure.in <<END
+AC_INIT
+AC_CONFIG_HEADERS([config.h])
+AM_INIT_AUTOMAKE([pkgname], [pkgversion]$am_extra_args)
+AC_OUTPUT
+END
+ cat configure.in # might be useful for debugging
+ $AUTOCONF
+ ./configure
+ cat config.h # might be useful for debugging
+ grep '^ *# *define *PACKAGE *"pkgname" *$' config.h
+ grep '^ *# *define *VERSION *"pkgversion" *$' config.h
+done
+
+:
--- /dev/null
+#! /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/>.
+
+# Backward-compatibility test: check what happens when AC_INIT and
+# AM_INIT_AUTOMAKE are both given two or more arguments.
+
+. ./defs || Exit 1
+
+set -e
+
+empty=''
+
+cat > Makefile.am <<'END'
+## Leading `:;' here required to work around bugs of (at least) bash 3.2
+got: Makefile
+ @:; { \
+ echo 'PACKAGE = $(PACKAGE)'; \
+ echo 'VERSION = $(VERSION)'; \
+ echo 'PACKAGE_NAME = $(PACKAGE_NAME)'; \
+ echo 'PACKAGE_VERSION = $(PACKAGE_VERSION)'; \
+ echo 'PACKAGE_STRING = $(PACKAGE_STRING)'; \
+ echo 'PACKAGE_TARNAME = $(PACKAGE_TARNAME)'; \
+ echo 'PACKAGE_BUGREPORT = $(PACKAGE_BUGREPORT)'; \
+ echo 'PACKAGE_URL = $(PACKAGE_URL)'; \
+ } >$@
+END
+
+
+### Run 1 ###
+
+cat > configure.in <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 2 ###
+
+cat > configure.in <<'END'
+dnl# `AC_INIT' in Autoconf <= 2.63 doesn't have an URL argument.
+dnl# Luckily, `AC_AUTOCONF_VERSION' and `m4_version_prereq' are
+dnl# both present in autoconf 2.62, which we require; so that we
+dnl# can at least use the following workaround.
+m4_version_prereq([2.64],
+ [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname],
+ [ac_url])],
+ [AC_INIT([ac_name], [ac_version], [ac_bugreport], [ac_tarname])
+ AC_SUBST([PACKAGE_URL], [ac_url])])
+AM_INIT_AUTOMAKE([am_name], [am_version])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_tarname
+PACKAGE_BUGREPORT = ac_bugreport
+PACKAGE_URL = ac_url
+END
+
+$MAKE got
+
+diff exp got
+
+
+### Run 3 ###
+
+cat > configure.in <<END
+AC_INIT([ac_name], [ac_version])
+AM_INIT_AUTOMAKE([am_name], [am_version], [am_foo_quux])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat configure.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+cat >exp <<END
+PACKAGE = am_name
+VERSION = am_version
+PACKAGE_NAME = ac_name
+PACKAGE_VERSION = ac_version
+PACKAGE_STRING = ac_name ac_version
+PACKAGE_TARNAME = ac_name
+PACKAGE_BUGREPORT = $empty
+PACKAGE_URL = $empty
+END
+
+$MAKE got
+
+diff exp got
+
+$FGREP am_foo_quux Makefile.in Makefile configure config.status && Exit 1
+
+
+### Done ###
+
+:
--- /dev/null
+#! /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/>.
+
+# Backward-compatibility: AC_OUTPUT with arguments.
+
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+: > Makefile.am
+: > zardoz
+: > foo.in
+: > foo1.in
+: > foo2.in
+: > foo3.in
+: > sub/bar.in
+
+ls -l # might be useful for debugging
+
+for args in \
+ 'foo' \
+ 'foo:foo1.in' \
+ 'foo:zardoz' \
+ 'foo:sub/bar.in' \
+ 'foo:foo1.in:foo2.in' \
+ 'foo:zardoz:zardoz' \
+ 'foo:foo1.in:foo2.in:foo3.in' \
+ 'foo:foo1.in:foo2.in:sub/bar.in:foo3.in' \
+; do
+ rm -rf autom4te*.cache aclocal.m4
+ cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([$args])
+AC_OUTPUT
+END
+ cat configure.in # for debugging
+ $ACLOCAL
+ $AUTOMAKE Makefile
+ mv -f Makefile.in Makefile.acf
+ rm -rf autom4te*.cache aclocal.m4
+ cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([$args])
+END
+ cat configure.in # for debugging
+ $ACLOCAL
+ $AUTOMAKE Makefile
+ mv -f Makefile.in Makefile.aco
+ diff Makefile.acf Makefile.aco
+done
+
+:
--- /dev/null
+#! /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/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automke.
+# See also the similar test `backcompat6.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+# Yuck!
+cat > configure.in <<'END'
+dnl. Everything here is *deliberately* underquoted!
+AC_INIT(src/foo.input)
+AM_INIT_AUTOMAKE(foo, 1.0)
+AC_CONFIG_FILES(Makefile:mkfile.in)
+AC_OUTPUT(hacky/Makefile src/Makefile data/Makefile tests/Makefile)
+END
+
+distdir=foo-1.0
+
+cat > mkfile.am <<'END'
+SUBDIRS = src data tests hacky
+installcheck-local:
+ grep DataDataData $(DESTDIR)$(prefix)/data/$(PACKAGE)-$(VERSION)/bar
+END
+
+mkdir hacky src tests data
+
+echo 'This is a dummy package' > README
+
+cat > src/foo.input <<'END'
+#!sh
+echo Zardoz
+END
+
+cat > tests/a.test <<'END'
+#!/bin/sh
+"$srcdir/../src/foo" | grep Zardoz
+END
+chmod a+x tests/a.test
+
+cat > data/bar <<'END'
+line1
+line2
+line3
+END
+
+cat >hacky/Makefile.am <<'END'
+dist-hook:
+ find $(top_distdir) -print
+ chmod a+rx $(top_distdir)/tests/*.test
+END
+
+cat > src/Makefile.am <<'END'
+dist_bin_SCRIPTS = foo
+foo: foo.input
+ sed '1s,^#!.*$$,#!/bin/sh,' $(srcdir)/foo.input >$@
+ chmod a+x $@
+EXTRA_DIST = foo.input
+DISTCLEANFILES = foo
+END
+
+cat > data/Makefile.am <<'END'
+nodist_data_DATA = bar
+datadir = $(prefix)/data/$(PACKAGE)-$(VERSION)
+bar:
+ echo DataDataData >$@
+distclean-local:
+ rm -f bar
+END
+
+cat > tests/Makefile.am <<'END'
+TESTS = a.test
+EXTRA_DIST = $(TESTS)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+ls -l . hacky src data tests # useful for debugging
+test ! -f mkfile
+$MAKE
+$MAKE distdir
+test ! -f $distdir/Makefile.in
+test ! -f $distdir/data/bar
+test -f $distdir/src/foo
+diff README $distdir/README
+diff mkfile.in $distdir/mkfile.in
+diff tests/a.test $distdir/tests/a.test
+diff src/foo.input $distdir/src/foo.input
+
+$MAKE check
+$MAKE distcheck
+
+test -f $distdir.tar.gz
+
+chmod a-x tests/a.test
+# dist-hook should take care of making test files executables
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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/>.
+
+# Backward-compatibility test: try to build and distribute a package
+# using obsoleted forms of AC_INIT, AM_INIT_AUTOMAKE and AC_OUTPUT.
+# This script can also serve as mild stress-testing for Automke.
+# See also the similar test `backcompat5.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+# Anyone doing something like this in a real-life package probably
+# deserves to be killed.
+cat > configure.in <<'END'
+dnl. Everything here is *deliberately* underquoted!
+AC_INIT(quux.c)
+PACKAGE=nonesuch-zardoz
+VERSION=nonesuch-0.1
+AM_INIT_AUTOMAKE($PACKAGE, $VERSION)
+AC_SUBST(one,1)
+two=2
+AC_SUBST(two, $two)
+three=3
+AC_SUBST(three)
+AC_PROG_CC
+AC_CONFIG_HEADERS(config.h:config.hin)
+AC_OUTPUT(Makefile foo.got:foo1.in:foo2.in:foo3.in)
+END
+
+echo @one@ > foo1.in
+echo @two@ > foo2.in
+echo @three@ > foo3.in
+
+cat >config.hin <<'END'
+#undef PACKAGE
+#undef VERSION
+END
+
+cat >> Makefile.am <<'END'
+bin_PROGRAMS = foo
+foo_SOURCES = quux.c
+check-local:
+ test x'$(PACKAGE)' = x'nonesuch-zardoz'
+ test x'$(VERSION)' = x'nonesuch-0.1'
+ ./foo # for debugging
+ ## Do not anchor the regexps w.r.t. the end of line, because on
+ ## MinGW/MSYS, grep may assume LF line endings only, while our
+ ## `foo' program may generate CRLF line endings.
+ ./foo | grep '^PACKAGE = nonesuch-zardoz!'
+ ./foo | echo '^VERSION = nonesuch-0\.1!'
+END
+
+cat > quux.c <<'END'
+#include <config.h>
+#include <stdio.h>
+int main (void)
+{
+ printf("PACKAGE = %s!\nVERSION = %s!\n", PACKAGE, VERSION);
+ return 0;
+}
+END
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+cat >foo.exp <<'END'
+1
+2
+3
+END
+
+diff foo.exp foo.got
+
+$MAKE
+$MAKE check
+
+distdir=nonesuch-zardoz-nonesuch-0.1
+$MAKE distdir
+test -f $distdir/quux.c
+test ! -f $distdir/foo.got
+
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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
set -e
-cat > configure.in << 'END'
-AC_INIT([canon-name], [1.0])
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([./gmakefile ./sub/gmakefile])
AC_OUTPUT
AUTOMAKE_fails
grep 'leading.*\./.*\./gmakefile' stderr
grep 'leading.*\./.*\./sub/gmakefile' stderr
+
+:
#! /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
set -e
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
bin_PROGRAMS = sniff-glue
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2:.*sniff_glue_SOURCES' stderr
+grep 'Makefile\.am:2:.* bad .*variable.*sniff-glue_SOURCES' stderr
+grep 'Makefile\.am:2:.* use .*sniff_glue_SOURCES' stderr
+
+:
$AUTOMAKE
$FGREP 'perm_number.c' Makefile.in && Exit 1
-Exit 0
+
+:
# 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 name canonicalization happens for libraries.
+# Test to make sure name canonicalization happens for static libraries.
+# Keep this in sync with sister test `canon6.test'.
. ./defs || Exit 1
$ACLOCAL
$AUTOMAKE
-grep '^libx-y.*=' Makefile.in && Exit 1
-Exit 0
+grep '^ *libx-y.*=' Makefile.in && Exit 1
+
+:
set -e
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
$ACLOCAL
END
AUTOMAKE_fails
-grep 'Makefile.am:2:.*_foo_SOURCES' stderr
+grep 'Makefile\.am:2:.* bad .*variable.*,foo_SOURCES' stderr
+grep 'Makefile\.am:2:.* use .*_foo_SOURCES' stderr
cat > Makefile.am << 'END'
bin_PROGRAMS = ,foo
END
$AUTOMAKE -Wno-portability
+
+:
--- /dev/null
+#! /bin/sh
+# 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
+# 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 name canonicalization happens for libtool libraries.
+# Keep this in sync with sister test `canon4.test'.
+
+required='libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+END
+
+cat > Makefile.am << 'END'
+noinst_LTLIBRARIES = libx-y.la
+libx_y_la_SOURCES = xy.c
+END
+
+: > ltmain.sh
+
+$ACLOCAL
+$AUTOMAKE -a
+
+grep '^ *libx-y.*=' Makefile.in && Exit 1
+
+:
--- /dev/null
+#! /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/>.
+
+# Stress test on canonicalization.
+
+required='libtool libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB dnl: for static libraries
+AC_PROG_LIBTOOL dnl: for libtool libraries
+AC_OUTPUT
+END
+
+touch ,foo-bar libb.az+baz lib~zardoz,, || Exit 77
+rm -f ,foo-bar libb.az+baz lib~zardoz,,
+
+cat > Makefile.am << 'END'
+noinst_PROGRAMS = dummy_static dummy_dynamic ,foo-bar
+noinst_LIBRARIES = libb.az+baz.a
+noinst_LTLIBRARIES = lib~zardoz,,.la
+
+dummy_static_SOURCES = dummy.c lib.h
+dummy_dynamic_SOURCES = $(dummy_static_SOURCES)
+
+dummy_static_LDADD = $(noinst_LIBRARIES)
+dummy_dynamic_LDADD = $(noinst_LTLIBRARIES)
+
+_foo_bar_SOURCES = foobar.c
+libb_az_baz_a_SOURCES = libs.c
+lib_zardoz___la_SOURCES = libd.c
+
+check-local:
+ ls -l
+ ./,foo-bar
+ ./dummy_static
+ ./dummy_dynamic
+ ./,foo-bar | grep 'Hello, FooBar!'
+ ./dummy_static | grep 'Hello from Static!'
+ ./dummy_dynamic | grep 'Hello from Dynamic!'
+END
+
+cat > foobar.c << 'END'
+#include <stdio.h>
+int main(void)
+{
+ printf("Hello, FooBar!\n");
+ return 0;
+}
+END
+
+cat > dummy.c << 'END'
+#include <stdio.h>
+#include "lib.h"
+int main(void)
+{
+ printf("Hello from %s!\n", dummy_func());
+ return 0;
+}
+END
+
+echo 'const char *dummy_func(void);' > lib.h
+echo 'const char *dummy_func(void) { return "Dynamic"; }' > libd.c
+echo 'const char *dummy_func(void) { return "Static"; }' > libs.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
--- /dev/null
+#! /bin/sh
+# Copyright (C) 1996, 1997, 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
+# 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 that canonicalization does not transliterate the `@' charactrer.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foob@rquux
+END
+
+$ACLOCAL
+$AUTOMAKE
+
+# The first grep is here mostly for debugging.
+grep foob.rquux Makefile.in
+grep foob@rquux Makefile.in
+grep 'foob[^@]rquux' Makefile.in && Exit 1
+
+:
--- /dev/null
+#! /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 dejagnu tests, automake-style tests, and check-local
+# target can coexist.
+
+required=runtest
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS =
+EXTRA_DIST =
+CLEANFILES =
+END
+
+## Simple tests.
+
+cat > a.test << 'END'
+#!/bin/sh
+exit ${A_EXIT_STATUS-0}
+END
+cat > b.test << 'END'
+#!/bin/sh
+exit ${B_EXIT_STATUS-0}
+END
+chmod +x a.test b.test
+
+cat >> Makefile.am << 'END'
+TESTS = a.test b.test
+EXTRA_DIST += $(TESTS)
+END
+
+A_EXIT_STATUS=0; export A_EXIT_STATUS
+B_EXIT_STATUS=0; export B_EXIT_STATUS
+
+## DejaGnu tests.
+
+cat >> Makefile.am << 'END'
+AUTOMAKE_OPTIONS += dejagnu
+DEJATOOL = hammer spanner
+AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer SPANNER=$(srcdir)/spanner
+EXTRA_DIST += hammer.test/hammer.exp
+EXTRA_DIST += spanner.test/spanner.exp
+END
+
+cat > hammer << 'END'
+#! /bin/sh
+echo "Everything looks like a ${NAIL-nail} to me!"
+END
+
+NAIL=nail; export NAIL
+
+cat > spanner << 'END'
+#! /bin/sh
+echo "I'm a right spanner!"
+END
+chmod +x hammer spanner
+
+mkdir hammer.test spanner.test
+
+cat > hammer.test/hammer.exp << 'END'
+set test test_hammer
+spawn $HAMMER
+expect {
+ "Everything looks like a nail to me!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+cat > spanner.test/spanner.exp << 'END'
+set test test_spanner
+spawn $SPANNER
+expect {
+ "I'm a right spanner!" { pass "$test" }
+ default { fail "$test" }
+}
+END
+
+## User-defined extra tests.
+
+cat >> Makefile.am <<'END'
+check-local:
+ case $$CHECKLOCAL_EXIT_STATUS in \
+ 0) echo 'check-local succeded :-)';; \
+ *) echo 'check-local failed :-(';; \
+ esac >local.log
+ exit $$CHECKLOCAL_EXIT_STATUS
+CLEANFILES += local.log
+END
+CHECKLOCAL_EXIT_STATUS=0; export CHECKLOCAL_EXIT_STATUS
+
+## Go with the testcase execution.
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE --add-missing
+
+for vpath in : false; do
+
+ if $vpath; then
+ srcdir=..
+ mkdir build_
+ cd build_
+ else
+ srcdir=.
+ fi
+
+ if test -f config.status; then
+ $MAKE distclean
+ fi
+
+ $srcdir/configure
+
+ $MAKE check
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^PASS: b\.test (exit: 0)' b.log
+ else
+ :
+ fi
+ grep 'check-local succeded :-)' local.log
+
+ cp -f config.status config-status.sav
+
+ $MAKE distclean
+ test ! -r hammer.log
+ test ! -r hammer.sum
+ test ! -r spanner.log
+ test ! -r spanner.sum
+ test ! -r test-suite.log
+ test ! -r a.log
+ test ! -r b.log
+ test ! -r local.log
+
+ mv -f config-status.sav config.status
+ ./config.status
+
+ NAIL=screw $MAKE check && Exit 1
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+
+ B_EXIT_STATUS=1 $MAKE check && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 1)' b.log
+ grep '^FAIL: b\.test (exit: 1)' test-suite.log
+ else :; fi
+
+ CHECKLOCAL_EXIT_STATUS=1 $MAKE check && Exit 1
+ grep 'check-local failed :-(' local.log
+
+ # Do not trust the exit status of `make -k'.
+ NAIL=screw B_EXIT_STATUS=23 CHECKLOCAL_EXIT_STATUS=1 $MAKE -k check || :
+ test -f hammer.log
+ test -f hammer.sum
+ test -f spanner.log
+ test -f spanner.sum
+ grep 'FAIL: test_hammer' hammer.sum
+ grep 'FAIL:' spanner.sum && Exit 1
+ # This checks will be run only by the autogenerated `check12-p.test'.
+ if test x"$parallel_tests" = x"yes"; then
+ cat test-suite.log
+ grep '^PASS: a\.test (exit: 0)' a.log
+ grep '^FAIL: b\.test (exit: 23)' b.log
+ grep '^FAIL: b\.test (exit: 23)' test-suite.log
+ else :; fi
+ grep 'check-local failed :-(' local.log
+
+ cd $srcdir
+
+done
+
+$MAKE distcheck
+
+:
#! /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
cat > Makefile.am << 'END'
ICONS := $(wildcard *.xbm)
-data_DATA = $(ICONS)
END
$ACLOCAL
AUTOMAKE_fails
grep ':=.*not portable' stderr
-echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
-$AUTOMAKE
-grep 'ICONS :=' Makefile.in
+$AUTOMAKE -Wno-portability
+grep '^ICONS *:= *\$(wildcard \*\.xbm) *$' Makefile.in
+
+:
set -e
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
cat > Makefile.am << 'END'
t = a b c
EXTRA_DIST = $(t:=.test)
+.PHONY: test
+test:
+ test x'$(EXTRA_DIST)' = x'a.test b.test c.test'
END
-: > a.test
-: > b.test
-: > c.test
-
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
--- /dev/null
+#! /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 that := definitions work as expected at make time.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+BAR := $(FOO)
+BAZ = $(FOO)
+FOO := foo
+.PHONY: test
+test:
+ test x'$(FOO)' = x'foo'
+ test x'$(BAZ)' = x'foo'
+ test x'$(BAR)' = x
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -Wno-portability
+
+./configure
+$MAKE test
+
+:
AC_OUTPUT
END
-: > Makefile.am
: > foo.hin
+cat > Makefile.am <<'END'
+.PHONY: test
+test: distdir
+ ls -l . $(distdir)
+ test -f foo.h
+ test -f $(distdir)/foo.hin
+END
+
$ACLOCAL
$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+$MAKE test
+$MAKE distcheck
:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure ":" works with files automake generates.
+# See also sister test `colon3.test'.
. ./defs || Exit 1
AC_OUTPUT
END
-echo 'dummy:' > zardoz.am
+cat > zardoz.am <<END
+.PHONY: dummy
+dummy:
+END
$ACLOCAL
$AUTOMAKE
-# We actually check several things here.
+# Automake should have created zardoz.in.
test -f zardoz.in
-grep '^zardoz:' zardoz.in && Exit 1
-grep '^dummy:' zardoz.in
+
+# The generated file should refer to zardoz.in and zardoz.am, but
+# never just "zardoz".
+$FGREP 'zardoz.am' zardoz.in
+$FGREP 'zardoz.in' zardoz.in
+sed -e 's|zardoz\.am|zrdz.am|g' \
+ -e 's|zardoz\.in|zrdz.in|g' \
+ <zardoz.in | $FGREP 'zardoz' && Exit 1
+
+# The configure-generated Makefile should depend on zardoz.in, two.in and
+# three.in. The automake-generated zardoz.in should depend on zardoz.am.
+# Let's do this check the right way by running configure and make.
+
+str='%% ZaR DoZ %%'
+
+$AUTOCONF
+./configure
+test -f Makefile # sanity check
+
+$MAKE dummy
+# Again, make sure that the generated Makefile do not unduly
+# refer to `zardoz' .
+$MAKE -n zardoz && Exit 1
+
+$sleep
+cat >> zardoz.am <<END
+check-local: testam testin testmk
+.PHONY: testam testin testmk
+testam:
+ grep '$str' \$(srcdir)/zardoz.am
+testin:
+ grep '$str' \$(srcdir)/zardoz.in
+testmk:
+ grep '$str' Makefile
+END
+$MAKE Makefile # for non-GNU make
+$MAKE testam testin testmk
+
+$MAKE distcheck
:
# Make sure ":" works with files automake generates.
# This test is for multiple ":"s.
+# See also sister test `colon2.test'.
. ./defs || Exit 1
AC_OUTPUT
END
-: > zardoz.am
+cat > zardoz.am <<END
+.PHONY: dummy
+dummy:
+END
+
: > two.in
: > three.in
# The generated file should refer to zardoz.in and zardoz.am, but
# never just "zardoz".
+$FGREP 'zardoz.am' zardoz.in
+$FGREP 'zardoz.in' zardoz.in
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.
-grep '^Makefile:.* \$(srcdir)/two.in' zardoz.in
-# Likewise three.in.
-grep '^Makefile:.* \$(srcdir)/three.in' zardoz.in
+# The configure-generated Makefile should depend on zardoz.in, two.in and
+# three.in. The automake-generated zardoz.in should depend on zardoz.am.
+# Let's do this check the right way by running configure and make.
+
+str='%% ZaR DoZ %%'
+str2='// 2_TwO_2 //'
+str3='== @thr33@ =='
+
+$AUTOCONF
+./configure
+test -f Makefile # sanity check
+
+$MAKE dummy
+# Again, make sure that the generated Makefile do not unduly
+# refer to `zardoz' .
+$MAKE -n zardoz && Exit 1
+
+$sleep
+cat >> zardoz.am <<END
+check-local: testam testin testmk test2 test3
+.PHONY: testam testin test2 testmk test3
+testam:
+ grep '$str' \$(srcdir)/zardoz.am
+testin:
+ grep '$str' \$(srcdir)/zardoz.in
+testmk:
+ grep '$str' Makefile
+test2:
+ grep '$str2' \$(srcdir)/two.in
+test3:
+ grep '$str3' \$(srcdir)/three.in
+END
+echo "# $str2" >> two.in
+echo "# $str3" >> three.in
+$MAKE Makefile # for non-GNU make
+$MAKE testam testin testmk test2 test3
+
+$MAKE distcheck
:
: > Makefile.dep
cat > Makefile.am <<'END'
-.PHONY: test
-test:
- case ' $(DIST_COMMON) ' in \
- *' $(srcdir)/Makefile.dep '*|*' Makefile.dep '*) exit 0;; \
- *) exit 1;; \
- esac
+.PHONY: test-fs-layout test-grep test-distcommon test-distdir
+check-local: test-fs-layout test-grep test-distcommon test-distdir
+test-fs-layout:
+ test x'$(srcdir)' = '.' || test ! -r Makefile.dep
+test-grep:
+## The use of $(empty) prevents spurious matches.
+ grep '=GrEp$(empty)Me_am=' $(srcdir)/Makefile.in
+ grep '=GrEp$(empty)Me_dep=' $(srcdir)/Makefile.dep
+ grep '=GrEp$(empty)Me_am=' Makefile
+ grep '=GrEp$(empty)Me_dep=' Makefile
+test-distcommon:
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]Makefile.dep '
+test-distdir: distdir
+ test -f $(distdir)/Makefile.dep
END
$ACLOCAL
+$AUTOCONF
$AUTOMAKE
-grep 'Makefile:Makefile\.in' Makefile.in
-grep '^Makefile:.* \$(srcdir)/Makefile\.dep' Makefile.in
+./configure
-sed '/@SET_MAKE@/d' <Makefile.in >Makefile.sed
-$MAKE -f Makefile.sed SHELL=$SHELL test
+grep '=GrEpMe_am=' Makefile && Exit 1 # sanity check
+grep '=GrEpMe_dep=' Makefile && Exit 1 # likewise
+
+$MAKE test-distcommon
+$MAKE test-distdir
+
+$sleep
+
+echo '# =GrEpMe_am=' >> Makefile.am
+echo '# =GrEpMe_dep=' >> Makefile.dep
+
+$MAKE Makefile # for non-GNU make
+$MAKE test-grep
+$MAKE test-distcommon
+$MAKE test-distdir
+
+$MAKE distcheck
:
cat > configure.in <<END
AC_INIT([$me], [1.0])
AM_INIT_AUTOMAKE
+# With this, version.good should depend from version.gin, while
+# Makefile should not depend from either of them.
AC_CONFIG_FILES([demo/Makefile demo/version.good:demo/version.gin])
AC_OUTPUT
END
mkdir demo
-
: > demo/version.gin
-
-cat > demo/Makefile.am <<'END'
-.PHONY: test
-test:
- case ' $(DIST_COMMON) ' in \
- *' $(srcdir)/version.gin '*) exit 0;; \
- *) exit 1;; \
- esac
-END
+: > demo/Makefile.am
$ACLOCAL
$AUTOMAKE
+# These are older "grepping check", kept mostly for backward-copmatibility.
+# They might (unlikely, but possibly) require updating when automake
+# internals are changed. Just relax or remove if they become too fragile.
$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
+$AUTOCONF
+
+for vpath in : false; do
+
+ if $vpath; then
+ srcdir=..
+ mkdir build
+ cd build
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+
+ test -f demo/version.good # sanity check
+ test ! -s demo/version.good # likewise
+
+ cd demo
+
+ # version.good should depend from version.gin
+ $sleep
+ echo "Rebuilt (srcdir=$srcdir)" > ../$srcdir/demo/version.gin
+ $MAKE version.good
+ $FGREP "Rebuilt (srcdir=$srcdir)" version.good
+
+ # Makefile should not depend from version.good.
+ rm -f version.good
+ $MAKE Makefile
+ test ! -r version.good
+
+ # version.good should be rebuilt from version.gin
+ $MAKE version.good
+ test -f version.good
+
+ # Makefile should not depend from version.gin.
+ rm -f ../$srcdir/demo/version.gin
+ $MAKE Makefile
+ test ! -r ../$srcdir/demo/version.gin # sanity check
+
+ # version.good should depend from version.gin
+ rm -f version.good
+ $MAKE version.good >output 2>&1 && { cat output; Exit 1; }
+ cat output
+ # Try to verify that we errored out for the right reason.
+ $FGREP version.gin output
+
+ cd .. # back in top builddir
+ cd $srcdir
+
+ # Re-create it for the next pass (if any).
+ : > demo/version.gin
+
+done
:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Another test for a failing ":" in AC_OUTPUT. Report from Maciej
-# Stachowiak.
+# Another test for a failing ":" in AC_OUTPUT.
+# Report from Maciej Stachowiak.
. ./defs || Exit 1
)
END
-: > Makefile.am
-
mkdir subdir
-: > subdir/Makefile.am
+: > Makefile.am
: > subdir/foo
+cat > subdir/Makefile.am << 'END'
+.PHONY: test
+test:
+ ## DIST_COMMON should contain `foo', not `subdir/foo'.
+ case '$(DIST_COMMON)' in *subdir/foo*) exit 1;; *) exit 0;; esac
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]foo '
+END
$ACLOCAL
$AUTOMAKE
-# shouldn't have any bar.in
-grep 'bar.in' subdir/Makefile.in && Exit 1
+# Should nowhere refer to `bar.in'.
+$FGREP 'bar.in' Makefile.in subdir/Makefile.in && Exit 1
-# DIST_COMMON should have foo, not subdir/foo
-grep 'DIST_COMMON.*subdir/foo' subdir/Makefile.in && Exit 1
+$AUTOCONF
+./configure
+cd subdir
+$MAKE test
:
# BSD 'grep' works from a pipe, but not a seekable file.
# GNU or BSD 'grep -a' works on files, but is not portable.
case `echo "$std" | grep .` in
- $std) ;;
+ "$std") ;;
*) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
esac
# BSD 'grep' works from a pipe, but not a seekable file.
# GNU or BSD 'grep -a' works on files, but is not portable.
case `echo "$std" | grep .` in
- $std) ;;
+ "$std") ;;
*) echo "$me: grep can't parse nonprinting characters" >&2; Exit 77;;
esac
#! /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
$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
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.
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.
#! /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
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
# -o 'a c' should not be stripped because 'a c' is not an object
# (it does not matter whether touch creates ./-- or not)
./compile touch a.obj -- -o ac.obj a.c
test ! -f a.obj
test ac.obj
+
+:
set -e
-cp "$testsrcdir/../lib/compile" .
+cp "$top_testsrcdir/lib/compile" .
cat >mycc <<'END'
source_seen=no
--- /dev/null
+#! /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 `compile' wraps the Microsoft C/C++ compiler (cl) correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+set -e
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+# Check if compile handles "-o foo", -I, -l, -L, -Xlinker -Wl,
+opts=`LIB= ./compile ./cl foo.c -o foo -lbar -Lgazonk -Ibaz -Xlinker foobar -Wl,-foo,bar`
+test x"$opts" = x"foo.c -Fefoo bar.lib -Ibaz -link -LIBPATH:gazonk foobar -foo bar"
+
+# Check if compile handles "-o foo.obj"
+opts=`./compile ./cl -c foo.c -o foo.obj -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
+
+# Check if compile handles "-o foo.o"
+opts=`./compile ./cl -c foo.c -o foo.o -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.o -Ibaz"
+
+# Check if compile handles "foo.cc" as C++.
+opts=`./compile ./cl -c foo.cc -o foo.o -Ibaz`
+test x"$opts" = x"-c -Tpfoo.cc -Fofoo.o -Ibaz"
+
+# Check if compile clears the "eat" variable properly.
+opts=`eat=1 ./compile ./cl -c foo.c -o foo.obj -Ibaz`
+test x"$opts" = x"-c foo.c -Fofoo.obj -Ibaz"
+
+:
--- /dev/null
+#! /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 `compile' wraps the Microsoft C/C++ compiler (cl) correctly
+# with respect to absolute paths.
+
+required='cl'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >sub/foo.c <<'EOF'
+int
+foo ()
+{
+ return 0;
+}
+EOF
+
+cat >main.c <<'EOF'
+extern int foo ();
+int
+main ()
+{
+ return foo ();
+}
+EOF
+
+absfoodir=`pwd`/sub
+absmainc=`pwd`/main.c
+absmainobj=`pwd`/main.obj
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_PROG_RANLIB
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = sub
+END
+
+cat > sub/Makefile.am << 'END'
+lib_LIBRARIES = libfoo.a
+libfoo_a_SOURCES = foo.c
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+$MAKE
+
+./compile cl $CPPFLAGS $CFLAGS -c -o "$absmainobj" "$absmainc"
+
+# cl expects archives to be named foo.lib, not libfoo.a so
+# make a simple copy here if needed. This is a severe case
+# of badness, but ignore that since this is not what is
+# being tested here...
+if test -f sub/libfoo.a; then
+ cp sub/libfoo.a sub/foo.lib
+fi
+
+./compile cl $CFLAGS $LDFLAGS -L"$absfoodir" "$absmainobj" -o main -lfoo
+
+./main
+
+:
--- /dev/null
+#! /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 the file name translation in the `compile' script works
+# correctly
+
+. ./defs || Exit 1
+
+set -e
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+cat >>configure.in << 'END'
+AC_CANONICAL_HOST
+AC_CONFIG_FILES([check_host], [chmod +x check_host])
+AC_OUTPUT
+END
+
+: >Makefile.am
+
+cat >check_host.in << 'END'
+#! /bin/sh
+case @host_os@ in
+ mingw*)
+ ;;
+ *)
+ exit 77
+ ;;
+esac
+case @build_os@ in
+ mingw* | cygwin*)
+ ;;
+ *)
+ winepath -w / || exit 77
+ ;;
+esac
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+./configure
+./check_host
+
+pwd=`pwd`
+
+# Check if "compile cl" transforms absolute file names to
+# host format (e.g /somewhere -> c:/msys/1.0/somewhere).
+
+res=`./compile ./cl -L"$pwd" | sed -e 's/-link -LIBPATH://'`
+
+case $res in
+ ?:[\\/]*)
+ ;;
+ *)
+ Exit 1
+ ;;
+esac
+
+:
--- /dev/null
+#! /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 `compile' searches libraries correctly
+
+required=xsi-shell
+. ./defs || Exit 1
+
+set -e
+
+cp "$top_testsrcdir/lib/compile" .
+
+# Use a dummy cl, since cl isn't readily available on all systems
+cat >cl <<'END'
+#! /bin/sh
+echo "$@"
+END
+
+chmod +x ./cl
+
+mkdir syslib
+:> syslib/foo.lib
+
+syslib=`pwd`/syslib
+LIB=$syslib
+export LIB
+
+mkdir lib
+:> lib/bar.lib
+:> lib/bar.dll.lib
+
+# Check if compile library search correctly
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+# Check if -static makes compile avoid bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib -static -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+:> syslib/bar.lib
+:> syslib/bar.dll.lib
+
+# Check if compile finds bar.dll.lib in syslib
+opts=`./compile ./cl foo.c -o foo -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/bar.dll.lib $syslib/foo.lib"
+
+# Check if compile prefers -L over $LIB
+opts=`./compile ./cl foo.c -o foo -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib"
+
+mkdir lib2
+:> lib2/bar.dll.lib
+
+# Check if compile avoids bar.dll.lib in lib2 when -static
+opts=`./compile ./cl foo.c -o foo -Llib2 -static -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/bar.lib $syslib/foo.lib -link -LIBPATH:lib2"
+
+# Check if compile gets two different bar libraries when -static
+# is added in the middle
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -static -lbar`
+test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib lib/bar.lib -link -LIBPATH:lib2 -LIBPATH:lib"
+
+# Check if compile gets the correct bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib -Llib2 -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib -LIBPATH:lib2"
+
+# Check if compile gets the correct bar.dll.lib
+opts=`./compile ./cl foo.c -o foo -Llib2 -Llib -lbar -lfoo`
+test x"$opts" = x"foo.c -Fefoo lib2/bar.dll.lib $syslib/foo.lib -link -LIBPATH:lib2 -LIBPATH:lib"
+
+mkdir "sys lib2"
+:> "sys lib2/foo.dll.lib"
+
+syslib2="`pwd`/sys lib2"
+LIB="$syslib2;$LIB"
+
+# Check if compile handles spaces in $LIB and that it prefers the order
+# in a multi-component $LIB.
+opts=`./compile ./cl foo.c -o foo -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib2/foo.dll.lib"
+
+# Check if compile handles the 2nd directory in a multi-component $LIB.
+opts=`./compile ./cl foo.c -o foo -static -lfoo`
+test x"$opts" = x"foo.c -Fefoo $syslib/foo.lib"
+
+:
AC_PROG_CC
AC_PROG_CXX
AC_PROG_FC
-AC_FC_LIBRARY_LDFLAGS
END
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f90 bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f90
-: > bar.c
-: > baz.cc
-
$ACLOCAL
$AUTOMAKE
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(FCCOMPILE)' Makefile.in
-Exit 0
+:
cat > Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.f bar.c baz.cc
-foo_LDADD = @FLIBS@
END
-: > foo.f
-: > bar.c
-: > baz.cc
-
$ACLOCAL
$AUTOMAKE
$FGREP ' $(CXXCOMPILE)' Makefile.in
$FGREP ' $(F77COMPILE)' Makefile.in
-Exit 0
+:
#! /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
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AM_CONDITIONAL(TEST, true)
-AC_OUTPUT(Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([TEST], [true])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
endif
END
-set -e
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
grep '^@TEST_TRUE@target: true' Makefile.in
grep '^@TEST_TRUE@ action' Makefile.in
grep '^@TEST_FALSE@target: false' Makefile.in
-Exit 0
+
+:
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher
-. ./defs
+. ./defs || Exit 1
set -e
# Check that conditional redefinitions of AC_SUBST'ed variables are detected.
# Report from Patrik Weiskircher
-. ./defs
+. ./defs || Exit 1
set -e
# Check that conditional primaries can use non-conditional directories.
# From Pavel Roskin.
-. ./defs
+. ./defs || Exit 1
set -e
# Check that non-conditional primaries can use conditional directories.
# Reported by Juergen Keil.
-. ./defs
+. ./defs || Exit 1
set -e
# Check that non-conditional primaries cannot use directories defined
# in some conditions (but not others).
-. ./defs
+. ./defs || Exit 1
set -e
# Check that conditional primaries can use directories defined
# in the same conditions (but not others).
-. ./defs
+. ./defs || Exit 1
set -e
# or cpu time it can found. Although this test won't print `FAIL' if
# it fails, it will take long enough so it can't go unnoticed.
-. ./defs
+. ./defs || Exit 1
set -e
# For PR/352: make sure we support bin_PROGRAMS being defined conditionally.
-. ./defs
+. ./defs || Exit 1
set -e
# Make sure we define conditional _DEPENDENCIES correctly.
-. ./defs
+. ./defs || Exit 1
set -e
# Make sure the user can override a conditional _DEPENDENCIES.
-. ./defs
+. ./defs || Exit 1
set -e
# Check for conditional library with a conditional directory.
# Report from Ralf Corsepius
-. ./defs
+. ./defs || Exit 1
set -e
# Check for _DEPDENDENCIES definition with conditional _LDADD.
# Report from Elena A. Vengerova
-. ./defs
+. ./defs || Exit 1
set -e
# Report from Roman Fietze.
required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
set -e
# Check rules output for parser defined conditionally.
required='flex bison gcc'
-. ./defs
+. ./defs || Exit 1
set -e
# Check conditional local rules.
# Report from Simon Josefsson.
-. ./defs
+. ./defs || Exit 1
set -e
# Check conditional variable ordering.
# Report from Ed Hartnett.
-. ./defs
+. ./defs || Exit 1
set -e
# Build either as CONFIG_FILE or as PROGRAM.
-. ./defs
+. ./defs || Exit 1
set -e
mkdir sub
# Test AM_COND_IF.
-. ./defs
+. ./defs || Exit 1
set -e
cat >>configure.in <<'END'
# AM_COND_IF with an undefined condition should fail.
-. ./defs
+. ./defs || Exit 1
set -e
cat >>configure.in <<'END'
# This shouldn't happen with user input, as _AM_COND_* are not documented,
# but better to be safe.
-. ./defs
+. ./defs || Exit 1
set -e
cat >>configure.in <<'END'
# Ensure an error with underquoted usage of AM_COND_IF in configure.ac.
-. ./defs
+. ./defs || Exit 1
set -e
cat >>configure.in <<'END'
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See cond23.test.
-. ./defs
+. ./defs || Exit 1
set -e
# Check that redefinitions of AC_SUBST'ed AM_SUBST_NOTMAKE'd variables
# are not diagnosed. See cond24.test.
-. ./defs
+. ./defs || Exit 1
set -e
--- /dev/null
+#! /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
#! /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
$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
:
$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
cat > Makefile.am << 'END'
.PHONY: test1 test2
test1:
- @echo DIST_COMMON = $(DIST_COMMON) ## for debugging
+ @echo DIST_COMMON = $(DIST_COMMON)
echo ' ' $(DIST_COMMON) ' ' | grep '[ /]acconfig\.h '
test2: distdir
- ls -l $(distdir)/* ## for debugging
+ ls -l $(distdir)/*
test -f $(distdir)/acconfig.h
check-local: test1 test2
END
cat > Makefile.am << 'END'
.PHONY: test0 test1 test2
test0:
- @echo DIST_COMMON = $(DIST_COMMON) ## for debugging
+ @echo DIST_COMMON = $(DIST_COMMON)
echo ' ' $(DIST_COMMON) ' ' | grep '[ /]one\.h\.in '
echo ' ' $(DIST_COMMON) ' ' | grep '[ /]two\.h\.in '
: Processed header files should not be distributed.
test -f one.h
test -f two.h
test2: distdir
- ls -l $(distdir)/* ## for debugging
+ ls -l $(distdir)/*
test -f $(distdir)/one.h.in
test -f $(distdir)/two.h.in
: Processed header files should not be distributed.
#! /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
. ./defs || Exit 1
+set -e
+
: > Makefile.am
rm -f install-sh
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE -c -a
+
+test -f install-sh
+test ! -h install-sh
+
+:
--- /dev/null
+#! /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
+
+:
#! /bin/sh
-# Copyright (C) 1996, 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 ensure that --output-dir works. Bug report from Joshua
-# Cowan.
+# The `cscope' target should not fail if there are no sources.
+required=
. ./defs || Exit 1
-cat > Makefile.am <<'END'
-pkgdata_DATA =
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
END
+: >Makefile.am
-mkdir zardir
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
-$ACLOCAL || Exit 1
-$AUTOMAKE -Wno-obsolete --output-dir=zardir || Exit 1
+./configure
+$MAKE cscope
-test -f Makefile.in && Exit 1
-test -f zardir/Makefile.in
+:
--- /dev/null
+#! /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
+
+:
# -*- shell-script -*-
-# @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
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Defines for Automake testing environment.
-# Tom Tromey <tromey@cygnus.com>
-
-# Be more Bourne compatible.
-# (Snippet copied from configure's initialization in Autoconf 2.64)
-DUALCASE=1; export DUALCASE # for MKS sh
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
- setopt NO_GLOB_SUBST
-else
- case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
-fi
+## -------------------------------------------------------- ##
+## Source static setup and definitions for the testsuite. ##
+## -------------------------------------------------------- ##
# Ensure we are running from the right directory.
-test -f ./defs || {
- echo "defs: not found in current directory" 1>&2
+test -f ./defs-static || {
+ echo "$0: ./defs-static: not found in current directory" >&2
exit 1
}
-if test -z "$srcdir"; then
- # compute $srcdir.
- srcdir=`echo "$0" | sed -e 's,/[^\\/]*$,,'`
- test "$srcdir" = $0 && srcdir=.
-else :; fi
+# Source the shell sanitization and variables' definitions.
+. ./defs-static || exit 99
+
+# The name of the current test (without the `.test' suffix.)
+me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+
-# Ensure $srcdir is set correctly.
-test -f "$srcdir/defs.in" || {
- echo "$srcdir/defs.in not found, check \$srcdir" 1>&2
+## ---------------------------------------- ##
+## Sanity checks and environment cleanup. ##
+## ---------------------------------------- ##
+
+# Ensure $testsrcdir is set correctly.
+test -f "$testsrcdir/defs-static.in" || {
+ echo "$me: $testsrcdir/defs-static.in not found, check \$testsrcdir" >&2
exit 1
}
-me=`echo "$0" | sed -e 's,.*[\\/],,;s/\.test$//'`
+# Ensure $testbuilddir is set correctly.
+test -f "$testbuilddir/defs-static" || {
+ echo "$me: $testbuilddir/defs-static not found, check \$testbuilddir" >&2
+ exit 1
+}
+
+# Unset some MAKE... variables that may cause $MAKE to act like a
+# recursively invoked sub-make. Any $MAKE invocation in a test is
+# conceptually an independent invocation, not part of the main
+# 'automake' build.
+unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
+# Unset verbosity flag.
+unset V
+# Also unset variables that will let `make -e install' divert
+# files into unwanted directories.
+unset DESTDIR
+unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
+unset htmldir includedir infodir libdir libexecdir localedir mandir
+unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
+# The tests call `make -e' but we do not want $srcdir from the environment
+# to override the definition from the Makefile.
+unset srcdir
+# Also unset variables that control our test driver. While not
+# conceptually independent, they cause some changed semantics we
+# need to control (and test for) in some of the tests to ensure
+# backward-compatible behavior.
+unset DISABLE_HARD_ERRORS
+unset TESTS
+unset TEST_LOG_COMPILER
+unset TEST_LOGS
+unset RECHECK_LOGS
+unset VERBOSE
+
+
+## ---------------------------- ##
+## Auxiliary shell functions. ##
+## ---------------------------- ##
+
+# We use a trap below for cleanup. This requires us to go through
+# hoops to get the right exit status transported through the signal.
+# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
+# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
+# sh inside this function.
+Exit ()
+{
+ set +e
+ (exit $1)
+ exit $1
+}
+
+# is_newest FILE FILES
+# --------------------
+# Return false if any file in FILES is newer than FILE.
+# Resolve ties in favor of FILE.
+is_newest ()
+{
+ is_newest_files=`find "$@" -newer "$1"`
+ test -z "$is_newest_files"
+}
+
+# AUTOMAKE_run status [options...]
+# --------------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_run ()
+{
+ expected_exitcode=$1
+ shift
+ exitcode=0
+ $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
+ cat stderr >&2
+ cat stdout
+ test $exitcode = $expected_exitcode || Exit 1
+}
+
+# AUTOMAKE_fails [options...]
+# ---------------------------
+# Run Automake with OPTIONS, and fail if automake
+# does not exit with STATUS.
+AUTOMAKE_fails ()
+{
+ AUTOMAKE_run 1 ${1+"$@"}
+}
+
+
+## ----------------------------------------------------------- ##
+## Checks for required tools, and additional setups (if any) ##
+## required by them. ##
+## ----------------------------------------------------------- ##
-APIVERSION='@APIVERSION@'
-PATH_SEPARATOR='@PATH_SEPARATOR@'
-
-# Make sure we override the user shell.
-SHELL='@SHELL@'
-export SHELL
-# User can override various tools used.
-test -z "$PERL" && PERL='@PERL@'
-test -z "$MAKE" && MAKE=make
-test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
-test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
-test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
-test -z "$MISSING" && MISSING=`pwd`/../lib/missing
-# Use -Werror because this also turns some Perl warnings into error.
-# (Tests for which this is inappropriate should use -Wno-error.)
-test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
-# Extra flags to pass to aclocal before all other flags added by this script.
-ACLOCAL_TESTSUITE_FLAGS=
-export ACLOCAL_TESTSUITE_FLAGS
-
-# See how Automake should be run. We put --foreign as the default
-# strictness to avoid having to create lots and lots of files. A test
-# can override this by specifying a different strictness. Use -Wall
-# -Werror by default. Tests for which this is inappropriate
-# (e.g. when testing that a warning is enabled by a specific switch)
-# should use -Wnone or/and -Wno-error
-test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
-
-PATH="`pwd`$PATH_SEPARATOR$PATH"
+# Print it here, so that the user will see it also if the test
+# will be skipped due to some tool missing in $PATH itslef.
echo "$PATH"
-# Some shells forget to export modified environment variables.
-# (See note about `export' in the Autoconf manual.)
-export PATH
+# Look for (and maybe set up) required tools and/or system features; skip
+# the current test if they are not found.
for tool in : $required
do
# Check that each required tool is present.
YACC='bison -y'
export YACC
echo "$me: running bison --version"
- ( bison --version ) || exit 77
+ bison --version || exit 77
;;
bzip2)
# Do not use --version, bzip2 still tries to compress stdin.
echo "$me: running bzip2 --help"
- ( bzip2 --help ) || exit 77
+ bzip2 --help || exit 77
+ ;;
+ cl)
+ CC=cl
+ export CC
+ echo "$me: running $CC -?"
+ $CC -? || exit 77
;;
etags)
# Exuberant Ctags will create a TAGS file even
# does not have such problem.) Use -o /dev/null
# to make sure we do not pollute the tests/ directory.
echo "$me: running etags --version -o /dev/null"
- ( etags --version -o /dev/null ) || exit 77
+ etags --version -o /dev/null || exit 77
;;
GNUmake)
# Use --version AND -v, because SGI Make doesn't fail on --version.
CC=gcc
export CC
echo "$me: running $CC --version"
- ( $CC --version ) || exit 77
+ $CC --version || exit 77
+ echo "$me: running $CC -v"
+ $CC -v || exit 77
;;
gcj)
GCJ=gcj
export GCJ
echo "$me: running $GCJ --version"
- ( $GCJ --version ) || exit 77
- ( $GCJ -v ) || exit 77
+ $GCJ --version || exit 77
+ echo "$me: running $GCJ -v"
+ $GCJ -v || exit 77
;;
g++)
CXX=g++
export CXX
echo "$me: running $CXX --version"
- ( $CXX --version ) || exit 77
+ $CXX --version || exit 77
+ echo "$me: running $CXX -v"
+ $CXX -v || exit 77
;;
icc)
CC=icc
# it will try link *nothing* and complain it cannot find
# main(); funny). Use -help so it does not try linking anything.
echo "$me: running $CC -V -help"
- ( $CC -V -help ) || exit 77
+ $CC -V -help || exit 77
;;
makedepend)
echo "$me: running makedepend -f-"
- ( makedepend -f- ) || exit 77
+ makedepend -f- || exit 77
;;
makeinfo-html)
# Make sure makeinfo understands --html.
echo "$me: running makeinfo --html --version"
- ( makeinfo --html --version ) || exit 77
+ makeinfo --html --version || exit 77
;;
non-root)
# Skip this test case if the user is root.
(echo foo >> $priv_check_temp) >/dev/null 2>&1
overwrite_status=$?
rm -f $priv_check_temp
- test $overwrite_status = 0 && exit 77
+ if test $overwrite_status -eq 0; then
+ echo "$me: cannot drop file write permissions" >&2
+ exit 77
+ fi
+ ;;
+ perl-threads)
+ if test "$WANT_NO_THREADS" = "yes"; then
+ echo "$me: skip with Devel::Cover: cannot cope with threads" >&2
+ exit 77
+ fi
;;
python)
# Python doesn't support --version, it has -V
echo "$me: running python -V"
- ( python -V ) || exit 77
+ python -V || exit 77
;;
ro-dir)
# Skip this test case if read-only directories aren't supported
(: > $ro_dir_temp/probe) >/dev/null 2>/dev/null
create_status=$?
rm -rf $ro_dir_temp
- test $create_status = 0 && exit 77
+ if test $create_status -eq 0; then
+ echo "$me: cannot drop directory write permissions" >&2
+ exit 77
+ fi
;;
rst2html)
# Try the variants that are tried in check.am.
while :; do
- for r2h in $RST2HTML rst2html rst2html.py; do
- echo "$me: running $r2h --version"
- $r2h --version && break 2
- done
- exit 77
+ for r2h in $RST2HTML rst2html rst2html.py; do
+ echo "$me: running $r2h --version"
+ $r2h --version && break 2
+ done
+ echo "$me: no proper rst2html program found" >&2
+ exit 77
done
;;
runtest)
# DejaGnu's runtest program. We rely on being able to specify
# the program on the runtest command-line. This requires
# DejaGnu 1.4.3 or later.
- echo "$me: running runtest --version"
- (runtest SOMEPROGRAM=someprogram --version) || exit 77
+ echo "$me: running runtest SOMEPROGRAM=someprogram --version"
+ runtest SOMEPROGRAM=someprogram --version || exit 77
;;
tex)
# No all versions of Tex support `--version', so we use
# a configure check.
- test -n "@TEX@" || exit 77
+ if test -z "$TEX"; then
+ echo "$me: TeX is required, but it wasn't found by configure" >&2
+ exit 77
+ fi
;;
texi2dvi-o)
# Texi2dvi supports `-o' since Texinfo 4.1.
echo "$me: running texi2dvi -o /dev/null --version"
- ( texi2dvi -o /dev/null --version ) || exit 77
+ texi2dvi -o /dev/null --version || exit 77
+ ;;
+ xsi-shell)
+ # Try some XSI features.
+ # Keep this in sync with libtool.m4:_LT_CHECK_SHELL_FEATURES.
+ echo "$me: trying some XSI constructs"
+ ( _am_dummy="a/b/c"
+ test "${_am_dummy##*/},${_am_dummy%/*},${_am_dummy#??}"${_am_dummy%"$_am_dummy"}, \
+ = c,a/b,b/c, \
+ && eval 'test $(( 1 + 1 )) -eq 2 \
+ && test "${#_am_dummy}" -eq 5' ) || exit 77
;;
- # Generic case: the tool must support --version.
*)
+ # Generic case: the tool must support --version.
echo "$me: running $tool --version"
+ # It is not likely but possible that $tool is a special builtin,
+ # in which case the shell is allowed to exit after an error.
+ # So, please leave the subshell here.
( $tool --version ) || exit 77
;;
esac
done
-
-# Always use an absolute srcdir. Otherwise symlinks made in subdirs
-# of the test dir just won't work.
-case "$srcdir" in
- [\\/]* | ?:[\\/]*)
+# Using just `$testbuilddir' for the check here is ok, since the
+# further temporary subdirectory where the test will be run is
+# ensured not to contain any whitespace character.
+case $testbuilddir in
+ *\ *|*\ *)
+ case " $required " in
+ *' libtool '* | *' libtoolize '* )
+ echo "$me: libtool/libtoolized cannot cope correctly" >&2
+ echo "$me: with spaces in the build tree" >&2
+ exit 77
+ ;;
+ esac
;;
+esac
- *)
- srcdir=`CDPATH=: && cd "$srcdir" && pwd`
+# This test is necessary, although Automake's configure script bails out
+# when $srcdir contains spaces. This is because $testsrcdir is in not
+# configure-time $srcdir, but is instead configure-time $abs_srcdir, and
+# that is allowed to contain spaces.
+case $testsrcdir in
+ *\ * |*\ *)
+ case " $required " in
+ *' libtool '* | *' libtoolize '* | *' gettext '* )
+ echo "$me: our testsuite setup cannot cope correctly with spaces" >&2
+ echo "$me: in the source tree for libtool/gettext tests" >&2
+ exit 77
+ ;;
+ esac
+ ;;
+esac
+
+# We might need extra macros, e.g., from Libtool or Gettext.
+# Find them on the system.
+# Use `-I $top_testsrcdir/m4' in addition to `--acdir=$top_testsrcdir/m4',
+# because the other `-I' directories added for libtool and gettext might
+# contain files from an old version of Automake that we don't want to use.
+# Use `-Wno-syntax' because we do not want our test suite to fail because
+# some third-party .m4 file is underquoted.
+case " $required " in
+ *' libtool '* | *' libtoolize '* | *' gettext '* )
+ aclocaldir=$testprefix/share/aclocal
+ extra_includes=""
+ if test -f $aclocaldir/dirlist; then
+ extra_includes=`
+ <$aclocaldir/dirlist \
+ sed 's/#.*//;s/[ ][ ]*$//g' \
+ | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
+ else :; fi
+
+ libtool_found=no
+ gettext_found=no
+ for d in $extra_includes $aclocaldir ; do
+ test "x$d" != x-I || continue
+ if test -f "$d/libtool.m4"; then
+ libtool_found=yes
+ fi
+ if test -f "$d/gettext.m4"; then
+ gettext_found=yes
+ fi
+ done
+ case " $required " in
+ *' libtool '*|*' libtoolize '*)
+ if test $libtool_found != yes; then
+ echo "$me: libtool/libtoolize is required, but libtool.m4 wasn't" >&2
+ echo "$me: found in directories $aclocaldir $extra_includes" >&2
+ exit 77
+ fi
+ ;;
+ *' gettext '*)
+ if test $gettext_found != yes; then
+ echo "$me: gettext is required, but gettext.m4 wasn't found" >&2
+ echo "$me: in directories $aclocaldir $extra_includes" >&2
+ exit 77
+ fi
+ ;;
+ esac
+ ACLOCAL="$ACLOCAL -Wno-syntax -I $top_testsrcdir/m4 $extra_includes -I $aclocaldir"
;;
esac
-# We use a trap below for cleanup. This requires us to go through
-# hoops to get the right exit status transported through the signal.
-# So use `Exit STATUS' instead of `exit STATUS' inside of the tests.
-# Turn off errexit here so that we don't trip the bug with OSF1/Tru64
-# sh inside this function.
-Exit ()
-{
- set +e
- (exit $1)
- exit $1
-}
-curdir=`pwd`
+## ---------------------------------------------------------------- ##
+## Create and set up of the temporary directory used by the test. ##
+## Set up of the exit trap for cleanup of said directory. ##
+## ---------------------------------------------------------------- ##
+
+# The subdirectory where the current test script will run and write its
+# temporary/data files. This will be created shortly, and will be removed
+# by the cleanup trap below if the test passes. If the test doesn't pass,
+# this directory will be kept, to facilitate debugging.
testSubDir=$me.dir
+
test ! -d $testSubDir || {
find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
rm -rf $testSubDir
}
mkdir $testSubDir
-sh_errexit_works=@sh_errexit_works@
+cd ./$testSubDir
+
if test "$sh_errexit_works" = yes; then
trap 'exit_status=$?
set +e
- cd "$curdir"
+ cd "$testbuilddir"
case $exit_status,$keep_testdirs in
0,)
find $testSubDir -type d ! -perm -200 -exec chmod u+w {} ";"
rm -rf $testSubDir
;;
esac
- test "$signal" != 0 &&
- echo "$me: caught signal $signal"
+ test "$signal" != 0 && echo "$me: caught signal $signal"
echo "$me: exit $exit_status"
exit $exit_status
' 0
for signal in 1 2 13 15; do
trap 'signal='$signal'; { Exit 1; }' $signal
done
+ signal=0
fi
-signal=0
# Copy in some files we need.
for file in install-sh missing depcomp; do
- cp "$srcdir/../lib/$file" "$testSubDir/$file" || Exit 1
+ cp "$top_testsrcdir/lib/$file" . || Exit 1
done
-cd ./$testSubDir
-
# Build appropriate environment in test directory. Eg create
# configure.in, touch all necessary files, etc.
# Don't use AC_OUTPUT, but AC_CONFIG_FILES so that appending
echo "AC_CONFIG_FILES([Makefile])"
} >configure.in
-# Unset some MAKE... variables that may cause $MAKE to act like a
-# recursively invoked sub-make. Any $MAKE invocation in a test is
-# conceptually an independent invocation, not part of the main
-# 'automake' build.
-unset MFLAGS MAKEFLAGS AM_MAKEFLAGS MAKELEVEL __MKLVL__ MAKE_JOBS_FIFO
-# Unset verbosity flag.
-unset V
-# Also unset variables that will let `make -e install' divert
-# files into unwanted directories.
-unset DESTDIR
-unset prefix exec_prefix bindir datarootdir datadir docdir dvidir
-unset htmldir includedir infodir libdir libexecdir localedir mandir
-unset oldincludedir pdfdir psdir sbindir sharedstatedir sysconfdir
-# Also unset variables that control our test driver. While not
-# conceptually independent, they cause some changed semantics we
-# need to control (and test for) in some of the tests to ensure
-# backward-compatible behavior.
-unset DISABLE_HARD_ERRORS
-unset TESTS
-unset TEST_LOG_COMPILER
-unset TEST_LOGS
-unset RECHECK_LOGS
-unset VERBOSE
-
-echo "=== Running test $0"
-# We might need extra macros, e.g., from Libtool or Gettext.
-# Find them on the system.
-# Use `-I $srcdir/../m4' in addition to `--acdir=$srcdir/../m4', because the
-# other `-I' directories added for libtool and gettext might contain
-# files from an old version of Automake that we don't want to use.
-# Use `-Wno-syntax' because we do not want our test suite to fail because
-# some third-party .m4 file is underquoted.
-case $required in
- *libtool* | *gettext* )
- aclocaldir='@prefix@/share/aclocal'
- extra_includes=""
- if test -f $aclocaldir/dirlist; then
- extra_includes=`
- <$aclocaldir/dirlist \
- sed 's/#.*//;s/[ ][ ]*$//g' \
- | while read dir; do test ! -d "$dir" || echo "-I $dir"; done`
- else :; fi
-
- libtool_found=no
- gettext_found=no
- for d in $extra_includes $aclocaldir ; do
- test "x$d" != x-I || continue
- if test -f "$d/libtool.m4"; then
- libtool_found=yes
- fi
- if test -f "$d/gettext.m4"; then
- gettext_found=yes
- fi
- done
- case $required in
- *libtool* ) test $libtool_found = yes || Exit 77 ;;
- *gettext* ) test $gettext_found = yes || Exit 77 ;;
- esac
- # Libtool cannot cope with spaces in the build tree. Our testsuite setup
- # cannot cope with spaces in the source tree name for Libtool and gettext
- # tests.
- case $srcdir,`pwd` in
- *\ * | *\ *) Exit 77 ;;
- esac
- ACLOCAL="$ACLOCAL -Wno-syntax -I $srcdir/../m4 $extra_includes -I $aclocaldir"
- ;;
-esac
-
-testaclocaldir='@abs_top_srcdir@/m4'
-
-# POSIX no longer requires 'egrep' and 'fgrep',
-# but some hosts lack 'grep -E' and 'grep -F'.
-EGREP='@EGREP@'
-FGREP='@FGREP@'
-
-# The amount we should wait after modifying files depends on the platform.
-# For instance, Windows '95, '98 and ME have 2-second granularity
-# and can be up to 3 seconds in the future w.r.t. the system clock.
-sleep='sleep @MODIFICATION_DELAY@'
-
-# The tests call `make -e' but we do not want $srcdir from the environment
-# to override the definition from the Makefile.
-testsrcdir=$srcdir
-unset srcdir
-
-# An old timestamp that can be given to a file, in "touch -t" format.
-# The time stamp should be portable to all file systems of interest.
-# Just for fun, choose the exact time of the announcement of the GNU project
-# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
-old_timestamp=198309271735.59
-
-# is_newest FILE FILES
-# --------------------
-# Return false if any file in FILES is newer than FILE.
-# Resolve ties in favor of FILE.
-is_newest ()
-{
- is_newest_files=`find "$@" -newer "$1"`
- test -z "$is_newest_files"
-}
-
-
-# AUTOMAKE_run status [options...]
-# --------------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_run ()
-{
- expected_exitcode=$1
- shift
- exitcode=0
- $AUTOMAKE ${1+"$@"} >stdout 2>stderr || exitcode=$?
- cat stderr >&2
- cat stdout
- test $exitcode = $expected_exitcode || Exit 1
-}
-
-# AUTOMAKE_fails [options...]
-# ---------------------------
-# Run Automake with OPTIONS, and fail if automake
-# does not exit with STATUS.
-AUTOMAKE_fails ()
-{
- AUTOMAKE_run 1 ${1+"$@"}
-}
+## ---------------- ##
+## Ready to go... ##
+## ---------------- ##
# Turn on shell traces.
set -x
--- /dev/null
+# -*- shell-script -*-
+# @configure_input@
+#
+# Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
+# 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
+# the Free Software Foundation; either version 2, or (at your option)
+# any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+# Defines and minimal setup for Automake testing environment.
+# IMPORTANT: Multiple inclusions of this file should be idempotent!
+
+# Be more Bourne compatible.
+# (Snippet copied from configure's initialization in Autoconf 2.64)
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+testsrcdir='@abs_srcdir@'
+top_testsrcdir='@abs_top_srcdir@'
+testbuilddir='@abs_builddir@'
+testprefix='@prefix@'
+
+APIVERSION='@APIVERSION@'
+PATH_SEPARATOR='@PATH_SEPARATOR@'
+
+# Make sure we override the user shell.
+SHELL='@SHELL@'; export SHELL
+# User can override various tools used.
+test -z "$PERL" && PERL='@PERL@'
+test -z "$MAKE" && MAKE=make
+test -z "$AUTOCONF" && AUTOCONF="@am_AUTOCONF@"
+test -z "$AUTOHEADER" && AUTOHEADER="@am_AUTOHEADER@"
+test -z "$AUTOUPDATE" && AUTOUPDATE=autoupdate
+test -z "$MISSING" && MISSING=$top_testsrcdir/lib/missing
+# Use -Werror because this also turns some Perl warnings into error.
+# (Tests for which this is inappropriate should use -Wno-error.)
+test -z "$ACLOCAL" && ACLOCAL="aclocal-$APIVERSION -Werror"
+# Extra flags to pass to aclocal before all other flags added by this script.
+ACLOCAL_TESTSUITE_FLAGS=''; export ACLOCAL_TESTSUITE_FLAGS
+
+# See how Automake should be run. We put --foreign as the default
+# strictness to avoid having to create lots and lots of files. A test
+# can override this by specifying a different strictness. Use -Wall
+# -Werror by default. Tests for which this is inappropriate
+# (e.g. when testing that a warning is enabled by a specific switch)
+# should use -Wnone or/and -Wno-error
+test -z "$AUTOMAKE" && AUTOMAKE="automake-$APIVERSION --foreign -Werror -Wall"
+
+# POSIX no longer requires 'egrep' and 'fgrep',
+# but some hosts lack 'grep -E' and 'grep -F'.
+EGREP='@EGREP@'
+FGREP='@FGREP@'
+
+# No all versions of Tex support `--version', so we use a configure
+# check to decide if tex is available. This decision is embodied in
+# this variable.
+TEX='@TEX@'
+
+# Whether /bin/sh has working 'set -e' with exit trap.
+sh_errexit_works='@sh_errexit_works@'
+
+# The amount we should wait after modifying files depends on the platform.
+# For instance, Windows '95, '98 and ME have 2-second granularity
+# and can be up to 3 seconds in the future w.r.t. the system clock.
+sleep='sleep @MODIFICATION_DELAY@'
+
+# An old timestamp that can be given to a file, in "touch -t" format.
+# The time stamp should be portable to all file systems of interest.
+# Just for fun, choose the exact time of the announcement of the GNU project
+# in UTC; see <http://www.gnu.org/gnu/initial-announcement.html>.
+old_timestamp=198309271735.59
+
+# Make our wrapper scripts accessible by default. And avoid to uselessly
+# extend $PATH multiple times if this file is sourced multiple times.
+case $PATH in
+ "$testbuilddir$PATH_SEPARATOR"*) ;;
+ *) PATH="$testbuilddir$PATH_SEPARATOR$PATH";;
+esac
+export PATH
set -e
cat > acinclude.m4 << 'END'
-AC_DEFUN([AM_FUNC_TWO])
+AC_DEFUN([AM_FUNC_THREE])
+AC_DEFUN([AM_FUNC_TWO], [@!GrepThisString!@AM_FUNC_THREE])
AC_DEFUN([AM_FUNC_ONE], [AC_REQUIRE([AM_FUNC_TWO])])
END
+cat >>configure.in << 'END'
+AM_FUNC_ONE
+END
+
$ACLOCAL
+$AUTOCONF
+grep '^@!GrepThisString!@$' configure
+
+:
# 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 dejagnu tests and automake-style tests can coexist.
+# Superficial test to check that dejagnu tests and automake-style
+# tests can coexist. See also related deeper test `check12.test'.
. ./defs || Exit 1
TESTS = frob.test
END
-: > frob.test
-
$ACLOCAL
$AUTOMAKE
grep '^check-TESTS' Makefile.in
grep '^check-DEJAGNU' Makefile.in
+
+:
#! /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
set -e
-echo 'AC_OUTPUT' >> configure.in
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
site.exp:
- @echo foo
+ echo :GREP:ME: > $@
END
$ACLOCAL
$AUTOCONF
$AUTOMAKE -Wno-override
-grep site.exp Makefile.in
-test `grep '^site\.exp:' Makefile.in | wc -l` -eq 1
+grep 'site\.exp' Makefile.in
+test `grep -c '^site\.exp:' Makefile.in` -eq 1
./configure
-$MAKE site.exp >stdout
-cat stdout
-grep foo stdout
+$MAKE site.exp
+grep ':GREP:ME:' site.exp
AUTOMAKE_fails
-grep 'Makefile.am:3:.*site.exp' stderr
+grep '^Makefile\.am:3:.*site\.exp' stderr
+
+:
#! /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
chmod +x hammer
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = hammer
-
AM_RUNTESTFLAGS = HAMMER=$(srcdir)/hammer
-
EXTRA_DIST = hammer hammer.test/hammer.exp
END
# Ensure that the envvar RUNTESTFLAGS is used.
# Report from Mark Mitchell.
-RUNTESTFLAGS=--unknown-option $MAKE check && Exit 1
-Exit 0
+RUNTESTFLAGS=--unknown-runtest-option $MAKE check >output 2>&1 \
+ && { cat output; Exit 1; }
+cat output
+$FGREP 'unknown-runtest-option' output
+
+:
#! /bin/sh
-# Copyright (C) 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
#! /bin/sh
echo "Everything looks like a nail to me!"
END
-
chmod +x hammer
cat > spanner << 'END'
#! /bin/sh
echo "I'm a right spanner!"
END
-
chmod +x spanner
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
EXTRA_DIST += spanner spanner.test/spanner.exp
END
-mkdir hammer.test
-mkdir spanner.test
+mkdir hammer.test spanner.test
cat > hammer.test/hammer.exp << 'END'
set test test
# Test for PR 488.
sed 's/E\(verything\)/Not e\1/' hammer > thammer
-mv thammer hammer
+mv -f thammer hammer
chmod +x hammer
+rm -f hammer.log hammer.sum spanner.log spanner.sum
$MAKE check && Exit 1
+test -f hammer.log
+test -f hammer.sum
+test -f spanner.log
+test -f spanner.sum
+
:
#! /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
set -e
-# Get the package name from configure.in.
-package=`$FGREP AC_INIT configure.in | sed -e 's:^[^[]*\[\([^]]*\)\].*$:\1:'`
+package=$me
cat > $package << 'END'
#! /bin/sh
echo "Ah, we have been expecting you, Mr. Blond."
END
-
chmod +x $package
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << END
AUTOMAKE_OPTIONS = dejagnu
-
EXTRA_DIST = $package $package.test/$package.exp
+AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package
END
-echo "AM_RUNTESTFLAGS = PACKAGE=\$(srcdir)/$package" >> Makefile.am
-
mkdir $package.test
-
cat > $package.test/$package.exp << 'END'
-set test "test"
+set test "a_dejagnu_test"
spawn $PACKAGE
expect {
"Ah, we have been expecting you, Mr. Blond." { pass "$test" }
test -f $package.sum
$MAKE distcheck
+
+:
#! /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
#! /bin/sh
echo whatever
END
-
chmod +x faildeja
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = faildeja
-
AM_RUNTESTFLAGS = FAILDEJA=$(srcdir)/faildeja
END
mkdir faildeja.test
-
cat > faildeja.test/faildeja.exp << 'END'
-set test test
+set test failing_deja_test
spawn $FAILDEJA
expect {
default { fail "$test" }
$MAKE check && Exit 1
test -f faildeja.log
test -f faildeja.sum
-$FGREP 'FAIL: test' faildeja.sum
+$FGREP 'FAIL: failing_deja_test' faildeja.sum
+
+:
#! /bin/sh
echo whatever
END
-
chmod +x failtcl
-echo AC_OUTPUT >> configure.in
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = dejagnu
-
DEJATOOL = failtcl
-
AM_RUNTESTFLAGS = --status FAILTCL=$(srcdir)/failtcl
END
mkdir failtcl.test
-
cat > failtcl.test/failtcl.exp << 'END'
set test test
spawn $FAILTCL
test -f failtcl.log
test -f failtcl.sum
$FGREP 'missing close-brace' failtcl.sum
+
+:
#! /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
+set -e
+
rm -f configure.in
mkdir config
for i in *; do
- if test $i != "config"; then
- mv $i config
+ if test "$i" != "config"; then
+ mv -f "$i" config
fi
done
-cat > configure.in << 'END'
-AC_INIT(subdir/foo.c)
-AC_CONFIG_AUX_DIR(config)
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat > configure.in << END
+AC_INIT([$me], [1.0])
+AC_CONFIG_AUX_DIR([config])
+AM_INIT_AUTOMAKE
AC_PROG_CC
-AC_OUTPUT(subdir/Makefile Makefile)
+AC_CONFIG_FILES([subdir/Makefile Makefile])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
SUBDIRS = subdir
+check-local: test1 test2
+.PHONY: test1 test2
+test1:
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]config/depcomp '
+test2: distdir
+ ls -l $(distdir)/*
+ test -f $(distdir)/config/depcomp
END
mkdir subdir
-: > subdir/foo.c
+cat > subdir/foo.c << 'END'
+int main(void)
+{
+ return 0;
+}
+END
cat > subdir/Makefile.am << 'END'
bin_PROGRAMS = foo
foo_SOURCES = foo.c
END
-set -e
-
$ACLOCAL
-$AUTOMAKE --add-missing
$AUTOCONF
-grep config/depcomp Makefile.in
+$AUTOMAKE --add-missing
+
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AC_PROG_CC
grep 'automatically discovered.*fsusage\.c.*explicitly mentioned' stderr
-Exit 0
+:
$ACLOCAL
AUTOMAKE_fails --add-missing subdir/Makefile
-grep 'full run' stderr
+grep 'without.*Makefile.*arguments' stderr
:
# containing a `$' on the left hand side of an assignment are not
# portable in practice, even though POSIX allows them. :-/
-. ./defs
+. ./defs || Exit 1
set -e
# Test to make sure that -Wportability turns on portability-recursive,
# likewise for -Wno-...
-. ./defs
+. ./defs || Exit 1
set -e
--- /dev/null
+#! /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
--- /dev/null
+#!/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
--- /dev/null
+#! /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 EXTRA_*_DEPENDENCIES. See extradep2 for libtool variant.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_SUBST([deps], [bardep])
+AM_CONDITIONAL([COND], [test -n "$cond"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libfoo.a
+EXTRA_libfoo_a_DEPENDENCIES = libfoodep
+libfoodep:
+ @echo making $@
+ @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = foo bar
+EXTRA_foo_DEPENDENCIES = foodep
+if COND
+EXTRA_foo_DEPENDENCIES += foodep2
+endif
+bar_LDADD = libfoo.a
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = foodep bardep
+
+bar-is-newer-than-libfoo.a:
+ test `ls -1t bar$(EXEEXT) libfoo.a | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >foo.c <<'END'
+int main () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure cond=yes
+
+# hypotheses:
+# EXTRA_*_DEPENDENCIES are honored.
+# conditionals and substitutions are honored.
+# *_DEPENDENCIES are not overwritten by their EXTRA_* counterparts.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f foodep
+$MAKE && Exit 1
+: >foodep
+
+rm -f foodep2
+$MAKE && Exit 1
+: >foodep2
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+$sleep
+touch libfoo.a
+$MAKE
+$MAKE bar-is-newer-than-libfoo.a
+
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 EXTRA_*_DEPENDENCIES, libtool version; see extradep.test.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_SUBST([deps], [bardep])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LTLIBRARIES = libfoo.la
+EXTRA_libfoo_la_DEPENDENCIES = libfoodep
+libfoodep:
+ @echo making $@
+ @: > $@
+CLEANFILES = libfoodep
+
+bin_PROGRAMS = bar
+bar_LDADD = libfoo.la
+EXTRA_bar_DEPENDENCIES = $(deps)
+
+EXTRA_DIST = bardep
+
+bar-is-newer-than-libfoo.la:
+ test `ls -1t bar$(EXEEXT) libfoo.la | sed q` = bar$(EXEEXT)
+END
+
+cat >libfoo.c <<'END'
+int libfoo () { return 0; }
+END
+
+cat >bar.c <<'END'
+extern int libfoo ();
+int main () { return libfoo (); }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+./configure
+
+# hypothesis: EXTRA_*_DEPENDENCIES are honored.
+
+: >foodep
+: >foodep2
+: >bardep
+$MAKE >stdout || { cat stdout; Exit 1; }
+cat stdout
+grep 'making libfoodep' stdout
+
+rm -f bardep
+$MAKE && Exit 1
+: >bardep
+
+$MAKE
+$sleep
+touch libfoo.la
+$MAKE
+$MAKE bar-is-newer-than-libfoo.la
+
+$MAKE distcheck
+
+:
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^x/y/convert' Makefile.in
+
+:
#! /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
+set -e
+
cat >> configure.in << 'END'
-_AM_DEPENDENCIES(GCJ)
-AC_SUBST(GCJ)
+_AM_DEPENDENCIES([GCJ])
+AC_SUBST([GCJ])
END
cat > Makefile.am << 'END'
convert_SOURCES = x/y/convert.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
num=`grep depcomp Makefile.in | wc -l`
test $num -gt 1
+
+:
|| 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/
+ '
}
#! /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 68.
+#
+# == Report ==
+# If an autoconf substitution variable of the form "*_HEADERS" --
+# for example "MY_HEADERS" -- is used in an "include_" variable
+# in conjunction with EXTRA_HEADERS, $(MY_HEADERS) gets included
+# in the HEADERS variable for *all* generated Makefile.ins in the
+# project.
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(MY_HEADERS)
+AC_SUBST([MY_HEADERS])
AC_PROG_CC
END
: > joe.c
: > qq.h
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^@]MY_HEADERS' Makefile.in && Exit 1
Exit 0
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-$FGREP ' --enable-dependency-tracking ' stdout
-$FGREP ' --disable-dependency-tracking ' stdout
-$FGREP ' one-time build' stdout
+$EGREP '^ *--enable-dependency-tracking( |$)' stdout
+$EGREP '^ *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
$FGREP ' slow dependency extract' stdout
:
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-$FGREP ' --enable-dependency-tracking ' stdout
-$FGREP ' --disable-dependency-tracking ' stdout
-$FGREP ' one-time build' stdout
+$EGREP '^ *--enable-dependency-tracking( |$)' stdout
+$EGREP '^ *--disable-dependency-tracking( |$)' stdout
+$FGREP ' speeds up one-time build' stdout
$FGREP ' slow dependency extract' stdout
:
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-$FGREP ' --with-dmalloc ' stdout
+$EGREP '^ *--with-dmalloc( |$) ' stdout
$FGREP ' use dmalloc' stdout
$FGREP 'www.dmalloc.com' stdout
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' --program-prefix[= ]' stdout
-grep ' --program-suffix[= ]' stdout
-grep ' --program-transform-name[= ]' stdout
+grep '^ *--program-prefix[= ]' stdout
+grep '^ *--program-suffix[= ]' stdout
+grep '^ *--program-transform-name[= ]' stdout
:
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' --with-lispdir .*override.*lisp directory' stdout
-grep ' EMACS .*[eE]macs editor' stdout
-grep ' EMACSLOADPATH' stdout
+$EGREP '^ *--with-lispdir( |$)' stdout
+grep ' override.*lisp directory' stdout
+$EGREP '^ *EMACS( |$)' stdout
+grep ' .*[eE]macs editor' stdout
+$EGREP '^ *EMACSLOADPATH( |$)' stdout
grep ' .*[eE]macs library search path' stdout
:
$AUTOCONF --force
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' --enable-maintainer-mode.*enable make rules' stdout
+$EGREP '^ *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
rm -rf autom4te*.cache # just to be sure
sed 's/\(AM_MAINTAINER_MODE\).*/\1([disable])/' configure.in >t
$AUTOCONF --force
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' --enable-maintainer-mode.*enable make rules' stdout
+$EGREP '^ *--enable-maintainer-mode( |$)' stdout
+$FGREP ' enable make rules' stdout
rm -rf autom4te*.cache # just to be sure
sed 's/\(AM_MAINTAINER_MODE\).*/\1([enable])/' configure.in >t
$AUTOCONF --force
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' --disable-maintainer-mode.*disable make rules' stdout
+$EGREP '^ *--disable-maintainer-mode( |$)' stdout
+$FGREP ' disable make rules' stdout
:
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-$FGREP ' --enable-multilib ' stdout
+$EGREP '^ *--enable-multilib( |$)' stdout
$FGREP ' many library versions (default)' stdout
:
$AUTOCONF --force
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
- grep ' --enable-silent-rules *less verbose build.*undo.*make V=1' stdout
- grep ' --disable-silent-rules *verbose build.*undo.*make V=0' stdout
+ $EGREP '^ *--enable-silent-rules( |$)' stdout
+ grep ' less verbose build.*undo.*make V=1' stdout
+ $EGREP '^ *--disable-silent-rules ( |$)' stdout
+ grep ' verbose build.*undo.*make V=0' stdout
done
:
./configure --help >stdout || { cat stdout; Exit 1; }
cat stdout
-grep ' UPCFLAGS .*Unified Parallel C compiler flags' stdout
-grep ' UPC .*Unified Parallel C compiler command' stdout
+grep '^ *UPCFLAGS .*Unified Parallel C compiler flags' stdout
+grep '^ *UPC .*Unified Parallel C compiler command' stdout
:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Make sure --help and --version work, even when the current directory
-# contains a broken configure.in.
+# contains a broken configure.in and a broken acinclude.m4.
. ./defs || Exit 1
set -e
AUTOMAKE=`echo " $AUTOMAKE " | sed 's/ -W[^ ]*/ /g'`
echo '[' > configure.in
+echo '[' > acinclude.m4
$AUTOMAKE --version
$AUTOMAKE --help
+$ACLOCAL --version
+$ACLOCAL --help
+
+# Sanity check: aclocal cannot work with broken acinclude.m4.
+$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+$FGREP acinclude.m4 stderr
+
+rm -f acinclude.m4
# Sanity checks: aclocal and automake cannot work with broken configure.in.
$ACLOCAL 2>stderr && { cat stderr >&2; Exit 1; }
# 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 --help and --version work, even when no configure.ac
-# is in the current directory.
+# Check that the first among --help and --version to be specified on
+# the command line takes precedence over the following one.
. ./defs || Exit 1
# Darwin).
# Report from Peter O'Gorman.
-. ./defs
+. ./defs || Exit 1
set -e
echo AC_OUTPUT >>configure.in
#! /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
noinst_PROGRAMS = libapp_1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^libapp_1_OBJECTS' Makefile.in | $FGREP '.$(OBJEXT)'
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 2001, 2002, 2005, 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
-echo AC_OUTPUT >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
cat > Makefile.am << 'END'
-include foo
+include Will_Be_Included_In_Makefile
END
-: > foo
+: > Will_Be_Included_In_Makefile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-len="`grep '^srcdir' Makefile.in | wc -l`"
-echo "len = $len"
-test $len -eq 1 || Exit 1
+$ACLOCAL
+$AUTOMAKE
+len=`grep '^srcdir' Makefile.in | wc -l`
+test $len -eq 1
# Also make sure include file is distributed.
-(sed -n -e '/^DIST_COMMON =.*\\$/ {
+sed -n -e '/^DIST_COMMON =.*\\$/ {
:loop
p
n
t loop
p
n
- }' -e '/^DIST_COMMON =/ p' Makefile.in | grep foo)
+ }' -e '/^DIST_COMMON =/ p' Makefile.in | grep Will_Be_Included_In_Makefile
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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 to make sure info files are distributed correctly.
+# FIXME: This test is probably obsoleted, or wrong. The generated
+# Makefile.in seems not to define any `INFOS' variable!
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
info_TEXINFOS = foo.texi
-
-magic:
- @echo $(INFOS)
END
echo '@setfilename foo.info' > foo.texi
: > texinfo.tex
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
for i in `grep '^INFOS =' Makefile.in | sed -e 's/^INFOS = //'`; do
echo $i
;;
esac
done
+
+:
#! /bin/sh
-# Copyright (C) 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2006, 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
# 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 we give a sensible error message when neither AC_INIT nor
-# AM_INIT_AUTOMAKE are given arguments.
+# Make sure we give a sensible error message when AC_INIT and
+# AM_INIT_AUTOMAKE are both given less than two arguments.
. ./defs || Exit 1
set -e
-cat >configure.in <<END
-AC_INIT
-AM_INIT_AUTOMAKE
+for ac_init_args in '' '([x])'; do
+ for am_init_args in '' '([1.10])'; do
+ rm -rf aclocal.m4 autom4te*.cache
+ cat >configure.in <<END
+AC_INIT$ac_init_args
+AM_INIT_AUTOMAKE$am_init_args
END
+ cat configure.in # might be useful for debugging
+ # The error message should mention AC_INIT, not AC_PACKAGE_VERSION.
+ ($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
+ cat stderr >&2
+ $FGREP AC_PACKAGE_VERSION stderr && Exit 1
+ grep 'configure\.in:.* AC_INIT .*arguments' stderr
+ done
+done
-# The error message should mension AC_INIT, not AC_PACKAGE_VERSION.
-($ACLOCAL && $AUTOCONF) 2>stderr && { cat stderr >&2; Exit 1; }
-cat stderr >&2
-grep AC_PACKAGE_VERSION stderr && Exit 1
-grep AC_INIT stderr
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
pkgdata_DATA =
magic:
@echo $(DISTFILES)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
$MAKE -s -f Makefile.sed SHELL=$SHELL magic | grep install-sh
+
+:
#! /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
. ./defs || Exit 1
-echo 'AC_SUBST(INSTALL_DATA)' >> configure.in
+set -e
+
+cat >> configure.in <<END
+AC_SUBST([INSTALL_DATA])
+END
: > Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-(grep '^DATA =' Makefile.in | grep INSTALL_DATA) && Exit 1
+grep '^DATA =' Makefile.in | grep 'INSTALL_DATA' && Exit 1
Exit 0
#! /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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'EOF'
man8_MANS = frob.8
EOF
: > frob.8
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install-man' Makefile.in
+
+:
--- /dev/null
+#! /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/>.
+
+#
+# Driver script to generate and run tests checking that building from,
+# or installing to, directories with shell metacharacters succeed.
+#
+# Original report from James Amundson about file names with spaces.
+# Other characters added by Paul Eggert.
+#
+# This script fulfills a double role:
+# 1. It generates a Makefile.am snippet, containing the definition
+# of proper lists of tests.
+# 2. It is sourced by said generated tests with proper parameters
+# pre-set, to run the "meat" of the checks.
+# This setup might seem tricky and over-engineered abuse, but past
+# (painful) experiences showed that it is indeed required, because
+# the test generation code and test execution code tend to be
+# inextricably coupled and intertwined.
+#
+
+# Be more Bourne compatible (snippet copied from `tests/defs.in').
+DUALCASE=1; export DUALCASE # for MKS sh
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+ # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
+ # is contrary to our usage. Disable this feature.
+ alias -g '${1+"$@"}'='"$@"'
+ setopt NO_GLOB_SUBST
+else
+ case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac
+fi
+
+set -e
+
+# Sanity and usage checks.
+if test x"$instspc_action" = x; then
+ if test "$#,$1" = "1,--generate-makefile"; then
+ instspc_action=generate-makefile
+ else
+ echo "$0: empty action and no proper command line" >&2
+ exit 99
+ fi
+elif test $# -gt 0; then
+ echo "$0: action specified and command line arguments used" >&2
+ exit 99
+elif test x"$instspc_action" = x"generate-makefile"; then
+ :
+else
+ case $instspc_action in
+ test-build|test-install)
+ if test x"$instspc_test_name" = x; then
+ echo "$0: test name undefined for action '$instspc_action'" >&2
+ exit 99
+ fi;;
+ *)
+ echo "$0: invalid action: '$instspc_action'"
+ exit 99;;
+ esac
+fi
+
+# Helper subroutine for test data definition.
+# Usage: define_problematic_string NAME STRING
+define_problematic_string ()
+{
+ tst=$1
+ shift
+ eval "instspc__$tst=\$1" || exit 99
+ shift
+ instspc_names_list="$instspc_names_list $tst"
+ # Some of the "problematic" characters cannot be used in the name of
+ # a build or install directory on a POSIX host. These lists should
+ # be empty, but are not due to limitations in Autoconf, Automake, Make,
+ # M4, or the shell.
+ case " $* " in *' fail-build '*|*' build-fail '*)
+ instspc_xfail_builds_list="$instspc_xfail_builds_list $tst";;
+ esac
+ case " $* " in *' fail-install '*|*' install-fail '*)
+ instspc_xfail_installs_list="$instspc_xfail_installs_list $tst";;
+ esac
+}
+
+# Be sure to avoid interferences from the environment.
+instspc_names_list=''
+instspc_xfail_builds_list=''
+instspc_xfail_installs_list=''
+
+
+# ================= #
+# Test data begin #
+# ----------------- #
+
+# Some control characters that are white space.
+bs='\b' # back space
+cr='\r' # carriage return
+ff='\f' # form feed
+ht=' ' # horizontal tab
+lf='
+' # line feed (aka newline)
+
+# Hack to save typing and make code visually clearer.
+def=define_problematic_string
+
+$def squote \' fail-build fail-install
+$def dquote '"' fail-build fail-install
+$def bquote '`' fail-build fail-install
+$def sharp '#' fail-build fail-install
+$def dollar '$' fail-build fail-install
+$def bang '!'
+$def bslash '\' fail-build
+$def ampersand '&' fail-build
+$def percent '%'
+$def leftpar '('
+$def rightpar ')'
+$def pipe '|'
+$def caret '^'
+$def tilde '~'
+$def qmark '?'
+$def star '*'
+$def plus '+'
+$def minus '-'
+$def comma ','
+$def colon ':'
+$def semicol ';'
+$def equal '='
+$def less '<'
+$def more '>'
+$def at '@'
+$def lqbrack '['
+$def rqbrack ']'
+$def lcbrack '{'
+$def rcbrack '}'
+$def space ' '
+$def tab "$ht"
+$def linefeed "$lf" fail-build fail-install
+$def backspace "$bs"
+$def formfeed "$ff"
+$def carriageret "$cr"
+$def quadrigraph0 '@&t@' fail-build
+$def quadrigraph1 '@<:@'
+$def quadrigraph2 '@:>@'
+$def quadrigraph3 '@S|@'
+$def quadrigraph4 '@%:@'
+$def a_b 'a b'
+$def a__b 'a b'
+$def a_lf_b "a${lf}b" fail-build fail-install
+$def dotdotdot '...'
+$def dosdrive 'a:'
+$def miscglob1 '?[a-z]*'
+$def miscglob2 '.*?[0-9]'
+
+unset def
+
+# --------------- #
+# Test data end #
+# =============== #
+
+
+if test x"$instspc_action" = x"generate-makefile"; then
+ # We must generate a makefile fragment on stdout. It must refer
+ # to all tests at once, hence the loop below.
+ echo '## Generated by instspc-tests.sh. DO NOT EDIT!'
+ echo 'instspc_tests ='
+ echo 'instspc_xfail_tests ='
+ for test_name in $instspc_names_list; do
+ echo "instspc_tests += instspc-$test_name-build.test"
+ echo "instspc_tests += instspc-$test_name-install.test"
+ done
+ for test_name in $instspc_xfail_builds_list; do
+ echo "instspc_xfail_tests += instspc-$test_name-build.test"
+ done
+ for test_name in $instspc_xfail_installs_list; do
+ echo "instspc_xfail_tests += instspc-$test_name-install.test"
+ done
+ exit 0
+fi
+
+### If we are still here, we have to run a test ...
+
+# We'll need the full setup provided by `tests/defs'. Temporarly disable
+# the errexit flag, since the setup code might not be prepared to deal
+# with it.
+set +e
+. ./defs || Exit 99
+set -e
+
+eval "instspc_test_string=\${instspc__$instspc_test_name}" || Exit 99
+if test x"$instspc_test_string" = x; then
+ echo "$me: invalid test name: '$instspc_test_name'" >&2
+ Exit 99
+fi
+
+# Skip if this system doesn't support these characters in file names.
+mkdir "./$instspc_test_string" || Exit 77
+
+mkdir sub sub1
+
+cat >> configure.in << 'EOF'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+EOF
+
+: > sub/base.h
+: > sub/nobase.h
+: > sub/base.dat
+: > sub/nobase.dat
+: > sub/base.sh
+: > sub/nobase.sh
+
+cat > source.c << 'EOF'
+int
+main (int argc, char **argv)
+{
+ return 0;
+}
+EOF
+cp source.c source2.c
+
+cat > Makefile.am << 'EOF'
+foodir = $(prefix)/foo
+fooexecdir = $(prefix)/foo
+
+foo_HEADERS = sub/base.h
+nobase_foo_HEADERS = sub/nobase.h
+
+dist_foo_DATA = sub/base.dat
+nobase_dist_foo_DATA = sub/nobase.dat
+
+dist_fooexec_SCRIPTS = sub/base.sh
+nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
+
+fooexec_PROGRAMS = sub/base
+nobase_fooexec_PROGRAMS = sub/nobase
+sub_base_SOURCES = source.c
+sub_nobase_SOURCES = source.c
+
+fooexec_LIBRARIES = sub/libbase.a
+nobase_fooexec_LIBRARIES = sub/libnobase.a
+sub_libbase_a_SOURCES = source.c
+sub_libnobase_a_SOURCES = source.c
+
+.PHONY: test-install-sep
+test-install-sep: install
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
+ test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
+ test -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
+EOF
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+case $instspc_action in
+ test-build)
+ build=$instspc_test_string
+ dest=`pwd`/sub1
+ ;;
+ test-install)
+ build=sub1
+ dest=`pwd`/$instspc_test_string
+ ;;
+ *)
+ echo "$me: internal error: invalid action '$instspc_action'"
+ Exit 99
+ ;;
+esac
+
+cd "./$build"
+
+../configure --prefix "/$instspc_test_string-prefix"
+$MAKE
+DESTDIR="$dest" file="$instspc_test_string" $MAKE -e test-install-sep
+
+:
+++ /dev/null
-#! /bin/sh
-# Copyright (C) 2004, 2005 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 that installation to directory with shell metacharacters succeed.
-# Original report from James Amundson about file names with spaces.
-# Other characters added by Paul Eggert.
-
-# This is mostly the same input as nobase.test, but we do not use
-# libtool libraries, because Libtool does not preserve space in
-# file names (Issue observed with ltmain.sh (GNU libtool) 1.5a (1.1323
-# 2003/11/10 21:06:47))
-
-
-required='gcc'
-. ./defs || Exit 1
-
-set -e
-
-# Set up files that won't change each time through the loop.
-
-cat >> configure.in <<'EOF'
-AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT
-EOF
-
-mkdir sub
-
-: > sub/base.h
-: > sub/nobase.h
-: > sub/base.dat
-: > sub/nobase.dat
-: > sub/base.sh
-: > sub/nobase.sh
-
-cat >source.c <<'EOF'
-int
-main (int argc, char **argv)
-{
- return 0;
-}
-EOF
-cp source.c source2.c
-
-cat > Makefile.am << 'EOF'
-foodir = $(prefix)/foo
-fooexecdir = $(prefix)/foo
-
-foo_HEADERS = sub/base.h
-nobase_foo_HEADERS = sub/nobase.h
-
-dist_foo_DATA = sub/base.dat
-nobase_dist_foo_DATA = sub/nobase.dat
-
-dist_fooexec_SCRIPTS = sub/base.sh
-nobase_dist_fooexec_SCRIPTS = sub/nobase.sh
-
-fooexec_PROGRAMS = sub/base
-nobase_fooexec_PROGRAMS = sub/nobase
-sub_base_SOURCES = source.c
-sub_nobase_SOURCES = source.c
-
-fooexec_LIBRARIES = sub/libbase.a
-nobase_fooexec_LIBRARIES = sub/libnobase.a
-sub_libbase_a_SOURCES = source.c
-sub_libnobase_a_SOURCES = source.c
-
-test-install-sep: install
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.h'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.h'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.h'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.dat'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.dat'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.dat'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase.sh'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase.sh'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base.sh'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/nobase$(EXEEXT)'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/nobase$(EXEEXT)'
- test -f '$(DESTDIR)/$(file)-prefix/foo/base$(EXEEXT)'
- test -f '$(DESTDIR)/$(file)-prefix/foo/sub/libnobase.a'
- test ! -f '$(DESTDIR)/$(file)-prefix/foo/libnobase.a'
- test -f '$(DESTDIR)/$(file)-prefix/foo/libbase.a'
-EOF
-
-$ACLOCAL
-$AUTOCONF
-$AUTOMAKE -a
-
-# Some control characters that are white space:
-# back space, carriage return, form feed, horizontal tab, line feed, space
-bs='\b'
-cr='\r'
-ff='\f'
-ht=' '
-lf='
-'
-sp=' '
-
-build_failures=
-install_failures=
-
-for file in \
- '!' '"' '#' '$' '%' '&' \' '(' ')' '*' '+' ',' '-' ':' ';' \
- '<' '=' '>' '?' '@' '[' '\' ']' '^' '`' '{' '|' '}' '~' \
- "$bs" "$cr" "$ff" "$ht" "$lf" "$sp" \
- '@<:@' '@:>@' '@S|@' '@%:@' '@&t@' \
- "a${sp}b" "a${sp}${sp}b" "a${lf}b" ... a:
-do
- for test in build install; do
- case $test in
- build)
- build=$file
- dest=`pwd`/sub1;;
- install)
- build=sub1
- dest=`pwd`/$file;;
- esac
-
- # Make sure this system supports this character in file names.
- mkdir sub1 "./$file" || Exit 77
-
- cd "$build"
-
- ../configure --prefix "/$file-prefix" &&
- $MAKE &&
- DESTDIR=$dest file=$file $MAKE -e test-install-sep ||
- eval "${test}_failures=\"\$${test}_failures$lf\$file\""
-
- cd ..
-
- rm -fr sub1 "./$file"
- done
-done
-
-# The list of the above file names that cannot be used as a build directory
-# on a POSIX host. This list should be empty, but is not due to limitations
-# in Autoconf, Automake, Make, M4, or the shell.
-expected_build_failures='
-"
-#
-$
-&
-'\''
-\
-`
-'"$lf"'
-@&t@
-a'"${lf}"'b'
-
-# Similarly, the list of file names that cannot be used as an install directory
-# on a POSIX host. This list should also be empty.
-expected_install_failures='
-"
-#
-$
-'\''
-`
-'"$lf"'
-a'"${lf}"'b'
-
-fail=0
-for test in build install; do
- eval failures=\$${test}_failures
- case $failures in
- ?*)
- cat >&2 <<EOF
-$0: $test test failed for the following file names:$failures
-EOF
- eval test \"\$failures\" = \"\$expected_${test}_failures\" || fail=1
- esac
-done
-
-Exit $fail
#! /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
qqq_SOURCES = $(s1)
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP 'z.$(OBJEXT)' Makefile.in
+
+:
#! /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
AC_PATH_X
x_LDADD = $(X_EXTRA_LIBS)
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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
. ./defs || Exit 1
-echo 'AC_SUBST(JAVA)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVA])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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
. ./defs || Exit 1
-echo 'AC_SUBST(JAVAC)' >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_SUBST([JAVAC])
+END
cat > Makefile.am << 'END'
javadir = $(datadir)/java
java_JAVA = a.java b.java c.java
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'JAVAC.*@JAVAC@' Makefile.in
+
+:
#! /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
# Check for LDFLAGS in conditional.
# PR 77.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
AC_SUBST([LTLIBOBJS], [q.o])
-AM_CONDITIONAL(USE_SWIG, :)
+AM_CONDITIONAL([USE_SWIG], [:])
AC_OUTPUT
END
: > config.sub
: > q.c
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
LDADD = @LEXLIB@
END
-: > joe.l
-
$ACLOCAL
$AUTOMAKE -a
-
# Test to make sure that lex source generates correct target.
-
$FGREP '$(LEX)' Makefile.in
# Test to make sure that lex source generates correct clean rule.
# From Ralf Corsepius.
-
$FGREP joel Makefile.in && Exit 1
:
zot_SOURCES = joe.l
END
-: > joe.l
-
$ACLOCAL
-AUTOMAKE_fails
-grep AM_PROG_LEX stderr
+AUTOMAKE_fails -a
+grep 'LEX.* undefined' stderr
+grep 'add .*AM_PROG_LEX' stderr
+
+:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+# Basic semantic checks on Lex support.
# Test associated with PR 19.
# From Matthew D. Langston.
required='gcc flex GNUmake'
. ./defs || Exit 1
+set -e
+
# Ignore user CFLAGS.
CFLAGS=
export CFLAGS
-cat > configure.in << 'END'
-AC_INIT
-dnl Prevent automake from looking in .. and ../..
-AC_CONFIG_AUX_DIR(.)
-AM_INIT_AUTOMAKE(am_lex_bug, 0.1.1)
+distdir=$me-1.0
-dnl Checks for programs.
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_LEX
-AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
cat > foo.l << 'END'
%%
-"END" return EOF;
+"GOOD" return EOF;
.
%%
int
main ()
{
- while (yylex () != EOF)
- ;
-
- return 0;
+ /* We don't use a 'while' loop here (like a real lexer would do)
+ to avoid possible hangs. */
+ if (yylex () == EOF)
+ return 0;
+ else
+ return 1;
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
+
./configure
+
+# Program should build and run.
$MAKE
-echo 'This is the END' | ./foo
-$MAKE distcheck
+echo GOOD | ./foo
+echo BAD | ./foo && Exit 1
+
+# The generated file `foo.c' must be shipped.
+$MAKE distdir
+test -f $distdir/foo.c
-# foo.c must be shipped.
-gunzip am_lex_bug-0.1.1.tar.gz
-tar tf am_lex_bug-0.1.1.tar | $FGREP foo.c
+# Sanity check on distribution.
+$MAKE distcheck
# While we are at it, make sure that foo.c is erased by
# maintainer-clean, and not by distclean.
test -f foo.c
$MAKE distclean
test -f foo.c
-./configure
+./configure # we must re-create `Makefile'
$MAKE maintainer-clean
test ! -f foo.c
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
zoo_SOURCES = joe.ll
END
-: > joe.ll
-
$ACLOCAL
$AUTOMAKE -a
$FGREP joe.Po Makefile.in
+
+:
set -e
-cat > configure.in << 'END'
-AC_INIT([lex5], [1.0])
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AM_PROG_LEX
}
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
test -f foo/foo2.c
test -f foo/foo2.o
-Exit 0
+:
--- /dev/null
+#! /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 Lex + C++ is supported.
+# Please keep this is sync with sister test yaccpp.test.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CXX
+AC_PROG_LEX
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo bar baz qux
+foo_SOURCES = foo.l++
+bar_SOURCES = bar.lpp
+baz_SOURCES = baz.ll
+qux_SOURCES = qux.lxx
+END
+
+$ACLOCAL
+$AUTOMAKE -a
+
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+$FGREP ' foo.c++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' qux.cxx ' mk
+
+:
--- /dev/null
+#! /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/>.
+
+# This test checks that dependent files are updated before including
+# in the distribution. `lexer.c' depends on `lexer.l'. The latter is
+# updated so that `lexer.c' should be rebuild. Then we are running
+# `make' and `make distdir' and check whether the version of `lexer.c'
+# to be distributed is up to date.
+
+# Please keep this in sync with sister test `yaccvapth.test'.
+
+required='gcc flex'
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-1.0
+
+cat > lexoutroot.in << 'END'
+LEX_OUTPUT_ROOT='@LEX_OUTPUT_ROOT@'
+END
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([lexoutroot])
+AC_PROG_CC
+AC_PROG_LEX
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = lexer.l foo.c
+LDADD = $(LEXLIB)
+END
+
+# Original lexer, with a "foobar" comment
+cat > lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*foobar*/
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+mkdir sub
+
+# We must run configure early, to find out whay $LEX_OUTPUT_ROOT is.
+cd sub
+../configure
+. ./lexoutroot
+test -n "$LEX_OUTPUT_ROOT" # sanity check
+cd ..
+
+flex lexer.l
+mv "$LEX_OUTPUT_ROOT".c lexer.c
+
+cd sub
+
+# Ensure that lexer.l will be newer than lexer.c.
+$sleep
+
+# New lexer, with `fubar' comment.
+cat > ../lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*fubar*/
+END
+
+$MAKE
+$MAKE distdir
+$FGREP '/*fubar*/' $distdir/lexer.c
+
+#
+# Now check to make sure that `make dist' will rebuilt the parser.
+#
+
+# Ensure that lexer.l will be newer than lexer.c.
+$sleep
+
+# New lexer, with `maude' comment.
+cat > ../lexer.l << 'END'
+%%
+"END" return EOF;
+.
+%%
+/*maude*/
+END
+
+$MAKE distdir
+$FGREP '/*maude*/' $distdir/lexer.c
+
+:
--- /dev/null
+#! /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 AC_LIBSOURCE and AC_LIBSOURCES work.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES = foo.c
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist:
+ test -d $(distdir)
+ test ! -r $(distdir)/liver.c
+maude-not-dist:
+ test -d $(distdir)
+ test ! -r $(distdir)/maude.c
+END
+
+cat > foo.c << 'END'
+extern int dummy_foo;
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+# AC_LIBSOURCE should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCE([maude.c])
+END
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+$MAKE distclean
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+END
+
+# AC_LIBSOURCES should work also if called after AC_OUTPUT.
+cat configure.proto - > configure.in <<END
+AC_LIBSOURCES([maude.c, liver.c])
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+
+$MAKE check
+$MAKE distcheck
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
cat > Makefile.am << 'END'
noinst_LIBRARIES = libfoo.a
-libfoo_a_LIBADD = @LIBOBJS@
+libfoo_a_SOURCES =
+libfoo_a_LIBADD = $(LIBOBJS)
+BUILT_SOURCES = foo.c
+CLEANFILES = foo.c
+foo.c:
+ echo 'extern int dummy;' > $@
END
$ACLOCAL
-AUTOMAKE_fails
-grep 'Makefile.am:2:.*foo\.c' stderr
+$AUTOCONF
+$AUTOMAKE
-echo 'BUILT_SOURCES = foo.c' >> Makefile.am
+./configure
-$AUTOMAKE
+$MAKE
+ar t libfoo.a # for debugging
+$MAKE distcheck
+
+:
#! /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
# 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 if a file can be mentioned in LIBOBJS and explicitly.
# (See libobj13.test for the LTLIBRARIES check.)
. ./defs || Exit 1
+
set -e
cat >> configure.in << 'END'
: > bar.c
$ACLOCAL
-$AUTOMAKE
# This however should be diagnosed, since foo.c and bar.c are in @LIBOBJS@.
-echo 'libfoo_a_SOURCES += foo.c' >> Makefile.am
-echo 'p1_SOURCES += bar.c' >> Makefile.am
+cat >> Makefile.am << 'END'
+libfoo_a_SOURCES += foo.c
+p1_SOURCES += bar.c
+END
+
AUTOMAKE_fails
-$FGREP foo.c stderr
-$FGREP bar.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+grep 'bar\.c.*explicitly mentioned' stderr
# Global `LDADD' can also come into play.
cat > Makefile.am << 'END'
noinst_PROGRAMS = a b
LDADD = @LIBOBJS@
END
+
$AUTOMAKE
grep 'a_DEPENDENCIES.*LIBOBJS' Makefile.in
-echo 'a_SOURCES = foo.c' >> Makefile.am
+
+cat >> Makefile.am << 'END'
+a_SOURCES = foo.c
+END
AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
#! /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
# 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 if a file can be mentioned in LTLIBOBJS and explicitly.
# (Like libobj12.test, but for Libtool libraries.)
required='libtoolize'
. ./defs || Exit 1
+
set -e
cat >> configure.in << 'END'
# This however should be diagnosed, since foo.c is in @LIBOBJS@.
echo 'libfoo_la_SOURCES += foo.c' >> Makefile.am
AUTOMAKE_fails
-$FGREP foo.c stderr
+grep 'foo\.c.*explicitly mentioned' stderr
+
+:
# Report from Bill Davidson
required=gcc
-. ./defs
+. ./defs || Exit 1
set -e
cat >>configure.in <<'EOF'
AC_PROG_CC
AC_LIBSOURCE([bar.c])
-AM_CONDITIONAL([CASE], :)
+AM_CONDITIONAL([CASE], [:])
AC_OUTPUT
EOF
$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 2002, 2008 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/>.
-# AC_LIBOBJ must allow [] around its argument.
+# Nonexistent sources for AC_LIBOBJ should cause an Automake failure.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
-AC_LIBOBJ([mountlist])
-AC_OUTPUT(Makefile)
+AC_LIBOBJ([foobar])
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
END
-: > mountlist.c
+$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2008 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/>.
-# Make sure AC_LIBOBJ and friends work.
+# Nonexistent source for AC_LIBSOURCE should cause Automake to fail.
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
AC_OUTPUT
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
-libtu_a_LIBADD = @LIBOBJS@
+libtu_a_LIBADD = $(LIBOBJS)
END
-: > maude.c
-: > liver.c
-
$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
-set -e
-
-cp configure.in X
-echo 'AC_LIBSOURCE(maude.c)' >> configure.in
-$AUTOMAKE
-
-# Avoid timestamp-related differences.
-rm -rf autom4te.cache
-
-cp X configure.in
-echo 'AC_LIBSOURCES([maude.c, liver.c])' >> configure.in
-$AUTOMAKE
+:
--- /dev/null
+#! /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/>.
+
+# Nonexistent sources for AC_LIBSOURCES should cause Automake to fail.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBSOURCES([foobar.c, bazquux.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*foobar\.c.*' stderr
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+
+: > foobar.c
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*bazquux\.c.*' stderr
+grep 'foobar\.c' stderr && Exit 1
+
+:
--- /dev/null
+#! /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 AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+ test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+ test ! -r $(distdir)/maude.c
+maude-lib:
+ $(AR) t libtu.a | grep maude
+maude-not-lib:
+ $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+ $(AR) t libtu.a | grep liver
+liver-not-lib:
+ $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ([maude])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+ AC_LIBOBJ([maude])\
+else\
+ AC_LIBOBJ([liver])\
+fi\
+AC_LIBSOURCES([maude.c, liver.c])
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
--- /dev/null
+#! /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 AC_LIBOBJ and friends work.
+# Please keep this in sync with sister test `libobj16b.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+mv configure.in configure.proto
+cat >> configure.proto << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+%LIBOBJ-STUFF% # will be activated later
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = @LIBOBJS@
+
+include extra-checks.am
+.PHONY: $(extra_checks) pre-test
+
+pre-test: distdir
+ ls -l $(srcdir) $(builddir) $(distdir)
+ $(AR) tv libtu.a
+$(extra_checks): pre-test
+check-local: $(extra_checks)
+
+maude-src:
+ grep dummy_maude $(srcdir)/maude.c
+maude-dist:
+ grep dummy_maude $(distdir)/maude.c
+liver-src:
+ grep dummy_liver $(srcdir)/liver.c
+liver-dist:
+ grep dummy_liver $(distdir)/liver.c
+liver-not-dist: distdir
+ test ! -r $(distdir)/liver.c
+maude-not-dist: distdir
+ test ! -r $(distdir)/maude.c
+maude-lib:
+ $(AR) t libtu.a | grep maude
+maude-not-lib:
+ $(AR) t libtu.a | grep maude && exit 1; exit 0
+liver-lib:
+ $(AR) t libtu.a | grep liver
+liver-not-lib:
+ $(AR) t libtu.a | grep liver && exit 1; exit 0
+END
+
+cat > maude.c << 'END'
+extern int dummy_maude;
+END
+
+cat > liver.c << 'END'
+extern int dummy_liver;
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AC_LIBOBJ(maude) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist maude-lib liver-not-dist
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+# Avoid timestamp-related differences.
+rm -rf autom4te*.cache
+
+cat > extra-checks.am << 'END'
+extra_checks = maude-src maude-dist liver-src liver-dist
+if MAUDE_COND
+extra_checks += maude-lib liver-not-lib
+else
+extra_checks += maude-not-lib liver-lib
+endif
+END
+
+sed '/%LIBOBJ-STUFF%/{
+s/.*//
+i\
+AM_CONDITIONAL([MAUDE_COND], [test x"$MAUDE" = x"yes"])\
+if test x"$MAUDE" = x"yes"; then\
+ AC_LIBOBJ(maude) dnl: do not quote this!\
+else\
+ AC_LIBOBJ(liver) dnl: do not quote this!\
+fi\
+AC_LIBSOURCE(maude.c) dnl: do not quote this!\
+AC_LIBSOURCE(liver.c) dnl: do not quote this!
+}' configure.proto > configure.in
+cat configure.in # for debugging
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure MAUDE=yes
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+./configure MAUDE=no
+$MAKE
+$MAKE check
+$MAKE distcheck
+$MAKE distclean
+
+:
--- /dev/null
+#! /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 AC_LIBOBJ accept non-literal arguments.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+foo=${FOO-oops}
+AC_LIBSOURCES([quux.c, zardoz.c])
+AC_LIBOBJ([$foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+cat > quux.c <<'END'
+extern int dummy;
+END
+
+cat > zardoz.c <<'END'
+extern int dummy;
+END
+
+# These might print warnings, but should not error out.
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure FOO=quux
+$MAKE
+ls -l # for debugging
+test -f libtu.a
+ar t libtu.a | $FGREP quux
+ar t libtu.a | $FGREP zardoz && Exit 1
+
+$MAKE distclean
+
+./configure FOO=zardoz
+$MAKE
+ls -l # for debugging
+test -f libtu.a
+ar t libtu.a | $FGREP zardoz
+ar t libtu.a | $FGREP quux && Exit 1
+
+:
--- /dev/null
+#! /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 AC_LIBSOURCE and AC_LIBSOURCES use arguments literally.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+foo=dummy bar=dummy baz=dummy
+AC_LIBSOURCE([$foo.c])
+AC_LIBSOURCES([$bar.c, $baz.c])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+: > dummy.c
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*\$foo\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$bar\.c.*not found' stderr
+grep 'configure\.in:.*required file.*\$baz\.c.*not found' stderr
+
+:
--- /dev/null
+#! /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 support for AC_CONFIG_LIBOBJ_DIR.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+check-local: distdir
+ ls -l $(srcdir)/* $(builddir)/* $(distdir)/*
+ test -f libtu.a
+ test ! -r $(srcdir)/foobar.c
+ test -f $(srcdir)/libobj-dir/foobar.c
+ test ! -r $(distdir)/foobar.c
+ test -f $(distdir)/libobj-dir/foobar.c
+ $(AR) t libtu.a
+ $(AR) t libtu.a | grep foobar
+END
+
+mkdir libobj-dir
+cat > libobj-dir/foobar.c << 'END'
+extern int dummy;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 1999, 2000, 2001, 2002
-# Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 1999, 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)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([subdir/Makefile])
AC_PROG_CC
AC_PROG_RANLIB
AC_LIBOBJ([fsusage])
-AC_OUTPUT(subdir/Makefile)
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+SUBDIRS = subdir
+check-local: distdir
+ ls -l $(srcdir) $(srcdir)/subdir
+ ls -l $(distdir) $(distdir)/subdir
+ ls -l $(builddir) $(builddir)/subdir
+ test -f $(srcdir)/subdir/fsusage.c
+ test -f $(distdir)/subdir/fsusage.c
+ $(AR) tv $(builddir)/subdir/libtu.a
END
mkdir subdir
libtu_a_LIBADD = @LIBOBJS@
END
-: > subdir/fsusage.c
+cat > subdir/fsusage.c << 'END'
+extern int dummy;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# Older grepping check, kept "just to be sure".
+$FGREP 'fsusage.c' subdir/Makefile.in
+
+./configure
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$MAKE check
+$MAKE distcheck
-grep 'fsusage\.c' subdir/Makefile.in
+:
--- /dev/null
+#! /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 error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20b.test' and `libobj20c.test' .
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foo])
+END
+
+cat > Makefile.am << 'END'
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+mkdir libobj-dir
+: > libobj-dir/foo.c
+
+$ACLOCAL
+AUTOMAKE_fails
+grep 'LIBOBJS.*used outside.*libobj-dir' stderr
+grep 'subdir-objects.*not set' stderr
+
+:
--- /dev/null
+#! /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 error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20c.test' .
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBSOURCE([foobar.c])
+# NOTE: this call to AC_OUTPUT is really needed; see Automake bug #7635
+# <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=7635>
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*libobj-dir' stderr
+
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir...
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
+
+rm -f foobar.c
+
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
+
+:
--- /dev/null
+#! /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 error reporting for AC_CONFIG_LIBOBJ_DIR.
+# See also sister tests `libobj20a.test' and `libobj20b.test' .
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_LIBOBJ_DIR([libobj-dir])
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_LIBOBJ([foobar])
+END
+
+cat > Makefile.am << 'END'
+AUTOMAKE_OPTIONS = subdir-objects
+noinst_LIBRARIES = libtu.a
+libtu_a_SOURCES =
+libtu_a_LIBADD = $(LIBOBJS)
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep 'configure\.in:.*required directory.*\./libobj-dir' stderr
+
+mkdir libobj-dir
+: > foobar.c # oops, it should be in libobj-dir!
+AUTOMAKE_fails
+grep 'configure\.in:.*required file.*libobj-dir/foobar.c.*' stderr
+
+rm -f foobar.c
+
+: > libobj-dir/foobar.c
+$AUTOMAKE # now we should succeed
+
+:
#! /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
# 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 we complain if @LIBOBJS@ is used without being set in configure.in
+# Make sure we complain if @LIBOBJS@ is used without being set in
+# configure.in.
. ./defs || Exit 1
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:3:.*LIBOBJS' stderr
+grep 'Makefile\.am:3:.*LIBOBJS' stderr
+
+:
#! /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 > Makefile.am << 'END'
bin_PROGRAMS = foo
END
cat >> configure.in << 'END'
AC_PROG_CC
-AC_REPLACE_FUNCS(foo)
+AC_REPLACE_FUNCS([foo])
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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 > Makefile.am << 'END'
bin_PROGRAMS = joe
LDADD = @LIBOBJS@
cat >> configure.in << 'END'
AC_PROG_CC
AC_REPLACE_FUNCS(\
- foo)
+ foo_bar_quux)
END
-: > foo.c
+: > foo_bar_quux.c
+
+$ACLOCAL
+$AUTOMAKE
+$FGREP foo_bar_quux.c Makefile.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-$FGREP foo.c Makefile.in
+:
#! /bin/sh
-# Copyright (C) 1997, 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1997, 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)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_RANLIB
-AC_REPLACE_FUNCS(basename dirname strsignal)
-AC_OUTPUT(Makefile)
+# `am__dummy_function' is there to ensure that at least one function is
+# replaced, to avoid creating an empty archive which can cause problems
+# with e.g. Solaris ar.
+AC_REPLACE_FUNCS([basename dirname am__dummy_function])
+AC_OUTPUT
END
cat > Makefile.am << 'END'
noinst_LIBRARIES = libtu.a
libtu_a_SOURCES =
libtu_a_LIBADD = @LIBOBJS@
+check-local: test1 test2 test3
+.PHONY: test1 test2 test3
+test1: all
+ $(AR) tv libtu.a
+test2:
+ @echo DIST_COMMON = $(DIST_COMMON)
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]basename\.c '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]dirname\.c '
+ echo ' ' $(DIST_COMMON) ' ' | grep '[ /]am__dummy_function\.c '
+test3: distdir
+ test -f $(distdir)/basename.c
+ test -f $(distdir)/dirname.c
+ test -f $(distdir)/am__dummy_function.c
+END
+
+cat > basename.c <<'END'
+extern int dummy1;
+END
+cat > dirname.c <<'END'
+extern int dummy2;
END
+cat > am__dummy_function.c <<'END'
+extern int dummy3;
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE
+$MAKE check
+$MAKE distcheck
-: > basename.c
-: > dirname.c
-: > strsignal.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-sed -n -e ': again
- /^DIST_COMMON.*[^\]$/ p
- /^DIST_COMMON/ {
- s/^DIST_COMMON//p
- n
- s/^/DIST_COMMON/
- b again
- }' < Makefile.in | $FGREP dirname.c
+:
#! /bin/sh
-# Copyright (C) 1998, 2000, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_CC_STDC
AC_PROG_RANLIB
AC_REPLACE_FUNCS(basename dirname strsignal)
AM_C_PROTOTYPES
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
: > ansi2knr.1
: > ansi2knr.c
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+$FGREP 'strsignal_.c:' Makefile.in
-grep 'strsignal_.c:' Makefile.in
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_RANLIB
AM_MAINTAINER_MODE
libfoo_a_DEPENDENCIES = libzot.a
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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
# Make sure libtool is removed.
# Report from Kevin Dalley
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_LIBTOOL_DLOPEN
AC_DISABLE_SHARED
AC_PROG_LIBTOOL
-AC_SUBST(LIBTOOL_DEPS)
+AC_SUBST([LIBTOOL_DEPS])
END
: > Makefile.am
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f libtool' Makefile.in
+
+:
#! /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
# Make sure libtool clean targets exist.
# Report from Eric Magnien.
+
required=libtoolize
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(mypackage,0.1)
+set -e
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_LIBTOOL
-
-AC_CONFIG_FILES([
- sub/Makefile
- Makefile
-])
+AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
libfoo_la_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
: > ltmain.sh
-$AUTOMAKE -a || Exit 1
+$AUTOMAKE -a
grep 'rm -f .*\.lo' sub/Makefile.in
+
+:
--- /dev/null
+#! /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
#! /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
# Test to make sure variable is expanded properly.
# From Adam J. Richter.
+
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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
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
+:
#!/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
# 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
#! /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
required=libtool
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
-AC_SUBST(LTLIBOBJS)
+AC_SUBST([LTLIBOBJS])
AC_PROG_LIBTOOL
END
: > config.guess
: > config.sub
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
--- /dev/null
+#! /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/>.
+
+# Check support for no-dist-gzip with lzip
+
+required=lzip
+. ./defs || Exit 1
+
+set -e
+
+cat > configure.in << 'END'
+AC_INIT([lzip], [1.0])
+AM_INIT_AUTOMAKE([no-dist-gzip dist-lzip])
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+test: distcheck
+ test $(DIST_ARCHIVES) = lzip-1.0.tar.lz
+ test -f $(DIST_ARCHIVES)
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+./configure
+$MAKE test
#! /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
set -e
cat >> configure.in << 'END'
-AC_CONFIG_FILES(bar)
+AC_CONFIG_FILES([bar])
AC_OUTPUT
END
test ! -f Makefile
test ! -f config.status
test ! -d autom4te.cache
+
+:
#! /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
required=GNUmake
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(Makefile.am)
-AM_INIT_AUTOMAKE(foo,0,no)
+set -e
+
+cat >> configure.in << 'END'
AM_MAKE_INCLUDE
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
: > Makefile.am
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE
save="$MAKE"
for flag in '' -w; do
MAKE="$save $flag" ./configure
-
$FGREP 'am__include = include' Makefile
-
+ $sleep
touch configure.in
$MAKE $flag
-
$FGREP 'am__include = include' Makefile
-
rm -f config.cache
done
#! /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
set -e
-cat >configure.in <<'END'
+cat >configure.in <<END
m4_include([version.m4])
-AC_INIT([version7], [THE_VERSION])
+AC_INIT([$me], [THE_VERSION])
AM_INIT_AUTOMAKE
AC_CONFIG_HEADER([config.h])
AC_CONFIG_FILES([Makefile])
echo 'm4_define([THE_VERSION], [3.141])' > version.m4
$MAKE -j
./configure --version | grep '3\.141'
+
+:
#! /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
+set -e
+
# Find the macros wanted by Automake.
-$ACLOCAL || Exit 1
+$ACLOCAL
# Create some dummy Makefile.in.
: > Makefile.am
-$AUTOMAKE || Exit 1
+$AUTOMAKE
# We are definitely not needing a compiler or preprocessor.
-$EGREP '^(CC|CPP|CXX|CXXCPP) =' Makefile.in && Exit 1
+$EGREP '^ *(CC|CPP|CXX|CXXCPP) *=' Makefile.in && Exit 1
-Exit 0
+:
#! /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
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
MAINTAINERCLEANFILES = foo
END
: > FOO
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'rm -f .*MAINTAINERCLEANFILES' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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'
info_TEXINFOS = textutils.texi
END
echo '@setfilename textutils' > textutils.texi
# Use "././" to confuse Automake into thinking this is a subdir build.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep 'mdate-sh' Makefile.in | grep -v SHELL
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2004 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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([mdate3], [1.0])
+set -e
+
+cat > configure.in << END
+AC_INIT([$me], [1.0])
AC_CONFIG_AUX_DIR([foo])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
: > foo/mdate-sh
mv install-sh foo
mv missing foo
-mv mkinstalldirs foo
-mv depcomp foo
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '[^/]mdate-sh' Makefile.in && Exit 1
Exit 0
#! /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
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
END
cat > Makefile.am << 'END'
@setfilename textutils.info
END
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
+ls -l sub
test -f sub/mdate-sh
+
+:
file='file name $a'
( : > "$file" ) || Exit 77
-cp "$testsrcdir"/../lib/mdate-sh .
+cp "$top_testsrcdir/lib/mdate-sh" .
$SHELL ./mdate-sh "$file" >stdout 2>stderr ||
{ cat stdout; cat stderr >&2; Exit 1; }
cat stdout
mkdir '~a b/-x y' || Exit 77
rm -rf '~a b'
-cp "$testsrcdir/../lib/mkinstalldirs" .
+cp "$top_testsrcdir/lib/mkinstalldirs" .
# Test mkinstalldirs with the installed mkdir.
#! /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 > Makefile.am << 'END'
pkgdata_DATA =
END
# The "././" prefix confuses Automake into thinking it is doing a
# subdir build. Yes, this is hacky.
-$ACLOCAL || Exit 1
-$AUTOMAKE ././Makefile || Exit 1
+$ACLOCAL
+$AUTOMAKE ././Makefile
grep ' /mkinstalldirs' Makefile.in && Exit 1
Exit 0
: > libbar/bar.c
-cp "$testsrcdir/../lib/config-ml.in" .
-cp "$testsrcdir/../lib/symlink-tree" .
+cp "$top_testsrcdir/lib/config-ml.in" .
+cp "$top_testsrcdir/lib/symlink-tree" .
$ACLOCAL
$AUTOCONF
--- /dev/null
+#! /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/>.
+
+# Check that the `-o' aka `--output-dir' option is not recognized anymore.
+
+. ./defs || Exit 1
+
+set -e
+
+AUTOMAKE_fails -Wno-error --output-dir=foo
+$EGREP '(invalid|unrecognized) option.*--output-dir' stderr
+
+AUTOMAKE_fails -Wno-error -o foo
+$EGREP '(invalid|unrecognized) option.*-o' stderr
+
+:
#! /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
. ./defs || Exit 1
-echo AC_PROG_CC >> configure.in
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
bin_PROGRAMS = eyeball
dist_eyeball_SOURCES = c.c
END
-: > a.c
-: > b.c
-: > c.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
-grep '^am_eyeball_OBJECTS' Makefile.in || Exit 1
-grep '^DIST_SOURCES =' Makefile.in || Exit 1
+grep '^am_eyeball_OBJECTS' Makefile.in
+grep '^DIST_SOURCES =' Makefile.in
grep '^DIST_SOURCES =.*nodist' Makefile.in && Exit 1
-Exit 0
+:
#! /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
. ./defs || Exit 1
-echo AC_PROG_CC >> configure.in
+cat >> configure.in << 'END'
+AC_PROG_CC
+END
cat > Makefile.am << 'END'
AUTOMAKE_OPTIONS = no-dist
eyeball_SOURCES = a.c
END
-: > a.c
-
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^dist:' Makefile.in && Exit 1
grep '^DIST_SOURCES =' Makefile.in && Exit 1
-Exit 0
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 1998, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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'
all-local:
exit 1
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^install[-a-z]*:.* all' Makefile.in
+
+:
#! /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
+set -e
+
cat > Makefile.am << 'END'
noinst_SCRIPTS = foo.sh
noinst_DATA = foo.xpm
AC_PROG_RANLIB
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep 'noinstdir' Makefile.in && Exit 1
grep 'checkdir' Makefile.in && Exit 1
-Exit 0
+
+:
#! /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
bin_PROGRAMS = zardoz
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+grep '^zardoz_OBJECTS' Makefile.in
count=`grep -c '^zardoz_OBJECTS' Makefile.in`
test $count -eq 1
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
+set -e
+
cat >> configure.in << 'END'
AC_PROG_OBJC
END
hello_SOURCES = hello.m
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^\.SUFFIXES:.*\.m' Makefile.in
+
+:
required=$2
. ./defs || Exit 1
+set -e
+
cat > configure.in << 'END'
AC_INIT
END
$PERL -ne '/AU_DEFUN\(\[(\w+)\]/ && print "$1\n"' \
- "$testsrcdir/../m4/obsolete.m4" >> obs
+ "$top_testsrcdir/m4/obsolete.m4" >> obs
cat obs >> configure.in
-$PERL -ne 'chomp; print "grep $_ stderr || Exit 1\n"; ' obs > obs.1
+$PERL -ne 'chomp; print "grep $_ output || Exit 1\n"; ' obs > obs.1
$PERL -ne 'chomp; print "grep $_ configure.in && Exit 1\n"; ' obs > obs.2
+echo : >> obs.1 # since it will be sourced, it must and with a success
+echo : >> obs.2 # ditto
+
+cat configure.in # for debugging
+cat obs.1 # ditto
+cat obs.2 # ditto
# Sanity check. Make sure we have added something to configure.in.
-test `cat configure.in | wc -l` -gt 1 || Exit 1
+test `wc -l <configure.in` -gt 1
-$ACLOCAL || Exit 1
+$ACLOCAL
# Expect Autoconf to complain about each of the macros in obs.
-$AUTOCONF -Wobsolete >stderr 2>&1
+$AUTOCONF -Wobsolete >output 2>&1 || { cat output; Exit 1; }
+cat output
. ./obs.1
# Make sure Autoupdate remove each of these macros.
-$AUTOUPDATE || Exit 1
+$AUTOUPDATE
. ./obs.2
# Autoconf should be able to grok the updated configure.in.
-$AUTOCONF || Exit 1
+$AUTOCONF
-Exit 0
+:
--- /dev/null
+#! /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
#! /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 frob/zardoz)
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile frob/zardoz])
END
: > Makefile.am
mkdir frob
: > frob/zardoz.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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 intl/intlh.inst po/Makefile.in misc/gettextize)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([Makefile intl/intlh.inst po/Makefile.in misc/gettextize])
END
: > Makefile.am
: > po/Makefile.in.am
: > misc/gettextize.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^gettextize' Makefile.in && Exit 1
Exit 0
#! /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)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
AC_OUTPUT([Makefile
tests/Makefile tests/defs],
[blah])
: > tests/Makefile.am
: > tests/defs.in
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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(tests/Makefile tests/defs)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_OUTPUT([tests/Makefile tests/defs])
END
mkdir tests
: > tests/defs.in
: > tests/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep tests/defs.in tests/Makefile.in && Exit 1
Exit 0
--- /dev/null
+
+#! /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 for conditionally-defined overrides.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [test x"$cond" = x"yes"])
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foobar:
+ : > $@
+if COND
+ps: foobar
+ :
+endif
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-override
+
+# "ps:" should be output in two conditions
+test `grep '[^-]ps:' Makefile.in | wc -l` = 2
+grep '@COND_TRUE@ps: *foobar' Makefile.in
+grep '@COND_FALSE@ps: *ps-am' Makefile.in
+
+$AUTOCONF
+
+./configure cond=no
+$MAKE ps
+test ! -r foobar
+
+./configure cond=yes
+$MAKE ps
+test -f foobar
+
+:
--- /dev/null
+#! /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 that conditional overrides are diagnosed.
+# This test is still xfailing; see the FIXME in Automake::Rule::define.
+# Once that is fixed, the test should succeed.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_CONDITIONAL([COND], [:])
+END
+
+cat > Makefile.am << 'END'
+if COND
+all:
+ :
+endif
+END
+
+$ACLOCAL
+
+AUTOMAKE_fails
+grep ':.*overrides.*all' stderr
+
+:
--- /dev/null
+#! /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 that overriding `html' target causes only one "html:" rule to
+# be output.
+
+. ./defs || Exit 1
+
+set -e
+
+cat > Makefile.am << 'END'
+html:
+ :
+END
+
+$ACLOCAL
+$AUTOMAKE -Wno-override
+
+# Overriding `html' should cause only one "html:" rule to be output.
+test `grep '^html:' Makefile.in | wc -l` = 1
+
+:
#! /bin/sh
-# Copyright (C) 2003, 2004, 2006 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
set -e
-cat >> configure.in << 'END'
-AM_CONDITIONAL([COND], [:])
-END
-
cat > Makefile.am << 'END'
install:
:
:
clean-am:
:
-
-if COND
-ps: mine
- :
-endif
END
$ACLOCAL
grep ':.*clean-am-local' stderr && Exit 1
grep ':.*clean-local' stderr
-# Conditional overrides ought to be diagnosed, but it can't be done yet.
-# See the FIXME in Automake::Rule::define. Once this is fixed, the grep below
-# will fail. If you see the failure, it means you fixed Automake. Well done!
-# Just strip out the next '&& Exit 1' and this comment.
-grep ':.*overrides.*ps' stderr && Exit 1
-
-# Test for another issue. Overriding html: should cause only one
-# html: rule to be output.
-test `grep '^html:' Makefile.in | wc -l` = 1
-
-# ps: should be output in two conditions
-test `grep '[^-]ps:' Makefile.in | wc -l` = 2
-grep '@COND_TRUE@ps: mine' Makefile.in
-grep '@COND_FALSE@ps: ps-am' Makefile.in
+:
#! /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
#
# This test checks (0), (1), and (2). See sister tests for further coverage.
+required=perl-threads
. ./defs || Exit 1
set -e
#! /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
# 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
#! /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
# 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
#! /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)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
-AC_PROG_RANLIB
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
doz.c
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
$FGREP zar.cdoz Makefile.in && Exit 1
Exit 0
# Test to make sure that -Wportability understands %-style pattern
# rules.
-. ./defs
+. ./defs || Exit 1
set -e
# `${ARCH}/%.$(OBJEXT):'.
# Report from Ralf Corsepius.
-. ./defs
+. ./defs || Exit 1
set -e
# Make sure .PHONY can be given dependencies several times.
# From Ralf Corsepius.
-. ./defs
+. ./defs || Exit 1
set -e
. ./defs || Exit 1
+set -e
+
cat > Makefile.am << 'END'
data_DATA = zar
data_DATA += doz
# 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?
# 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
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works
+# in when used with the DATA primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foodir = $(prefix)
+
+t1 = foo1 foo2
+t2 = barx
+t3 = baz.y
+
+bar.data bazzardoz:
+ : > $@
+CLEANFILES = bar.data bazzardoz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+dist_foo_DATA = $(t1:=.txt)
+foo_DATA = $(t2:x=.data)
+nodist_foo_DATA = $(t3:.y=zardoz)
+
+check-local: test
+.PHONY: test
+test: distdir
+ ls -l $(distdir)
+ test ! -r $(distdir)/foo.data
+ test ! -r $(distdir)/bazzardoz
+
+installcheck-local:
+ ls -l $(prefix)
+ test -f $(prefix)/foo1.txt
+ test -f $(prefix)/foo2.txt
+ test -f $(prefix)/bar.data
+ test -f $(prefix)/bazzardoz
+END
+
+: > foo1.txt
+: > foo2.txt
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE install
+test -f bar.data
+test -f bazzardoz
+$MAKE test
+$MAKE installcheck
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# in EXTRA_DIST.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = bar.x
+t3 = baz-y
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+EXTRA_DIST = $(t1:=.c) $(t2:.x=.f) $(t3:-y=ar)
+bazar bar.f:
+ : > $@
+.PHONY: test
+test: distdir
+ ls -l $(distdir)
+ test -f $(distdir)/foo1.c
+ test -f $(distdir)/foo2.c
+ test -f $(distdir)/bar.f
+ test -f $(distdir)/bazar
+END
+
+: > foo1.c
+: > foo2.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE test
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works
+# in when used in LDADD.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+u = libquux1.lib libquux2.lib
+v = libquux1
+w = none
+
+zardozdir = $(prefix)/zardoz
+zardoz_PROGRAMS = foo bar
+
+noinst_LIBRARIES = libquux1.a libquux2.a libquux3.a
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+LDADD = $(u:.lib=.a)
+bar_LDADD = $(v:=.a) libquux2.a $(w:none=libquux3.a)
+
+libquux1.c:
+ echo 'int quux1(void) { return 0; }' > $@
+CLEANFILES = libquux1.c # for FreeBSD make
+END
+
+cat > foo.c <<'END'
+int main(void)
+{
+ int quux1(void), quux2(void);
+ return quux1() + quux2();
+}
+END
+
+cat > bar.c <<'END'
+int main(void)
+{
+ int quux1(void), quux2(void), quux3(void);
+ return quux1() + quux2() + quux3();
+}
+END
+
+echo 'int quux2(void) { return 0; }' > libquux2.c
+echo 'int quux3(void) { return 0; }' > libquux3.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+test -f libquux1.c
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-ltlibraries.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+lib_LIBRARIES = $(foolibs:=.a) $(barlibs:z=r.a)
+
+libbar.c:
+ echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+ ls -l $(prefix)/lib
+ test -f $(prefix)/lib/libfoo1.a
+ test -f $(prefix)/lib/libfoo2.a
+ test -f $(prefix)/lib/libbar.a
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the LTLIBRARIES primary in a "simple" way.
+# Keep this in sync with sister test `posixsubst-libraries.test'.
+
+required='libtool libtoolize'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+foolibs = libfoo1 libfoo2
+barlibs = libbaz
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+lib_LTLIBRARIES = $(foolibs:=.la) $(barlibs:z=r.la)
+
+libbar.c:
+ echo 'int bar(void) { return 0; }' > $@
+CLEANFILES = libbar.c # for FreeBSD make
+
+installcheck-local:
+ ls -l $(prefix)/lib
+ test -f $(prefix)/lib/libfoo1.la
+ test -f $(prefix)/lib/libfoo2.la
+ test -f $(prefix)/lib/libbar.la
+END
+
+echo 'int bar1(void) { return 0; }' > libfoo1.c
+echo 'int bar2(void) { return 0; }' > libfoo2.c
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+test -f libfoo2.c
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the PROGRAMS primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = barx bar2
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+bin_PROGRAMS = $(t1:=-p) $(t2:2=y)
+
+installcheck-local:
+ ls -l $(prefix)/bin
+ test -f $(prefix)/bin/foo1-p$(EXEEXT)
+ test -x $(prefix)/bin/foo1-p$(EXEEXT)
+ test -f $(prefix)/bin/foo2-p$(EXEEXT)
+ test -x $(prefix)/bin/foo2-p$(EXEEXT)
+ test -f $(prefix)/bin/barx$(EXEEXT)
+ test -x $(prefix)/bin/barx$(EXEEXT)
+ test -f $(prefix)/bin/bary$(EXEEXT)
+ test -x $(prefix)/bin/bary$(EXEEXT)
+END
+
+for f in foo1-p.c foo2-p.c barx.c bary.c; do
+ echo 'int main(void) { return 0; }' > $f
+done
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SCRIPTS primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+# We have to be careful with 'test -x' commands on MinGW/MSYS, because
+# the file system does not actually have execute permission information.
+# Instead, that is emulated by looking at the file content, and returning
+# 0 if the file starts with, e.g., a COFF header or with '#!'.
+# So we need to create actual scripts in the make rules and in the file
+# creation below.
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = bar1x bar2
+t3 = quu-baz
+
+bar1 bar2:
+ (echo '#!/bin/sh' && echo 'exit 0') > $@
+quux.pl:
+ (echo '#!/bin/perl' && echo '1;') > $@
+CLEANFILES = bar1 bar2 quux.pl
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+dist_sbin_SCRIPTS = $(t1:=.sh)
+libexec_SCRIPTS = $(t2:x=)
+nodist_bin_SCRIPTS = $(t3:-baz=x.pl)
+
+check-local: test1 test2
+.PHONY: test1 test2
+test1:
+ ls -l
+ test -f bar1
+ test -f bar2
+ test -f quux.pl
+test2: distdir
+ ls -l $(distdir)
+ ## the scripts foo1.sh and foo2.sh should be distributed
+ test -f $(distdir)/foo1.sh
+ test -f $(distdir)/foo2.sh
+ ## the scripts bar1, bar2 and quux.pl shouldn't be distributed
+ test ! -r $(distdir)/bar1
+ test ! -r $(distdir)/bar2
+ test ! -r $(distdir)/quux.pl
+
+installcheck-local:
+ ls -l $(prefix)/libexec $(prefix)/bin $(prefix)/sbin
+ test -f $(prefix)/sbin/foo1.sh
+ test -x $(prefix)/sbin/foo1.sh
+ test -f $(prefix)/sbin/foo2.sh
+ test -x $(prefix)/sbin/foo2.sh
+ test -f $(prefix)/libexec/bar1
+ test -x $(prefix)/libexec/bar1
+ test -f $(prefix)/libexec/bar2
+ test -x $(prefix)/libexec/bar2
+ test -f $(prefix)/bin/quux.pl
+ test -x $(prefix)/bin/quux.pl
+END
+
+cat > foo1.sh <<'END'
+#!/bin/sh
+exit 0
+END
+cp foo1.sh foo2.sh
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+cwd=`pwd` || Exit 1
+./configure --prefix="$cwd/_inst"
+$MAKE
+$MAKE test1 test2
+$MAKE install
+$MAKE installcheck
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the SOURCES primary.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+
+FOO = foo.cxx
+BAR = bar__
+BAZ = baz.
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+foo_SOURCES = main.c $(FOO:.cxx=.c)
+dist_foo_SOURCES = $(BAR:__=.c)
+nodist_foo_SOURCES = $(BAZ:=c)
+
+bar.c baz.c:
+ echo 'int $@ (void) { return 0; }' | sed 's/\.c //' > $@
+CLEANFILES = baz.c
+CLEANFILES += bar.c # for FreeBSD make
+
+.PHONY: test test2
+check-local: test1 test2
+test1:
+ ls -l . $(srcdir)
+ test -f $(srcdir)/bar.c
+ test -f baz.c
+test2: distdir
+ ls -l $(distdir)
+ ## these sources should be distributed ...
+ test -f $(distdir)/bar.c
+ test -f $(distdir)/foo.c
+ test -f $(distdir)/main.c
+ ## ... and this shouldn't
+ test ! -r $(distdir)/baz.c
+END
+
+cat > main.c <<'END'
+int main(void)
+{
+ int foo(void), bar(void), baz(void);
+ return foo() + bar() + baz();
+}
+END
+
+echo 'int foo(void) { return 0; }' > foo.c
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE
+$MAKE test1 test2
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 that POSIX variable expansion `$(var:str=rpl)' works when used
+# with the TESTS special variable.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+t1 = foo1 foo2
+t2 = barx
+t3 = bar2
+
+foo2.test barz:
+ (echo '#!/bin/sh' && echo 'exit 0') > $@ && chmod a+x $@
+CLEANFILES = foo2.test barz # for FreeBSD make
+
+# Also try an empty match suffix, to ensure that the `:=' in there is
+# not confused by the parser with an unportable assignment operator.
+TESTS = $(t1:=.test) $(t2:x=y) $(t3:2=z)
+
+EXTRA_DIST = $(TESTS)
+MOSTLYCLEANFILES = *.out
+END
+
+cat > foo1.test <<'END'
+#!/bin/sh
+touch foo1.out
+test x"${TESTSUITE_OK-no}" = x"yes"
+END
+sed 's/foo1/bary/g' foo1.test > bary
+chmod +x foo1.test bary
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+$MAKE check >out 2>&1 && { cat out; Exit 1; }
+cat out
+ls -l
+grep '^FAIL: foo1\.test *$' out
+grep '^PASS: foo2\.test *$' out
+grep '^FAIL: bary *$' out
+grep '^PASS: barz *$' out
+test -f foo1.out
+test -f bary.out
+
+TESTSUITE_OK=yes $MAKE distcheck
+
+:
#! /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
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_F77
END
ppf_SOURCES = foo.F q.r
END
-: > foo.F
-: > q.r
-
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 2004, 2006, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2004, 2006, 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
sed 's/AM_PATH_PYTHON/AM_PATH_PYTHON(,,:)/' configure.in >configure.int
mv -f configure.int configure.in
-$ACLOCAL
-$AUTOCONF
+$ACLOCAL --force
+$AUTOCONF --force
# This one should define PYTHON as : and exit succesfully
./configure
--- /dev/null
+#! /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/>.
+
+# Check tha the AM_WITH_REGEX macro is reported as obsolete.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AM_WITH_REGEX
+END
+
+$ACLOCAL
+$AUTOCONF -Werror -Wobsolete 2>stderr && { cat stderr >&2; Exit 1; }
+cat stderr >&2
+grep '^configure\.in:.*AM_WITH_REGEX.*obsolete' stderr
+
+:
#! /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
# 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 remaking rules in subdir are correctly generated.
+# Weak "grepping" test trying to ensure that remaking rules in a subdir
+# are correctly generated.
+# See also sister functional test `remake1a.test'.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(sub/Makefile)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
mkdir sub
: > sub/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^Makefile' sub/Makefile.in
+
+:
--- /dev/null
+#! /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 remake rules for m4 files included (also recursively) by
+# configure.ac.
+# Keep in sync with sister tests `remake10b.test' and `remake10c.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<END
+m4_include([foo.m4])
+AC_SUBST([FINGERPRINT], [my_fingerprint])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: nil
+nil:
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/foo.m4
+ test ! -r $(top_srcdir)/bar.m4
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+echo 'm4_define([my_fingerprint], [BadBadBad])' > foo.m4
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic2])" > $top_srcdir/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo "m4_include([bar.m4])" > $top_srcdir/foo.m4
+ echo "m4_define([my_fingerprint], [$magic3])" > $top_srcdir/bar.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [$magic1])" > $top_srcdir/bar.m4
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "m4_define([my_fingerprint], [DummyValue])" > $top_srcdir/foo.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules for am files included (also recursively) by
+# Makefile.am.
+# Keep in sync with sister tests `remake10a.test' and `remake10c.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<'END'
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+.PHONY: nil
+nil:
+include foo.am
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/foo.am
+ test ! -r $(top_srcdir)/bar.am
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+echo 'FINGERPRINT = BadBadBad' > foo.am
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "FINGERPRINT = $magic1" > $top_srcdir/foo.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "FINGERPRINT = $magic2" > $top_srcdir/foo.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo 'include $(top_srcdir)/bar.am' > $top_srcdir/foo.am
+ echo "FINGERPRINT = $magic3" > $top_srcdir/bar.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "FINGERPRINT = $magic1" > $top_srcdir/bar.am
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "FINGERPRINT = DummyValue" > $top_srcdir/foo.am
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules for m4 files included (also recursively) by
+# aclocal.m4.
+# Keep in sync with sister tests `remake10a.test' and `remake10b.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+.PHONY: nil
+nil:
+## Used by "make distcheck" later.
+check-local:
+ test -f $(top_srcdir)/m4/foo.m4
+ test ! -r $(top_srcdir)/m4/bar.m4
+ test x'$(FINGERPRINT)' = x'DummyValue'
+END
+
+mkdir m4
+echo 'AC_DEFUN([my_fingerprint], [BadBadBad])' > m4/foo.m4
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL -I m4
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ top_srcdir=..
+ else
+ top_srcdir=.
+ fi
+
+ $top_srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic2])" > $top_srcdir/m4/foo.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+
+ $sleep
+ echo "m4_include([m4/bar.m4])" > $top_srcdir/m4/foo.m4
+ echo "AC_DEFUN([my_fingerprint], [$magic3])" > $top_srcdir/m4/bar.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $top_srcdir/m4/bar.m4
+ $MAKE nil
+ $FGREP $magic2 Makefile && Exit 1
+ $FGREP $magic3 Makefile && Exit 1
+ $FGREP $magic1 Makefile
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $top_srcdir/m4/foo.m4
+ echo "AC_DEFUN([AM_UNUSED], [NoSuchMacro])" > $top_srcdir/m4/bar.m4
+ $MAKE nil # required to work around limitation of GNU make 3.82
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+ $FGREP $magic3 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $top_srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules in deeply nested subdirectories, and with a lot
+# of files. This is basically a mild stress test, ensuring that rebuild
+# rules don't break in obvious ways in a slightly "heavier than usual"
+# setup.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+ocwd=`pwd` || Exit 1
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+echo "AC_SUBST([FOO], [$magic1])" >> configure.in
+
+echo "@FOO@" > bar.in
+echo "AC_CONFIG_FILES([bar])" >> configure.in
+for i in 0 1 2 3 4 5 6 7 8 9; do
+ d=${d+"$d/"}sub$i
+ echo "SUBDIRS = sub$i" > Makefile.am
+ echo "AC_CONFIG_FILES([$d/Makefile])" >> "$ocwd"/configure.in
+ echo "AC_CONFIG_FILES([$d/bar])" >> "$ocwd"/configure.in
+ mkdir sub$i
+ cd sub$i
+ echo "$d: @FOO@" > bar.in
+done
+echo AC_OUTPUT >> "$ocwd"/configure.in
+: > Makefile.am
+unset d i
+bottom=`pwd`
+
+cd "$ocwd"
+
+makefiles_am_list=`find . -name Makefile.am | LC_ALL=C sort`
+makefiles_list=`echo "$makefiles_am_list" | sed 's/\.am$//'`
+bar_in_list=`find . -name bar.in | LC_ALL=C sort`
+bar_list=`echo "$bar_in_list" | sed 's/\.in$//'`
+
+cat configure.in # useful for debugging
+
+$ACLOCAL
+$AUTOMAKE
+$AUTOCONF
+
+./configure
+
+for f in configure config.status $makefiles_list $bar_list; do
+ $FGREP "$magic1" $f
+done
+
+$sleep
+sed "s/$magic1/$magic2/" configure.in >configure.tmp
+mv -f configure.tmp configure.in
+
+cd "$bottom"
+$MAKE
+cd "$ocwd"
+
+for f in configure config.status $makefiles_list $bar_list; do
+ $FGREP "$magic2" $f
+done
+$FGREP "$magic1" configure config.status $makefiles_list $bar_list && Exit 1
+
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 basic remake rules for Makefiles with non-default names
+# and/or with multiple sources.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+magic3=%%MagicStringThree%%
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([zardoz])
+AC_CONFIG_LINKS([Makefile:Makefile])
+AC_OUTPUT
+END
+
+cat > zardoz.am <<END
+EXTRA_DIST = Makefile
+#H: $magic1
+END
+
+cat > Makefile <<END
+include zardoz
+nil:
+.PHONY: nil
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+$MAKE nil
+grep '^#H:' zardoz.in # for debugging
+$FGREP $magic1 zardoz
+$FGREP $magic1 zardoz.in
+$MAKE distcheck
+$MAKE distclean # this shouldn't remove Makefile
+ls -l
+test -f Makefile
+
+./configure
+
+$sleep
+sed "s/%MAGIC3%/$magic3/" >> Makefile <<'END'
+my-check:
+ ls -l . $(srcdir) ;: for debugging
+ test -f $(srcdir)/quux.am
+ test -f $(srcdir)/quux.in
+ test -f $(srcdir)/bot.in
+ test -f $(srcdir)/top.in
+ test ! -r $(srcdir)/zardoz.am
+ test ! -r $(srcdir)/zardoz.in
+ grep FOO zardoz ;: for debugging
+ test x'$(FOO)' = x'%MAGIC3%'
+test:
+ ls -l ;: for debugging
+ test x'$(FOO)' = x'dummy'
+.PHONY: test my-check
+END
+sed "s/^#H:.*/#H: $magic2/" zardoz.am > t
+cat >> t <<'END'
+# used by "make distcheck" below
+check-local: my-check
+END
+mv -f t zardoz.am
+cat zardoz.am # for debugging
+$MAKE nil
+$FGREP my-check zardoz # sanity check
+$FGREP $magic1 zardoz zardoz.in && Exit 1
+$FGREP $magic2 zardoz
+$FGREP $magic2 zardoz.in
+
+./configure
+
+$sleep
+sed 's/^\(AC_CONFIG_FILES\)(.*/\1([zardoz:top.in:quux.in:bot.in])/' \
+ <configure.in >t
+mv -f t configure.in
+cat configure.in # for debugging
+sed '/^#H:/d' zardoz.am > quux.am
+echo 'FOO = dummy' >> quux.am
+echo 'BAR = $(BAZ)' > top.in
+echo "BAZ = $magic3" > bot.in
+$MAKE test
+$FGREP my-check zardoz # sanity check
+$FGREP $magic3 quux.in && Exit 1
+$FGREP $magic3 zardoz
+$FGREP $magic1 zardoz && Exit 1
+$FGREP $magic2 zardoz && Exit 1
+# After the remake above, the files `zardoz.am' and `zardoz.in'
+# should be no more needed
+echo 'endif' > zardoz.am # put in syntax error
+$MAKE test
+rm -f zardoz.in zardoz.am # get rid of them
+$MAKE test
+
+echo 'FOO = $(BAR)' >> quux.am
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 remaking rules in subdir are correctly generated.
+# See also sister "grepping" test `remake.test'.
+
+. ./defs || Exit 1
+
+fingerprint='=/FiNgErPrInT/='
+
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+END
+
+mkdir sub
+: > sub/Makefile.am
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+./configure
+
+# Rebuild rules should work even if there is no top-level
+# makefiles, if we are careful enough to trigger them only
+# in proper subdirs
+$sleep
+echo "# $fingerprint" > sub/Makefile.am
+cd sub
+$MAKE Makefile
+cd ..
+# Check that no spurious Makefile has been created in the
+# top-level directory.
+test ! -r Makefile
+# Check that the Makefile in the subdirectory has been properly
+# updated.
+$FGREP "$fingerprint" sub/Makefile
+
+:
#! /bin/sh
-# Copyright (C) 1996, 1997, 2000, 2001, 2002 Free Software Foundation, Inc.
+# Copyright (C) 1996, 1997, 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
# 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 remaking rules in subdir are correct.
+# Weak "grepping" test trying to ensure that remaking rules in subdir
+# are correct even when there is no upper-level Makefile.
+# TODO: we should really add also functional tests for this!
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(sub/Makefile)
+set -e
+
+cat > configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
mkdir sub
: > sub/Makefile.am
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
+
+grep '\$(AUTOMAKE).*sub/Makefile' sub/Makefile.in
-grep 'AUTOMAKE.*sub/Makefile' sub/Makefile.in
+:
#! /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
# 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 remaking rules work when there is no subdir Makefile.
+# Weak "grepping" test trying to ensure that remake rules work for files
+# in a subdirectory even when there is no Makefile for that subdirectory.
+# See also sister functional test `remake3a.test'.
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/foo)
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/foo])
+AC_OUTPUT
END
: > Makefile.am
mkdir sub
: > sub/foo.in
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^sub/foo' Makefile.in
+
+:
--- /dev/null
+#! /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 that remake rules work for files in a subdirectory even when
+# there is no Makefile for that subdirectory.
+# See also sister "grepping" test `remake3.test'.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/foo])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+all-local: sub/foo
+END
+
+mkdir sub
+: > sub/foo.in
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+# First a VPATH build.
+mkdir build
+cd build
+../configure
+$sleep
+test -f sub/foo
+test ! -s sub/foo
+echo '#GrepMe#' > ../sub/foo.in
+$MAKE
+grep '#GrepMe#' sub/foo
+
+cd ..
+
+# Now try an in-tree build.
+: > sub/foo.in # restore its original (empty) content
+./configure
+$sleep
+test -f sub/foo
+test ! -s sub/foo
+echo '#GrepMe#' > sub/foo.in
+$MAKE
+grep '#GrepMe#' sub/foo
+
+# Finally try to check the distribution.
+$sleep
+echo '%GrepMe%' > sub/foo.in
+cat >>Makefile.am <<END
+check-local:
+ grep '%GrepMe%' sub/foo
+END
+$MAKE
+grep "grep '%GrepMe%' sub/foo" Makefile.in # sanity check
+$MAKE distcheck
+
+:
#! /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
$sleep
touch aclocal.m4
$MAKE distdir
-cd remake4-1.0
+cd $me-1.0
test ! -f rebuild_ok
./configure
$MAKE
+
+:
#! /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
cat >>configure.in <<'EOF'
AM_MAINTAINER_MODE
-m4_include(foo.m4)
+m4_include([foo.m4])
if test ! -f rebuild_ok; then
ACLOCAL=false
AUTOMAKE=false
echo 'AC_SUBST([YIPPY_YIPPY_YEAH])' >foo.m4
$MAKE
grep YIPPY_YIPPY_YEAH Makefile
+
+# Try the distribution, for completeness.
+$MAKE distcheck
+
+:
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 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
# Make sure remaking rules work when subdir Makefile.in has been removed.
. ./defs || Exit 1
+
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
# only.
rm -f Makefile.in
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
rm -f sub/Makefile.in
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
$sleep # Let touched files appear newer.
touch Makefile.am
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
touch sub/Makefile.am
-$MAKE >stdout
+$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
test `grep -c " --run " stdout` -eq 1
+
+:
#! /bin/sh
-# Copyright (C) 2008 Free Software Foundation, Inc.
+# Copyright (C) 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
# Make sure remaking rules fail when they should.
. ./defs || Exit 1
+
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
-AC_OUTPUT(Makefile sub/Makefile)
+cat >> configure.in << 'END'
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
END
cat > Makefile.am <<'END'
rm -f Makefile.in
$MAKE && Exit 1
+
:
--- /dev/null
+#! /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 basic remake rules for Makefiles, for an *in-tree build*.
+# This testcase checks dependency of generated Makefile from Makefile.am,
+# configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
+# by aclocal.
+# Keep this in sync with sister test `remake8b.test', which performs the
+# same checks for a VPATH build.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+mv -f configure.in configure.stub
+
+cat > Makefile.am <<'END'
+all-local: foo
+foo:
+ echo '!Foo!' >$@
+check-local:
+ cat foo
+ grep '!Foo!' foo
+CLEANFILES = foo
+END
+
+cat configure.stub - > configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+srcdir='.' # to make syncing with remake8b.test easier.
+
+$srcdir/configure
+
+$MAKE
+cat foo
+grep '!Foo!' foo
+$MAKE distcheck
+
+rm -f foo
+
+# Modify just Makefile.am.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: bar
+bar:
+ echo '!Baz!' >$@
+check-local:
+ cat bar
+ grep '!Baz!' bar
+ test ! -r $(srcdir)/foo
+ test ! -r foo
+CLEANFILES = bar
+END
+
+$MAKE
+cat bar
+grep '!Baz!' bar
+test ! -r foo
+$MAKE distcheck
+
+rm -f bar
+
+# Modify Makefile.am and configure.in.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: quux
+check-local:
+ cat quux
+ grep '!Zardoz!' quux
+ test ! -r $(srcdir)/bar
+ test ! -r bar
+END
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+AC_SUBST([QUUX], [Zardoz])
+AC_OUTPUT
+END
+
+cat > $srcdir/quux.in <<'END'
+!@QUUX@!
+END
+
+$MAKE
+cat quux
+grep '!Zardoz!' quux
+test ! -r bar
+$MAKE distcheck
+
+rm -f quux
+
+# Modify Makefile.am to add a directory of extra m4 files
+# considered by aclocal.
+
+$sleep
+
+mkdir $srcdir/m4
+
+cat > $srcdir/Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+all-local: quux
+check-local:
+ cat quux
+ grep '%Foo%' quux
+ test x'$(QUUX)' = x'%Foo%'
+END
+
+$MAKE # this should place aclocal flags in Makefile
+grep '.*-I m4' Makefile # sanity check
+
+# Modify configure.in and aclocal.m4.
+
+$sleep
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+MY_CUSTOM_MACRO
+AC_OUTPUT
+END
+
+cat >> $srcdir/aclocal.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Foo%])])
+END
+
+$MAKE
+cat quux
+grep '%Foo%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove aclocal.m4, and add a new m4 file to
+# the directory of extra m4 files considered by aclocal. This new
+# file should now provide a macro required by configure.in and that
+# was previously provided by aclocal.m4.
+
+$sleep
+
+sed 's/%Foo%/%Bar%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+rm -f $srcdir/aclocal.m4
+cat > $srcdir/m4/blah.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Bar%])])
+END
+
+$MAKE
+cat quux
+grep '%Bar%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove all the extra m4 files to considered
+# by aclocal, and add an acinclude.m4 file. This last file should
+# now provide a macro required by configure.in, and that was
+# previously provided by the extra m4 files considered by aclocal.
+
+$sleep
+
+rm -f $srcdir/m4/*.m4
+sed 's/%Bar%/%Quux%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+cat > $srcdir/acinclude.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Quux%])])
+END
+
+$MAKE
+cat quux
+grep '%Quux%' quux
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 basic remake rules for Makefiles, for a *VPATH build*.
+# This testcase checks dependency of generated Makefile from Makefile.am,
+# configure.ac, acinclude.m4, aclocal.m4, and extra m4 files considered
+# by aclocal.
+# Keep this in sync with sister test `remake8a.test', which performs the
+# same checks for a in-tree build.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+mv -f configure.in configure.stub
+
+cat > Makefile.am <<'END'
+all-local: foo
+foo:
+ echo '!Foo!' >$@
+check-local:
+ cat foo
+ grep '!Foo!' foo
+CLEANFILES = foo
+END
+
+cat configure.stub - > configure.in <<'END'
+AC_OUTPUT
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+mkdir build
+cd build
+srcdir='..' # to make syncing with remake8a.test easier.
+
+$srcdir/configure
+
+$MAKE
+cat foo
+grep '!Foo!' foo
+$MAKE distcheck
+
+rm -f foo
+
+# Modify just Makefile.am.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: bar
+bar:
+ echo '!Baz!' >$@
+check-local:
+ cat bar
+ grep '!Baz!' bar
+ test ! -r $(srcdir)/foo
+ test ! -r foo
+CLEANFILES = bar
+END
+
+$MAKE
+cat bar
+grep '!Baz!' bar
+test ! -r foo
+$MAKE distcheck
+
+rm -f bar
+
+# Modify Makefile.am and configure.in.
+
+$sleep
+
+cat > $srcdir/Makefile.am <<'END'
+all-local: quux
+check-local:
+ cat quux
+ grep '!Zardoz!' quux
+ test ! -r $(srcdir)/bar
+ test ! -r bar
+END
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+AC_SUBST([QUUX], [Zardoz])
+AC_OUTPUT
+END
+
+cat > $srcdir/quux.in <<'END'
+!@QUUX@!
+END
+
+$MAKE
+cat quux
+grep '!Zardoz!' quux
+test ! -r bar
+$MAKE distcheck
+
+rm -f quux
+
+# Modify Makefile.am to add a directory of extra m4 files
+# considered by aclocal.
+
+$sleep
+
+mkdir $srcdir/m4
+
+cat > $srcdir/Makefile.am <<'END'
+ACLOCAL_AMFLAGS = -I m4
+all-local: quux
+check-local:
+ cat quux
+ grep '%Foo%' quux
+ test x'$(QUUX)' = x'%Foo%'
+END
+
+$MAKE # this should place aclocal flags in Makefile
+grep '.*-I m4' Makefile # sanity check
+
+# Modify configure.in and aclocal.m4.
+
+$sleep
+
+cat $srcdir/configure.stub - > $srcdir/configure.in <<'END'
+AC_CONFIG_FILES([quux])
+MY_CUSTOM_MACRO
+AC_OUTPUT
+END
+
+cat >> $srcdir/aclocal.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Foo%])])
+END
+
+$MAKE
+cat quux
+grep '%Foo%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove aclocal.m4, and add a new m4 file to
+# the directory of extra m4 files considered by aclocal. This new
+# file should now provide a macro required by configure.in and that
+# was previously provided by aclocal.m4.
+
+$sleep
+
+sed 's/%Foo%/%Bar%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+rm -f $srcdir/aclocal.m4
+cat > $srcdir/m4/blah.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Bar%])])
+END
+
+$MAKE
+cat quux
+grep '%Bar%' quux
+$MAKE distcheck
+
+# Modify Makefile.am, remove all the extra m4 files to considered
+# by aclocal, and add an acinclude.m4 file. This last file should
+# now provide a macro required by configure.in, and that was
+# previously provided by the extra m4 files considered by aclocal.
+
+$sleep
+
+rm -f $srcdir/m4/*.m4
+sed 's/%Bar%/%Quux%/g' $srcdir/Makefile.am > t
+mv -f t $srcdir/Makefile.am
+cat $srcdir/Makefile.am
+cat > $srcdir/acinclude.m4 <<'END'
+AC_DEFUN([MY_CUSTOM_MACRO], [AC_SUBST([QUUX], [%Quux%])])
+END
+
+$MAKE
+cat quux
+grep '%Quux%' quux
+$MAKE distcheck
+
+:
--- /dev/null
+#! /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 remake rules when configure.in or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT=BadBadBad
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+$(srcdir)/configure.in: $(srcdir)/tweak-configure-in
+ $(SHELL) $(srcdir)/tweak-configure-in <$@ >$@-t
+ mv -f $@-t $@
+EXTRA_DIST = $(srcdir)/tweak-configure-in
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo cat > tweak-configure-in # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=$magic1/" $srcdir/configure.in >t
+ mv -f t $srcdir/configure.in
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo 'sed "s/^\\(FINGERPRINT\\)=.*/\\1='$magic2'/"' \
+ > $srcdir/tweak-configure-in
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-configure-in # no-op again
+ sed "s/^\\(FINGERPRINT\\)=.*/\\1=DummyValue/" $srcdir/configure.in >t
+ mv -f t $srcdir/configure.in
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules when Makefile.am or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+FINGERPRINT = BadBadBad
+
+all-local: nil
+nil: foo.sh
+.PHONY: nil
+
+$(srcdir)/Makefile.am: $(srcdir)/tweak-makefile-am
+ $(SHELL) $(srcdir)/tweak-makefile-am <$@ >$@-t
+ mv -f $@-t $@
+EXTRA_DIST = $(srcdir)/tweak-makefile-am
+
+foo.sh: Makefile
+ rm -f $@ $@-t
+ echo '#!/bin/sh' > $@-t
+ echo "echo '$(FINGERPRINT)'" >> $@-t
+ chmod a+x $@-t && mv -f $@-t $@
+CLEANFILES = foo.sh
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+echo cat > tweak-makefile-am # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = $magic1/" $srcdir/Makefile.am >t
+ mv -f t $srcdir/Makefile.am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo 'sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = '$magic2'/"' \
+ > $srcdir/tweak-makefile-am
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-makefile-am # no-op again
+ sed "s/^\\(FINGERPRINT\\) *=.*/\\1 = DummyValue/" $srcdir/Makefile.am >t
+ mv -f t $srcdir/Makefile.am
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules when acinclude.m4 or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+# The right way to extend an autogenerated aclocal.m4 is to provide
+# an acinclude.m4 file.
+$(srcdir)/acinclude.m4: $(srcdir)/tweak-acinclude-m4
+ $(SHELL) $(srcdir)/tweak-acinclude-m4 <$@ >$@-t
+ mv -f $@-t $@
+ touch $@
+EXTRA_DIST = $(srcdir)/tweak-acinclude-m4
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo "AC_DEFUN([my_fingerprint], [BadBadBad])" > acinclude.m4
+
+echo : > tweak-acinclude-m4 # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])" > $srcdir/acinclude.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo "echo 'AC_DEFUN([my_fingerprint], [$magic2])'" \
+ > $srcdir/tweak-acinclude-m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo : > $srcdir/tweak-acinclude-m4 # no-op again
+ echo "AC_DEFUN([my_fingerprint], [DummyValue])" > $srcdir/acinclude.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
--- /dev/null
+#! /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 remake rules when aclocal.m4 or its prerequisites change.
+# Keep in sync with the other sister tests `remake9*.test'.
+
+required=GNUmake
+. ./defs || Exit 1
+
+set -e
+
+magic1=::MagicStringOne::
+magic2=__MagicStringTwo__
+
+cat >> configure.in <<END
+FINGERPRINT='my_fingerprint'
+AC_SUBST([FINGERPRINT])
+AC_CONFIG_FILES([foo.sh:foo.in], [chmod a+x foo.sh])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+nil:
+.PHONY: nil
+
+# A non-autogenerated aclocal.m4 can be extended by hand.
+$(srcdir)/aclocal.m4: $(srcdir)/tweak-aclocal-m4
+ $(SHELL) $(srcdir)/tweak-aclocal-m4 <$@ >$@-t
+ mv -f $@-t $@
+ touch $@
+EXTRA_DIST = $(srcdir)/tweak-aclocal-m4
+
+# Used by "make distcheck" later.
+check-local:
+ test x'$(FINGERPRINT)' = x'DummyValue'
+ test x"`./foo.sh`" = x"DummyValue"
+END
+
+cat > foo.in <<END
+#!/bin/sh
+echo '@FINGERPRINT@'
+END
+
+echo cat > tweak-aclocal-m4 # no-op by default
+
+$sleep # so that generated autotools files will be newer than prerequisites
+$ACLOCAL
+# Cheatingly mark aclocal.m4 as non auto-generated.
+sed '/^ *#.*generated automatically/d' aclocal.m4 > t
+mv -f t aclocal.m4
+$AUTOCONF
+$AUTOMAKE
+
+for vpath in : false; do
+
+ if $vpath; then
+ mkdir build
+ cd build
+ srcdir=..
+ else
+ srcdir=.
+ fi
+
+ $srcdir/configure
+ $MAKE # should be no-op
+
+ $sleep
+ echo "AC_DEFUN([my_fingerprint], [$magic1])dnl %%%" >> $srcdir/aclocal.m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile
+ test x"`./foo.sh`" = x"$magic1"
+
+ $sleep
+ echo "sed 's/.*dnl *%%%.*/AC_DEFUN([my_fingerprint], [$magic2])/'" \
+ > $srcdir/tweak-aclocal-m4
+ $MAKE nil
+ $FGREP FINGERPRINT Makefile # for debugging
+ $FGREP $magic1 Makefile && Exit 1
+ $FGREP $magic2 Makefile
+ test x"`./foo.sh`" = x"$magic2"
+
+ $sleep
+ echo cat > $srcdir/tweak-aclocal-m4 # no-op again
+ echo 'AC_DEFUN([my_fingerprint], [DummyValue])' >> $srcdir/aclocal.m4
+ $MAKE distcheck
+ $FGREP $magic1 Makefile && Exit 1 # sanity check
+ $FGREP $magic2 Makefile && Exit 1 # likewise
+
+ $MAKE distclean
+
+ cd $srcdir
+
+done
+
+:
--- /dev/null
+#! /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/>.
+
+# Check that automake does not complain on repeated options, nor
+# generate broken or incorrect makefiles.
+
+required=bzip2
+. ./defs || Exit 1
+
+set -e
+
+cat >configure.in <<END
+AC_INIT([$me], [1.0])
+AM_INIT_AUTOMAKE([foreign dist-bzip2 no-dist-gzip no-dist-gzip dist-bzip2])
+AC_PROG_CC
+AM_PROG_CC_C_O
+AC_CONFIG_FILES([Makefile])
+AC_OUTPUT
+END
+
+cat > Makefile.am <<'END'
+AUTOMAKE_OPTIONS = parallel-tests subdir-objects subdir-objects
+AUTOMAKE_OPTIONS += dist-bzip2 parallel-tests
+TESTS = foo.test
+EXTRA_DIST = $(TESTS)
+bin_PROGRAMS = sub/foo
+END
+
+mkdir sub
+
+cat > foo.test <<'END'
+#!/bin/sh
+test -f sub/foo && test -x sub/foo
+END
+chmod a+x foo.test
+
+cat > sub/foo.c <<'END'
+int main (void)
+{
+ return 0;
+}
+END
+
+cp $testsrcdir/../lib/compile .
+
+$ACLOCAL
+$AUTOMAKE --foreign --foreign -Wall 2>stderr || { cat stderr >&2; Exit 1; }
+test -s stderr && { cat stderr >&2; Exit 1; }
+rm -f stderr
+$AUTOCONF
+
+./configure
+$MAKE
+ls -l . sub
+test -f sub/foo.o
+test -f sub/foo
+$MAKE check
+ls -l
+test -f foo.log
+test -f test-suite.log
+$MAKE clean
+$MAKE distcheck
+ls -l
+test -f $me-1.0.tar.bz2
+test ! -r $me-1.0.tar.gz
+
+:
#! /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 <<EOF
AC_INIT
AM_INIT_GUILE_MODULE
AC_SUBST(module)])
END
-$ACLOCAL || Exit 1
+$ACLOCAL
grep 'DEFUN.*INIT_AUTOMAKE' aclocal.m4
+
+:
#! /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 > Makefile.am << 'END'
$(srcdir)/Makefile.am:
END
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
grep '^$(srcdir)/Makefile\.am' Makefile.in
+
+:
--- /dev/null
+#!/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/>.
+
+# Check silent-rules mode for Lex, forcing gcc depmode.
+# Keep this in sync with sister test `silent-lex-generic.test'.
+
+required='flex gcc'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_LEX
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.l
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CFLAGS)
+SUBDIRS = sub
+LDADD = $(LEXLIB)
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.l
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CFLAGS)
+LDADD = $(LEXLIB)
+EOF
+
+cat > foo.l <<'EOF'
+%%
+"END" return EOF;
+.
+%%
+EOF
+cp foo.l sub/bar.l
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-lex-gcc.test'.
+for config_args in \
+ am_cv_CC_dependencies_compiler_type=gcc
+do
+ ./configure $config_args --enable-silent-rules
+
+ $MAKE >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ $EGREP ' (-c|-o)' stdout && Exit 1
+ $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+ grep 'LEX .*foo\.' stdout
+ grep 'LEX .*bar\.' stdout
+ grep ' CC .*foo\.' stdout
+ grep ' CC .*bar\.' stdout
+ grep 'CCLD .*foo1' stdout
+ grep 'CCLD .*bar1' stdout
+ grep 'CCLD .*foo2' stdout
+ grep 'CCLD .*bar2' stdout
+
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+
+ $MAKE >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ $EGREP ' (-c|-o)' stdout && Exit 1
+ $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+ # Don't look for LEX, as probably lex hasn't been re-run.
+ grep ' CC .*foo\.' stdout
+ grep ' CC .*bar\.' stdout
+ grep 'CCLD .*foo1' stdout
+ grep 'CCLD .*bar1' stdout
+ grep 'CCLD .*foo2' stdout
+ grep 'CCLD .*bar2' stdout
+
+ # Ensure a truly clean rebuild.
+ $MAKE clean
+ rm -f foo.c sub/bar.c
+
+ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ grep ' -c ' stdout
+ grep ' -o ' stdout
+ grep 'ylwrap ' stdout
+
+ $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+
+ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ # Don't look for ylwrap, as probably lex hasn't been re-run.
+ grep ' -c ' stdout
+ grep ' -o ' stdout
+
+ $EGREP '(LEX|CC|CCLD) ' stdout && Exit 1
+
+ # Ensure a truly clean reconfiguration/rebuild.
+ $MAKE clean
+ $MAKE maintainer-clean
+ rm -f foo.c sub/bar.c
+
+done
+
+:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check silent-rules mode for Lex.
+# Keep this in sync with sister test `silent-lex-gcc.test'.
required='flex'
-. ./defs
+. ./defs || Exit 1
set -e
$AUTOMAKE --add-missing
$AUTOCONF
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected. Try also with dependency tracking
+# explicitly disabled.
for config_args in \
- '' \
- am_cv_CC_dependencies_compiler_type=gcc \
- --disable-dependency-tracking
+ --enable-dependency-tracking --disable-dependency-tracking
do
./configure $config_args --enable-silent-rules
--- /dev/null
+#!/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 silent-rules mode, with gcc depmode and many languages at once.
+# This test partly overlaps with other silent*.test, but it serves as
+# a stress test by using many different languages at once -- so don't
+# remove this test script.
+# This test requires the GNU compilers; keep it in sync with sister test
+# `silent-many-generic.test', which should work with generic compilers.
+
+required='gcc g++ gfortran flex bison'
+. ./defs || Exit 1
+
+set -e
+
+# Avoids too much code duplication.
+do_and_check_silent_build ()
+{
+ case $1 in
+ --rebuild) rebuild=true;;
+ *) rebuild=false;;
+ esac
+
+ $MAKE >stdout || { cat stdout; Exit 1; }
+ cat stdout
+ # Avoid spurious failures with SunStudio Fortran compilers.
+ sed '/^NOTICE:/d' stdout > t
+ mv -f t stdout
+ cat stdout
+
+ $EGREP ' (-c|-o)' stdout && Exit 1
+ $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+ grep 'CXX .*foo1\.' stdout
+ grep 'CXX .*baz1\.' stdout
+ grep 'FC .*foo2\.' stdout
+ grep 'FC .*baz2\.' stdout
+ grep 'F77 .*foo3\.' stdout
+ grep 'F77 .*baz3\.' stdout
+ grep ' CC .*foo5\.' stdout
+ grep ' CC .*baz5\.' stdout
+ grep ' CC .*foo6\.' stdout
+ grep ' CC .*baz6\.' stdout
+
+ grep 'CXXLD .*foo' stdout
+ grep 'CCLD .*bar' stdout
+ grep 'CXXLD .*baz' stdout
+ grep 'CCLD .*bla' stdout
+
+ if $rebuild; then :; else
+ grep 'YACC .*foo6\.' stdout
+ grep 'YACC .*baz6\.' stdout
+ grep 'LEX .*foo5\.' stdout
+ grep 'LEX .*baz5\.' stdout
+ fi
+
+ unset rebuild
+}
+
+# Avoids too much code duplication.
+do_and_check_verbose_build ()
+{
+
+ case $1 in
+ --rebuild) rebuild=true;;
+ *) rebuild=false;;
+ esac
+
+ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ grep ' -c ' stdout
+ grep ' -o ' stdout
+
+ $EGREP '(CC|CXX|FC|F77|LD) ' stdout && Exit 1
+
+ if $rebuild; then :; else
+ grep 'ylwrap ' stdout
+ $EGREP '(LEX|YACC) ' stdout && Exit 1
+ fi
+
+ unset rebuild
+}
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_CXX
+AC_PROG_F77
+AC_PROG_FC
+AC_PROG_LEX
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo bar fo2
+bar_CFLAGS = $(AM_CFLAGS)
+foo_SOURCES = foo1.cpp foo2.f90 foo3.f foo5.l foo6.y
+fo2_SOURCES = $(foo_SOURCES)
+fo2_CPPFLAGS = $(AM_CPPFLAGS)
+fo2_FFLAGS = $(AM_FFLAGS)
+fo2_FCFLAGS = $(AM_FCFLAGS)
+SUBDIRS = sub
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = foo6.h
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = baz bla ba2
+bla_CFLAGS = $(AM_CFLAGS)
+baz_SOURCES = baz1.cpp baz2.f90 baz3.f baz5.l baz6.y
+ba2_SOURCES = $(baz_SOURCES)
+ba2_CPPFLAGS = $(AM_CPPFLAGS)
+ba2_FFLAGS = $(AM_FFLAGS)
+ba2_FCFLAGS = $(AM_FCFLAGS)
+AM_YFLAGS = -d
+LDADD = $(LEXLIB)
+BUILT_SOURCES = baz6.h
+EOF
+
+cat > foo1.cpp <<'EOF'
+int main ()
+{
+ return 0;
+}
+EOF
+cat > foo2.f90 <<'EOF'
+ subroutine foo2
+ return
+ end
+EOF
+cat > foo3.f <<'EOF'
+ subroutine foo3
+ return
+ end
+EOF
+cat > foo5.l <<'EOF'
+%%
+"END" return EOF;
+.
+%%
+EOF
+cat > foo6.y <<'EOF'
+%{
+void yyerror (char *s) {}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo1.cpp bar.c
+cp foo1.cpp sub/baz.c
+cp foo1.cpp sub/bla.c
+cp foo1.cpp sub/baz1.cpp
+cp foo2.f90 sub/baz2.f90
+cp foo3.f sub/baz3.f
+cp foo5.l sub/baz5.l
+cp foo6.y sub/baz6.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-many-gcc.test'.
+for config_args in \
+ am_cv_CC_dependencies_compiler_type=gcc
+do
+
+ ./configure $config_args --enable-silent-rules
+
+ do_and_check_silent_build
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+ do_and_check_silent_build --rebuild
+
+ # Ensure a clean rebuild.
+ $MAKE clean
+ # This is required, since these files are not removed by `make clean'
+ # (as dictated by the GNU Coding Standards).
+ rm -f foo5.c foo6.[ch] sub/baz5.c sub/baz6.[ch]
+
+ do_and_check_verbose_build
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+ do_and_check_verbose_build --rebuild
+
+ # Ensure a clean reconfiguration/rebuild.
+ $MAKE clean
+ $MAKE maintainer-clean
+
+done
+
+:
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
-# Check silent-rules mode, languages other than C.
+# Check silent-rules mode, with many languages at once.
# This test partly overlaps with other silent*.test, but it serves as
# a stress test by using many different languages at once -- so don't
# remove this test script.
+# This test should work with generic compilers; keep it in sync with
+# sister test `silent-many-gcc.test', which requires the GNU compilers
+# and forces the use of gcc depmode.
# FIXME: generic C++/Fortran compilers should suffice here
required='g++ gfortran flex bison'
-. ./defs
+. ./defs || Exit 1
set -e
$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
+ # Avoid spurious failures with SunStudio Fortran compilers.
+ sed '/^NOTICE:/d' stdout > t
+ mv -f t stdout
+ cat stdout
$EGREP ' (-c|-o)' stdout && Exit 1
$EGREP '(mv|ylwrap) ' stdout && Exit 1
$AUTOMAKE --add-missing
$AUTOCONF
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected. Try also with dependency tracking
+# explicitly disabled.
for config_args in \
- '' \
- am_cv_CC_dependencies_compiler_type=gcc \
- --disable-dependency-tracking
+ --enable-dependency-tracking --disable-dependency-tracking
do
./configure $config_args --enable-silent-rules
--- /dev/null
+#!/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/>.
+
+# Check silent-rules mode for Yacc, forcing gcc depmode.
+# Keep this in sync with sister test `silent-yacc-generic.test'.
+
+required='gcc bison'
+. ./defs || Exit 1
+
+set -e
+
+mkdir sub
+
+cat >>configure.in <<'EOF'
+AM_SILENT_RULES
+AM_PROG_CC_C_O
+AC_PROG_YACC
+AC_CONFIG_FILES([sub/Makefile])
+AC_OUTPUT
+EOF
+
+cat > Makefile.am <<'EOF'
+# Need generic and non-generic rules.
+bin_PROGRAMS = foo1 foo2
+foo1_SOURCES = foo.y
+foo2_SOURCES = $(foo1_SOURCES)
+foo2_CFLAGS = $(AM_CPPFLAGS)
+SUBDIRS = sub
+EOF
+
+cat > sub/Makefile.am <<'EOF'
+AUTOMAKE_OPTIONS = subdir-objects
+# Need generic and non-generic rules.
+bin_PROGRAMS = bar1 bar2
+bar1_SOURCES = bar.y
+bar2_SOURCES = $(bar1_SOURCES)
+bar2_CFLAGS = $(AM_CPPFLAGS)
+EOF
+
+cat > foo.y <<'EOF'
+%{
+void yyerror (char *s) {}
+int yylex (void) {return 0;}
+int main(void) {return 0;}
+%}
+%token EOF
+%%
+fubar : 'f' 'o' 'o' 'b' 'a' 'r' EOF {};
+EOF
+cp foo.y sub/bar.y
+
+$ACLOCAL
+$AUTOMAKE --add-missing
+$AUTOCONF
+
+# Force gcc ("fast") depmode.
+# This apparently useless "for" loop is here to simplify the syncing
+# with sister test `silent-yacc-gcc.test'.
+for config_args in \
+ am_cv_CC_dependencies_compiler_type=gcc
+do
+ ./configure $config_args --enable-silent-rules
+
+ $MAKE >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ $EGREP ' (-c|-o)' stdout && Exit 1
+ $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+ grep 'YACC .*foo\.' stdout
+ grep 'YACC .*bar\.' stdout
+ grep ' CC .*foo\.' stdout
+ grep ' CC .*bar\.' stdout
+ grep 'CCLD .*foo1' stdout
+ grep 'CCLD .*bar1' stdout
+ grep 'CCLD .*foo2' stdout
+ grep 'CCLD .*bar2' stdout
+
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+
+ $MAKE >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ $EGREP ' (-c|-o)' stdout && Exit 1
+ $EGREP '(mv|ylwrap) ' stdout && Exit 1
+
+ # Don't look for YACC, as probably yacc hasn't been re-run.
+ grep ' CC .*foo\.' stdout
+ grep ' CC .*bar\.' stdout
+ grep 'CCLD .*foo1' stdout
+ grep 'CCLD .*bar1' stdout
+ grep 'CCLD .*foo2' stdout
+ grep 'CCLD .*bar2' stdout
+
+ # Ensure a truly clean rebuild.
+ $MAKE clean
+ rm -f foo.[ch] sub/bar.[ch]
+
+ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ grep ' -c ' stdout
+ grep ' -o ' stdout
+ grep 'ylwrap ' stdout
+
+ $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+ # Cleaning and then rebuilding with the same V flag (and without
+ # removing the generated sources in between) shouldn't trigger a
+ # different set of rules.
+ $MAKE clean
+
+ $MAKE V=1 >stdout || { cat stdout; Exit 1; }
+ cat stdout
+
+ # Don't look for ylwrap, as probably lex hasn't been re-run.
+ grep ' -c ' stdout
+ grep ' -o ' stdout
+
+ $EGREP '(YACC|CC|CCLD) ' stdout && Exit 1
+
+ # Ensure a truly clean reconfiguration/rebuild.
+ $MAKE clean
+ $MAKE maintainer-clean
+ rm -f foo.[ch] sub/bar.[ch]
+
+done
+
+:
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# Check silent-rules mode for Yacc.
+# Keep this in sync with sister test `silent-yacc-gcc.test'.
required='bison'
-. ./defs
+. ./defs || Exit 1
set -e
$AUTOMAKE --add-missing
$AUTOCONF
-# configure once for fastdep, once for non-fastdep, once for nodep
+# Force dependency tracking explicitly, so that slow dependency
+# extractors are not rejected. Try also with dependency tracking
+# explicitly disabled.
for config_args in \
- '' \
- am_cv_CC_dependencies_compiler_type=gcc \
- --disable-dependency-tracking
+ --enable-dependency-tracking --disable-dependency-tracking
do
./configure $config_args --enable-silent-rules
# Please keep this file in sync with silent2.test.
-. ./defs
+. ./defs || Exit 1
set -e
# Please keep this file in sync with silent.test.
required=gcc
-. ./defs
+. ./defs || Exit 1
set -e
# Please keep this file in sync with silent4.test and silent9.test.
required=libtoolize
-. ./defs
+. ./defs || Exit 1
set -e
# The libtool command line can contain e.g. a `--tag=CC' option.
sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
-$MAKE distclean
-
:
# Please keep this file in sync with silent3.test and silent9.test.
required="libtoolize gcc"
-. ./defs
+. ./defs || Exit 1
set -e
# The libtool command line can contain e.g. a `--tag=CC' option.
sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
-$MAKE distclean
-
:
# Check user extensibility of silent-rules mode.
-. ./defs
+. ./defs || Exit 1
set -e
# Check user extensibility of silent-rules mode.
-. ./defs
+. ./defs || Exit 1
set -e
--- /dev/null
+#!/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 || Exit 1
+
+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
+
+:
# Please keep this file in sync with silent3.test and silent4.test.
required="libtoolize"
-. ./defs
+. ./defs || Exit 1
set -e
# The libtool command line can contain e.g. a `--tag=CC' option.
sed 's/--tag=[^ ]*/--tag=x/g' stdout | $EGREP '(CC|LD) ' && Exit 1
-$MAKE distclean
-
:
# Check silent-rules mode for C++.
required='g++' # FIXME: any decent C++ compiler should be OK
-. ./defs
+. ./defs || Exit 1
set -e
# Keep this ins sync with the sister test silentf90.test.
required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
set -e
./configure --enable-silent-rules
$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
+# Avoid spurious failures with SunStudio Fortran compilers.
+sed '/^NOTICE:/d' stdout > t
+mv -f t stdout
+cat stdout
$EGREP ' (-c|-o)' stdout && Exit 1
grep 'mv ' stdout && Exit 1
$EGREP '(F77|FC|LD) ' stdout && Exit 1
-$MAKE clean
-$MAKE maintainer-clean
+:
# Keep this ins sync with the sister test silentf77.test.
required='gfortran' # FIXME: any working Fortran compiler should be OK!
-. ./defs
+. ./defs || Exit 1
set -e
./configure --enable-silent-rules
$MAKE >stdout || { cat stdout; Exit 1; }
cat stdout
+# Avoid spurious failures with SunStudio Fortran compilers.
+sed '/^NOTICE:/d' stdout > t
+mv -f t stdout
+cat stdout
$EGREP ' (-c|-o)' stdout && Exit 1
grep 'mv ' stdout && Exit 1
$EGREP '(F77|FC|LD) ' stdout && Exit 1
-$MAKE clean
-$MAKE maintainer-clean
+:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+# Copyright (C) 1998, 2001, 2002, 2003, 2005, 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
EOF
mkdir sub
+
cat > sub/p.m4 << 'END'
-AC_SUBST(MAGICALPIG)
+AC_SUBST([MAGICALPIG])
END
cat > sub/h.m4 << 'END'
-AC_SUBST(MAGICALHOG)
+AC_SUBST([MAGICALHOG])
END
cat > sub/g.m4 << 'END'
-AC_SUBST(GREPME)
+AC_SUBST([GREPME])
END
: > Makefile.am
-echo 'sinclude(sub/g.m4)' >> acinclude.m4
-echo 'm4_sinclude(sub/doesntexist.m4)' >> acinclude.m4
+echo 'sinclude([sub/g.m4])' >> acinclude.m4
+echo 'm4_sinclude([sub/doesntexist.m4])' >> acinclude.m4
$ACLOCAL
-echo 'm4_sinclude(sub/p.m4)' >> aclocal.m4
-echo 'm4_include(sub/h.m4)' >> aclocal.m4
+echo 'm4_sinclude([sub/p.m4])' >> aclocal.m4
+echo 'm4_include([sub/h.m4])' >> aclocal.m4
$AUTOMAKE
grep MAGICALPIG Makefile.in
grep MAGICALHOG Makefile.in
grep GREPME Makefile.in
+
+:
#! /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
. ./defs || Exit 1
+set -e
+
echo AC_PROG_CC >> configure.in
cat > Makefile.am << 'END'
foo_SOURCES = foo.c
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(test, 0.1)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
-
-$FGREP -e '-o foo-foo' Makefile.in || Exit 1
-
-$FGREP 'foo.o.o' Makefile.in && Exit 1
-$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$ACLOCAL
+$AUTOMAKE
-$FGREP '$(foo_CFLAGS)' Makefile.in || Exit 1
+$FGREP ' -o foo-foo' Makefile.in
+$FGREP 'foo.o.o' Makefile.in && Exit 1
+$FGREP 'foo.$(OBJEXT).$(OBJEXT)' Makefile.in && Exit 1
+$FGREP '$(foo_CFLAGS)' Makefile.in
-Exit 0
+:
#! /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
-AM_CONDITIONAL(BAR, true)
+AM_CONDITIONAL([BAR], [true])
END
cat > Makefile.am << 'END'
: > compile
-$ACLOCAL || Exit 1
-$AUTOMAKE || Exit 1
+$ACLOCAL
+$AUTOMAKE
uncondval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
foo_SOURCES += $(BAR_SRCS)
END
-$AUTOMAKE || Exit 1
+$AUTOMAKE
condval=`$FGREP 'foo-foo.o: foo.c' Makefile.in`
test "x$uncondval" = "x$condval"
+
+:
#! /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 > Makefile.am << 'END'
TAGS_DEPENDENCIES = joe
## Required to avoid error.
ETAGS_ARGS = joe
END
-$ACLOCAL || Exit 1
+$ACLOCAL
$AUTOMAKE
+
+:
#! /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 > Makefile.am << 'EOF'
bni_PROGRAMS = zot
EOF
-if $ACLOCAL || Exit 1
-$AUTOMAKE; then
- Exit 1
-fi
-Exit 0
+$ACLOCAL
+AUTOMAKE_fails
+grep 'bni_PROGRAMS' stderr
+grep 'bnidir.*undefined' stderr
+
+:
#! /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
set -e
cat >> configure.in << END
-AM_CONFIG_HEADER(1.h
- 2.h:config.hin
- 3.h:sdir1/config1.hin)
+AM_CONFIG_HEADER([1.h
+ 2.h:config.hin
+ 3.h:sdir1/config1.hin])
# AM_CONFIG_HEADER and AC_CONFIG_HEADERS should be synonyms.
-AC_CONFIG_HEADERS(sdir1/4.h
- sdir1/5.h:config.hin
- sdir1/6.h:sdir1/config1.hin
- sdir1/7.h:sdir2/config2.hin)
+AC_CONFIG_HEADERS([sdir1/4.h
+ sdir1/5.h:config.hin
+ sdir1/6.h:sdir1/config1.hin
+ sdir1/7.h:sdir2/config2.hin])
AC_OUTPUT
END
test ! -f sdir1/stamp-h6
test -f sdir1/stamp-h7
-Exit 0
+:
--- /dev/null
+#! /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 install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip. See sister test strip3.
+
+required=strip
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+lib_LIBRARIES = libfoo.a
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > libfoo.c << 'END'
+int foo () { return 0; }
+END
+
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
--- /dev/null
+#! /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 install-strip works when STRIP consists of more than one word.
+# This test needs GNU binutils strip. Libtool variant.
+
+required='libtoolize strip'
+. ./defs || Exit 1
+
+set -e
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+lib_LTLIBRARIES = libfoo.la
+END
+
+cat > foo.c << 'END'
+int main () { return 0; }
+END
+
+cat > libfoo.c << 'END'
+int foo () { return 0; }
+END
+
+libtoolize
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+prefix=`pwd`/inst
+./configure --prefix="$prefix" STRIP='strip --verbose'
+$MAKE
+$MAKE install-strip
+
+:
sed <configure.in >configure.tmp -e '/^AC_OUTPUT$/i\
AC_CONFIG_FILES([maude/Makefile])\
-m4_include([confile.m4])'
+m4_include([confile.m4])\
+' # last newline required by older OpenBSD sed
mv -f configure.tmp configure.in
cat configure.in # might be useful for debugging
# Skip this test on configure errors (e.g., broken C++ compilers).
./configure || Exit 77
+# Ensure './libtool --help' will use the right tool versions.
+export AUTOCONF AUTOMAKE
+
# Opportunistically check that --tag=CXX is used when supported.
if ./libtool --help | grep tag=TAG; then
$MAKE print >stdout || { cat stdout; Exit 1; }
--- /dev/null
+#! /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
.x_.y:
cp $< $@
+.PHONY: print
print:
- echo BEGIN: $(libfoo_la_OBJECTS) :END
+ @echo BEGIN: $(libfoo_la_OBJECTS) :END
END
libtoolize --force
$MAKE print >stdout || { cat stdout; Exit 1; }
cat stdout
-grep 'BEGIN: foo.lo :END' stdout
+$FGREP 'BEGIN: foo.lo :END' stdout
:
#! /bin/sh
-# Copyright (C) 1998, 2001, 2002, 2003 Free Software Foundation, Inc.
+# Copyright (C) 1998, 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
$ACLOCAL
AUTOMAKE_fails
-grep 'Makefile.am:2:.*blank line' stderr
+grep 'Makefile\.am:2:.*blank line' stderr
+
+:
--- /dev/null
+#! /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
+
+:
required=gcc
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT(foo.c)
-AM_INIT_AUTOMAKE(target-cflags,0.0)
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
#endif
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
$MAKE
./foo
./bar
+
+:
#! /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
END
$ACLOCAL
-$AUTOCONF
AUTOMAKE_fails -a
grep 'redefinition.*ctags' stderr
+
+:
#! /bin/sh
-# Copyright (C) 2003, 2004, 2007, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004, 2007, 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
mkdir aux1
mkdir tex
-cp "$testsrcdir/../lib/texinfo.tex" tex
+cp "$top_testsrcdir/lib/texinfo.tex" tex
$ACLOCAL
$AUTOMAKE --add-missing
$ACLOCAL
$AUTOMAKE
+
+for i in 1 2 3 4; do
+ grep "^MY_FLAGS_$i *= *-DABC=345 *$" Makefile.in
+done
+
+:
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}
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
# processed far later).
echo 'AUTOMAKE_OPTIONS = -Wno-portability' >> Makefile.am
$AUTOMAKE
+
+:
#! /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
EOF
sed -n '/^install:/,/^ /p' Makefile.in > target.value
diff target.expected target.value
+
+:
--- /dev/null
+#! /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 we warn about possible variable typos when we should,
+# Libtool variant.
+
+required=libtoolize
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_LIBTOOL
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+libfoo_la_SOURCES = unused
+nodist_libfoo_la_SOURCES = unused
+EXTRA_libfoo_la_SOURCES = unused
+libfoo_la_LIBADD = unused
+libfoo_la_DEPENDENCIES = unused
+EXTRA_libfoo_la_DEPENDENCIES = unused
+END
+
+libtoolize
+$ACLOCAL
+AUTOMAKE_fails --add-missing
+# The expected diagnostic is:
+# automake: warnings are treated as errors
+# Makefile.am:3: warning: variable `EXTRA_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:3: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:1: warning: variable `libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:1: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:2: warning: variable `nodist_libfoo_la_SOURCES' is defined but no program or
+# Makefile.am:2: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:4: warning: variable `libfoo_la_LIBADD' is defined but no program or
+# Makefile.am:4: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:6: warning: variable `EXTRA_libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:6: library has `libfoo_la' as canonical name (possible typo)
+# Makefile.am:5: warning: variable `libfoo_la_DEPENDENCIES' is defined but no program or
+# Makefile.am:5: library has `libfoo_la' as canonical name (possible typo)
+
+
+test -z "`grep 'as canonical' stderr | grep -v ' .libfoo_la. '`"
+test `grep 'variable.*is defined but' stderr | wc -l` = 6
+
+# If we add a global -Wnone, all warnings should disappear.
+$AUTOMAKE -Wnone
+
+# Likewise, if matching programs or libraries are defined.
+cat >>Makefile.am <<'END'
+lib_LTLIBRARIES = libfoo.la
+END
+
+$AUTOMAKE
+
+:
--- /dev/null
+#! /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 we warn about possible variable typos when we should.
+
+. ./defs || Exit 1
+
+set -e
+
+cat >>configure.in <<'END'
+AC_PROG_RANLIB
+AC_OUTPUT
+END
+
+cat >Makefile.am <<'END'
+foo_SOURCES = unused
+nodist_foo_SOURCES = unused
+EXTRA_foo_SOURCES = unused
+foo_LDADD = unused
+foo_LDFLAGS = unused
+foo_DEPENDENCIES = unused
+EXTRA_foo_DEPENDENCIES = unused
+
+libfoo_a_SOURCES = unused
+nodist_libfoo_a_SOURCES = unused
+EXTRA_libfoo_a_SOURCES = unused
+libfoo_a_LIBADD = unused
+libfoo_a_DEPENDENCIES = unused
+EXTRA_libfoo_a_DEPENDENCIES = unused
+END
+
+$ACLOCAL
+AUTOMAKE_fails
+# The expected diagnostic is:
+# automake: warnings are treated as errors
+# Makefile.am:2: warning: variable `nodist_foo_SOURCES' is defined but no program or
+# Makefile.am:2: library has `foo' as canonical name (possible typo)
+# Makefile.am:1: warning: variable `foo_SOURCES' is defined but no program or
+# Makefile.am:1: library has `foo' as canonical name (possible typo)
+# Makefile.am:9: warning: variable `libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:9: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:10: warning: variable `nodist_libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:10: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:11: warning: variable `EXTRA_libfoo_a_SOURCES' is defined but no program or
+# Makefile.am:11: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:3: warning: variable `EXTRA_foo_SOURCES' is defined but no program or
+# Makefile.am:3: library has `foo' as canonical name (possible typo)
+# Makefile.am:12: warning: variable `libfoo_a_LIBADD' is defined but no program or
+# Makefile.am:12: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:4: warning: variable `foo_LDADD' is defined but no program or
+# Makefile.am:4: library has `foo' as canonical name (possible typo)
+# Makefile.am:5: warning: variable `foo_LDFLAGS' is defined but no program or
+# Makefile.am:5: library has `foo' as canonical name (possible typo)
+# Makefile.am:14: warning: variable `EXTRA_libfoo_a_DEPENDENCIES' is defined but no program or
+# Makefile.am:14: library has `libfoo_a' as canonical name (possible typo)
+# Makefile.am:7: warning: variable `EXTRA_foo_DEPENDENCIES' is defined but no program or
+# Makefile.am:7: library has `foo' as canonical name (possible typo)
+# Makefile.am:6: warning: variable `foo_DEPENDENCIES' is defined but no program or
+# Makefile.am:6: library has `foo' as canonical name (possible typo)
+# Makefile.am:13: warning: variable `libfoo_a_DEPENDENCIES' is defined but no program or
+# Makefile.am:13: library has `libfoo_a' as canonical name (possible typo)
+
+test -z "`grep 'as canonical' stderr | grep -v ' .foo. ' | grep -v ' .libfoo_a. '`"
+test `grep 'variable.*is defined but' stderr | wc -l` = 13
+
+# If we add a global -Wnone, all warnings should disappear.
+$AUTOMAKE -Wnone
+
+# Likewise, if matching programs or libraries are defined.
+cat >>Makefile.am <<'END'
+bin_PROGRAMS = foo
+lib_LIBRARIES = libfoo.a
+END
+
+$AUTOMAKE
+
+:
#! /bin/sh
-# Copyright (C) 2002, 2008 Free Software Foundation, Inc.
+# Copyright (C) 2002, 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
set -e
-cat >configure.in <<'END'
+cat >configure.in <<END
m4_include([version.m4])
-AC_INIT([version7], [THE_VERSION])
+AC_INIT([$me], [THE_VERSION])
AM_INIT_AUTOMAKE
AC_CONFIG_FILES([Makefile])
AC_OUTPUT
$MAKE
grep '2\.718' version.texi
-
$sleep
echo 'm4_define([THE_VERSION], [3.141])' > version.m4
$MAKE distcheck
./configure --version | grep '3\.141'
grep '3\.141' version.texi
+
+:
#! /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
$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
# 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 --Werror and --add-missing work together.
+# Test to make sure -Werror and --add-missing work together.
. ./defs || Exit 1
rm -f install-sh depcomp missing mkinstalldirs
$ACLOCAL
-$AUTOMAKE --Werror --add-missing
+$AUTOMAKE -Werror --add-missing
--- /dev/null
+#! /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
+
+:
--- /dev/null
+#! /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/>.
+
+# Basic semantic checks on Yacc support.
+
+required=bison
+. ./defs || Exit 1
+
+set -e
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
+AC_PROG_CC
+AC_PROG_YACC
+AC_OUTPUT
+END
+
+cat > Makefile.am << 'END'
+bin_PROGRAMS = foo
+foo_SOURCES = parse.y foo.c
+END
+
+cat > parse.y << 'END'
+%{
+#include <stdio.h>
+#include <stdlib.h>
+int yylex () { return (getchar ()); }
+void yyerror (char *s) {}
+%}
+%%
+a : 'a' { exit(0); };
+END
+
+cat > foo.c << 'END'
+int main () { yyparse (); return 1; }
+END
+
+$ACLOCAL
+$AUTOCONF
+$AUTOMAKE -a
+
+./configure
+$MAKE
+
+echo a | ./foo
+echo b | ./foo && Exit 1
+
+# The generated file `parse.c' must be shipped.
+$MAKE distdir
+test -f $distdir/parse.c
+
+# Sanity check on distribution.
+$MAKE distcheck
+
+# While we are at it, make sure that parse.c is erased by
+# maintainer-clean, and not by distclean.
+test -f parse.c
+$MAKE distclean
+test -f parse.c
+./configure # we must re-create `Makefile'
+$MAKE maintainer-clean
+test ! -f parse.c
+
+:
#! /bin/sh
-# Copyright (C) 1996, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1996, 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
$ACLOCAL
$AUTOMAKE -a
-grep 'zardoz.c' Makefile.in
+$FGREP 'zardoz.c' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2003, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
AC_PROG_YACC
END
+# Run it here once and for all, since we are not going to modify
+# configure.in anymore.
+$ACLOCAL
+
cat > Makefile.am <<'END'
bin_PROGRAMS = zardoz
zardoz_SOURCES = zardoz.y
# Don't redefine several times the same variable.
cp Makefile.am Makefile.src
-$ACLOCAL
$AUTOMAKE -a
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
-
-
+$FGREP 'zardoz.h' Makefile.in && Exit 1
cp Makefile.src Makefile.am
echo 'AM_YFLAGS = -d' >> Makefile.am
-
$AUTOMAKE
-
# If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null
-
-
+$FGREP 'zardoz.h' Makefile.in
cp Makefile.src Makefile.am
echo 'AM_YFLAGS = ' >> Makefile.am
-
$AUTOMAKE
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
-
-
+$FGREP 'zardoz.h' Makefile.in && Exit 1
cp Makefile.src Makefile.am
echo 'YFLAGS = -d' >> Makefile.am
-
-# YFLAGS is a use variable.
+# YFLAGS is a user variable.
AUTOMAKE_fails
-grep 'YFLAGS' stderr
+grep 'YFLAGS.* user variable' stderr
+grep 'AM_YFLAGS.* instead' stderr
$AUTOMAKE -Wno-gnu
-
# If zardoz.h is NOT mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null
-
-
+$FGREP 'zardoz.h' Makefile.in
cp Makefile.src Makefile.am
echo 'YFLAGS = ' >> Makefile.am
-
$AUTOMAKE -Wno-gnu
-
# If zardoz.h IS mentioned, fail
-grep 'zardoz.h' Makefile.in > /dev/null && Exit 1
+$FGREP 'zardoz.h' Makefile.in && Exit 1
:
#! /bin/sh
-# Copyright (C) 1999, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1999, 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
AUTOMAKE_OPTIONS = no-dependencies
bin_PROGRAMS = zardoz
zardoz_SOURCES = zardoz.y
-magic:
- @echo $(DIST_COMMON)
END
$ACLOCAL
$AUTOMAKE -a
-$FGREP -v @SET_MAKE@ Makefile.in > Makefile.sed
# It should not be disted here
-grep 'zardoz.h' Makefile.in && Exit 1
+$FGREP 'zardoz.h' Makefile.in && Exit 1
-cp Makefile.am Save
+cp Makefile.am Makefile.sav
# Test all available flags to make sure header is distributed with
# `-d'.
for flag in YFLAGS AM_YFLAGS zardoz_YFLAGS; do
- cp Save Makefile.am
+ cp Makefile.sav Makefile.am
echo "$flag = -d" >> Makefile.am
-
$AUTOMAKE -Wno-gnu
- grep 'zardoz.h' Makefile.in
+ $FGREP 'zardoz.h' Makefile.in
done
+
+:
#! /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
required='bison gcc'
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE(foo, 0.1)
-PACKAGE=foo
-VERSION=0.1
+set -e
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
int main () { return 0; }
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
$MAKE maintainer-clean
test ! -f bar.c
test ! -f parse.c
-:
-Exit 0
+:
#! /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
set -e
-cat > configure.in << 'END'
-AC_INIT
-AM_INIT_AUTOMAKE(nonesuch, nonesuch)
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
-AC_OUTPUT(Makefile)
END
cat > Makefile.am << 'END'
maude_YFLAGS = -d
END
-$ACLOCAL || Exit 1
-$AUTOMAKE -a || Exit 1
+$ACLOCAL
+$AUTOMAKE -a
# Rule should use maude_YFLAGS.
grep 'AM_YFLAGS.*maude' Makefile.in && Exit 1
# Make sure the .o file is required.
grep '^am_maude_OBJECTS.*maude' Makefile.in
+
+:
#! /bin/sh
-# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2006, 2007, 2010 Free Software
# Foundation, Inc.
#
# This program is free software; you can redistribute it and/or modify
cat > configure.in << 'END'
AC_INIT([yacc6], [1.0])
+# `aux' is not an acceptable file/directory name on Windows systems
AC_CONFIG_AUX_DIR([aux1])
AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+AC_CONFIG_FILES([Makefile sub/Makefile])
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
-AC_CONFIG_FILES([sub/Makefile])
AC_OUTPUT
END
test -f aux1/ylwrap
test ! -f ylwrap
test ! -f sub/ylwrap
-$FGREP '(top_srcdir)/aux1/ylwrap' sub/Makefile.in
+$FGREP '$(top_srcdir)/aux1/ylwrap' sub/Makefile.in
./configure
$MAKE
-grep '#.*line.*foo.y' sub/foo.c
-grep '#.*line.*bar.y' sub/bar.c
+grep '#.*line.*foo\.y' sub/foo.c
+grep '#.*line.*bar\.y' sub/bar.c
$sleep
: > z
mv -f sub/bar.yt sub/bar.y
$MAKE
$MAKE test-time-changed
+
+:
#! /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
required=bison
. ./defs || Exit 1
+set -e
+
cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
%%
END
-set -e
-
$ACLOCAL
$AUTOMAKE -a
$AUTOCONF
test -f foo.h
test -f foo.c
# ... but maintainer-clean should.
-./configure
+./configure # we must re-create `Makefile'
$MAKE maintainer-clean
test ! -f foo.h
test ! -f foo.c
+
:
#! /bin/sh
-# Copyright (C) 2002, 2003, 2004, 2006 Free Software Foundation, Inc.
+# Copyright (C) 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
set -e
-cat > configure.in << 'END'
-AC_INIT([yacc8], [1.0])
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE
-AC_CONFIG_FILES([Makefile])
+cat >> configure.in << 'END'
AC_PROG_CC
AM_PROG_CC_C_O
AC_PROG_YACC
foo_foo_SOURCES = foo/parse.y
AM_YFLAGS = -d
+.PHONY: obj
obj: foo/parse.$(OBJEXT)
-test1: obj
- test -f foo/parse.c
- test -f foo/parse.$(OBJEXT)
-
-test2: obj
+.PHONY: test1 test2
+test1: foo/parse.$(OBJEXT)
test -f foo/parse.c
test -f foo/parse.$(OBJEXT)
+test2: foo/parse2.$(OBJEXT)
+ test -f foo/parse2.c
+ test -f foo/parse2.$(OBJEXT)
END
mkdir foo
END
$AUTOMAKE -a
-test -f ./ylwrap || Exit 1
+test -f ./ylwrap
cd sub
# Regenerate Makefile (automatic in GNU Make, but not in other Makes)
./config.status
$MAKE test2
+
+:
# Removal recovery rules for headers should not remove files with `make -n'.
+required=bison
. ./defs || Exit 1
set -e
#! /bin/sh
-# Copyright (C) 1997, 2001, 2002, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1997, 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
# 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 yacc + c++ works.
+# Test to make sure Yacc + C++ is supported.
+# Please keep this is sync with sister test lexcpp.test.
. ./defs || Exit 1
END
cat > Makefile.am << 'END'
-bin_PROGRAMS = zardoz
-zardoz_SOURCES = zardoz.yy
+bin_PROGRAMS = foo bar baz qux
+foo_SOURCES = foo.y++
+bar_SOURCES = bar.ypp
+baz_SOURCES = baz.yy
+qux_SOURCES = qux.yxx
END
$ACLOCAL
$AUTOMAKE -a
-grep zardoz.cc Makefile.in
+sed -e 's/^/ /' -e 's/$/ /' Makefile.in >mk
+$FGREP ' foo.c++ ' mk
+$FGREP ' bar.cpp ' mk
+$FGREP ' baz.cc ' mk
+$FGREP ' qux.cxx ' mk
+
+:
#! /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/>.
# This test checks that dependent files are updated before including
-# in the distribution. `parse.c' depends on `parce.y'. The later is
+# in the distribution. `parse.c' depends on `parse.y'. The later is
# updated so that `parse.c' should be rebuild. Then we are running
# `make' and `make distdir' and check whether the version of `parse.c'
# to be distributed is up to date.
+# Please keep this in sync with sister test `lexvapth.test'.
+
required='gcc bison'
. ./defs || Exit 1
-cat > configure.in << 'END'
-AC_INIT
-AC_CONFIG_AUX_DIR([.])
-AM_INIT_AUTOMAKE(foo, 0.1)
-PACKAGE=foo
-VERSION=0.1
+set -e
+
+distdir=$me-1.0
+
+cat >> configure.in << 'END'
AC_PROG_CC
AC_PROG_YACC
-AC_OUTPUT(Makefile)
+AC_OUTPUT
END
cat > Makefile.am << 'END'
int main () { return 0; }
END
-set -e
-
$ACLOCAL
$AUTOCONF
$AUTOMAKE -a
$MAKE
$MAKE distdir
-grep fubar foo-0.1/parse.c
+$FGREP fubar $distdir/parse.c
#
# Now check to make sure that `make dist' will rebuild the parser.
END
$MAKE distdir
-grep maude foo-0.1/parse.c
+$FGREP maude $distdir/parse.c
+
+: