* lib/Autom4te/FileUtils.pm (handle_exec_errors): New argument
$hint, show if the executing program does not exist.
(xsystem_hint): New function, like xsystem but allows to pass
a hint.
* bin/autoreconf.in: Use xsystem_hint for spawning autopoint and
libtoolize.
Report by Bruce Korb.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/m4sugar/m4sugar.m4 (_m4_wrap): Don't directly invoke wrapped
text, since it may contain text that looks like parameters.
* tests/m4sh.at (AS@&t@_INIT cleanup): Enhance test.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_DEFINE_INIT, _AT_DEFINE_SETUP): New
macros for defining order-enforced macros.
(AT_INIT, AT_SETUP, AT_CLEANUP, AT_BANNER, AT_XFAIL_IF)
(AT_CAPTURE_FILE, AT_DATA, AT_CHECK, AT_CHECK_NOESCAPE): Add error
messages when order violations are detected.
* tests/autotest.at (AT_CHECK_AT_SYNTAX): New helper macro.
(AT_SETUP without AT_INIT, AT_BANNER without AT_INIT)
(AT_CLEANUP without AT_INIT, Missing AT_CLEANUP)
(AT_CHECK without AT_SETUP, AT_DATA without AT_SETUP)
(AT_XFAIL_IF without AT_DATA, AT_KEYWORDS without AT_SETUP,
(AT_CLEANUP without AT_SETUP, AT_BANNER inside AT_SETUP)
(AT_SETUP inside AT_SETUP, Multiple AT_INIT)
(Banner-only test suite): New tests.
Reported by Christopher Hulbert.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/m4sugar/m4sugar.m4 (m4_wrap): Override M4 implementation.
(m4_wrap_lifo, _m4_wrap): New macros.
* lib/m4sugar/m4sh.m4 (AS_INIT): Combine all cleanup into known
order, prior to m4sugar's.
(_AS_DETECT_BETTER_SHELL): Use cleanup parameter, rather than
m4_wrap.
* lib/autotest/general.m4 (AT_INIT): Combine all cleanup into
known order, prior to m4sh's.
* doc/autoconf.texi (Diagnostic Macros) <m4_fatal>: Document
argument.
(Redefined M4 Macros) <m4_wrap>: Rewrite documentation to match
new behavior.
* tests/m4sh.at (AS_INIT cleanup): New test.
* NEWS: Document the change.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT_PREP): Avoid raw AT_ in output.
(unusual file names): Likewise.
(m4_pattern_allow): Remove loophole, to make it easier to catch
poorly written tests.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/autotest.at (AT_CHECK_AT_PREP): New macro, to factor out
common initialization.
(AT_CHECK_AT, Banners, Keywords and ranges, srcdir propagation)
(whitespace in absolute testdir, unusual file names): Use it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_CHECK): Wrap commands in {;}.
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Test it.
Signed-off-by: Eric Blake <ebb9@byu.net>
* tests/torture.at (Substitute and define special characters):
MinGW awk cannot handle 0xFF, and on MinGW, the test does the
wrong thing for CR.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AT_CHECK_CONFIG_CREATION_NOWRITE): Skip
no-write portion if user has root-like privileges.
Signed-off-by: Eric Blake <ebb9@byu.net>
* bin/autoreconf.in ($run_make): Renamed from ...
($make): ... this. Use now as command to run `make',
overridden by $MAKE. Document this in --help output.
* doc/autoconf.texi (autoreconf Invocation): Document
all environment variables honored by autoreconf.
* NEWS: Update.
Report by Paul Eggert.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Looping constructs): s/recurses/repeats/.
(Evaluation Macros): Drop `1' suffix from metasyntax variable name
that preceeds @dots. Improve wording.
(Text processing Macros): Drop `1' suffix from metasyntax variable
name that preceeds @dots.
(Number processing Macros): Drop `1' suffix from metasyntax
variable name that preceeds @dots. Improve wording.
* lib/m4sugar/m4sugar.m4 (m4_cmp): Comment wording fix.
Suggested by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* GNUmakefile: Merge from coreutils.
* Makefile.am (dist-hook): Inject .tarball-version into tarball,
not .version.
* configure.ac (AC_INIT): Use .tarball-version, not .version.
* build-aux/git-version-gen: Update from gnulib.
Before using /dev/full, check that it is a writable character
special device.
Report by Benoit Sigoure and Eric Blake.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Actually check generated file contents for the name of the
generated file, using AC_PROG_FGREP and $FGREP.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* tests/atlocal.in (func_sanitize_file_name)
(func_sanitize_dir_name): New shell functions.
* tests/tools.at (autom4te and whitespace in file names)
(autotools and whitespace in file names): Use them.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Cover more potentially problemtic file names. Use the new
functions.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
The test suite did not cover this bug because the code was not
quoting properly the arguments of `rm -f' (which "fails" silently)
as well as the arguments of `diff' (whose output was redirected to
/dev/null so we couldn't see its error message).
* lib/autoconf/status.m4 (_AC_OUTPUT_HEADER): Properly quote the
file names passed to `rm' and `diff'.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Add a regression test.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE, _AC_OUTPUT_MAIN_LOOP):
Escape the backslashes and ampersands in $configure_input before
using it in the sed replacement string to expand @configure_input@.
Report by Eric Blake and Patrick Welche.
Signed-off-by: Benoit Sigoure <tsuna@lrde.epita.fr>
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* doc/autoconf.texi (Writing Testsuites) <AT_CHECK>: Mention that
checks must live inside a test group.
Reported by Christopher Hulbert.
Signed-off-by: Eric Blake <ebb9@byu.net>
* doc/autoconf.texi (Site Defaults): Fix typo. Add new example
for FHS.
* THANKS: Update.
Reported by Jules Colding and Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT): Fix --clean to work
again, broken since introduction of `-C dir'.
* tests/autotest.at (Choosing where testsuite is run): Test it.
* lib/autotest/general.m4 (AT_LINE): Fix regression from
2007-10-04 when file name is `dnl'.
(AT_INIT) <PREPARE_TESTS>: Move command-line assignments...
<TESTS_BEGIN>: ...to this new diversion, to fix regression from
yesterday in libtool's testsuite.
(_AT_ARG_OPTION): Detect write failure.
* doc/autoconf.texi (Diversion support): Document PREPARE_TESTS to
make libtool's use kosher. Document m4_init.
(Programming in M4sh): Document AS_INIT.
(Writing Testsuites): Document limitation of AT_DATA file name.
* tests/autotest.at (unusual file names): New test.
(Banners, Keywords and ranges): Use correct shell.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS): Fix quoting
bug.
<PARSE_ARGS_END>: Also detect leading digits in assignments.
* tests/autotest.at (Using atlocal): Enhance test to catch last
bug.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <PARSE_ARGS_END>: Detect
leading = as invalid. Defer use of command-line variable
assignments...
<PREPARE_TESTS>: ...here, after atconfig has been sourced. Fix
regression in sourcing files.
* tests/autotest.at (Using atlocal): New test to catch this.
(Debugging a successful test, Choosing where testsuite is run):
Use correct shell.
Reported by Ralf Wildenhues.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (AT_INIT) <PREPARE_TESTS>: Use fewer
forks when sanitizing PATH. Always output machine information,
not just when atconfig was located.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autotest/general.m4 (_AT_ARG_OPTION): Move missing argument
detection...
(AT_INIT) <PARSE_ARGS_END>: ...here, since -k always takes
argument.
<DEFAULTS>: Delay computation of variables based on $at_dir...
<PREPARE_TESTS>: ...to here, since -C can change $at_dir.
<TESTS>: Re-invoke via absolute name, since -C may be in effect.
<PARSE_ARGS>: Parse new option.
<HELP_TUNING>: Document it.
* tests/autotest.at (Choosing where testsuite is run): New test
for this feature.
(Keywords and ranges): Add test for missing -k argument.
* NEWS: Document this.
* doc/autoconf.texi (testsuite Invocation): Likewise.
Signed-off-by: Eric Blake <ebb9@byu.net>
* lib/autoconf/general.m4 (_AC_INIT_HELP): If, for recursive help
mode, we change to the source directory, also set $ac_pwd so we
do not go back to the build tree for the next config subdir.
* tests/torture.at (Deep Package): Extend test to contain two
config subdirs on the top level.