summaryrefslogtreecommitdiff
path: root/tests/tools.at
Commit message (Collapse)AuthorAgeFilesLines
* spelling fixesPaul Eggert2023-01-211-1/+1
|
* make update-copyrightPaul Eggert2023-01-201-1/+1
|
* testsuite: Handle `balanced ASCII quotes' correctly in m4 errors.Zack Weinberg2022-07-061-11/+1
| | | | | | | | | | | | | | | | | | | | AT_CHECK_M4 was _documented_ to convert m4: cannot open `foo': No such file or directory to m4: cannot open 'foo': No such file or directory but the regexp that was supposed to do this didn’t work. Fix the regexp, and remove a workaround for the bug in one test (yes, we had code in our own testsuite to work around bugs in our own testsuite!) * tests/local.at (AT_CHECK_M4): Fix regex for “cannot open” messages. * tests/tools.at (autom4te cache): Remove workaround for buggy regex in AT_CHECK_M4.
* make update-copyrightPaul Eggert2022-05-191-1/+1
|
* Rewrite bin/autoconf in Perl.Zack Weinberg2021-09-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Of all the installed programs (autoconf, autoheader, autom4te, autoreconf, autoscan, autoupdate, ifnames) autoconf is the only one that is a shell script instead of a Perl script. This means it has to do a lot of fiddly quoting and requoting to assemble an autom4te command line, it doesn’t get to use the shared option handling code in Autom4te/{General,Getopt}.pm, and it has to duplicate usage text that properly should only be in Autom4te/ChannelDefs.pm. It also means there’s extra code in build-aux/help-extract.pl just for it, and a special two-phase generation process in bin/local.mk. This also paves the way for the bootstrap script mentioned in the previous commit; it will only have to know how to deal with substitution variables, not generation of m4sh scripts. The new script winds up being slightly longer on disk but that’s because our boilerplate for Perl scripts is quite long. The code is visibly simpler. * bin/autoconf.as: Rename to bin/autoconf.in and rewrite in Perl. * bin/local.mk (EXTRA_DIST): Change autoconf.as to autoconf.in. (MOSTLYCLEANFILES): Don’t delete autoconf.in. (bin/autoconf.in): Delete rule. (ETAGS_PERL): Add autoconf.in and sort list. (ETAGS_SH): Delete, no longer needed. * tests/tools.at: Syntax-check autoconf as a Perl script. * build-aux/help-extract.pl: Remove all code for extracting usage text from shell scripts. * man/autoconf.w, man/local.mk: Refer to autoconf.in, not autoconf.as.
* Port test to next m4 versionPaul Eggert2021-08-311-1/+11
| | | | | * tests/tools.at (autom4te cache): Allow m4 to quote 'like this' as well as 'like this'.
* Autoconf now quotes 'like this' instead of `like this'Paul Eggert2021-07-201-30/+30
| | | | | | | Autoconf’s diagnostics now follow current GNU coding standards, which say that diagnostics in the C locale should quote 'like this' with plain apostrophes instead of the older GNU style `like this' with grave accent and apostrophe.
* make update-copyrightZack Weinberg2021-01-281-1/+1
|
* autom4te: always update the output file, even if it hasn’t changedZack Weinberg2020-12-291-0/+46
| | | | | | | | | | | | | Automake generates a Makefile rule for regenerating the configure script, that relies on an invocation of ‘autoconf’ always bumping the timestamp on the configure script, even if it hasn’t changed. The patch to make autom4te update the output file atomically (1725c947144d9bebfe7817c2c5f0d53d884b1297) broke this. Fixes several failures in automake’s test suite. * bin/autom4te.in (handle_output): Always call update_file with force=1. * tests/tools.at (autoconf: timestamp changes): New test.
* autom4te: correct error message when we can’t create autom4te.cache.Zack Weinberg2020-12-231-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While testing something else, I noticed that autom4te may print a nonsensical error message when it fails to create autom4te.cache, because it checks again whether the directory already exists before giving up, and this clobbers errno. Instead of doing (the perl equivalent of) test -d $cache || mkdir $cache || test -d $cache call mkdir unconditionally. If it fails with an errno code other than EEXIST, consider that a hard failure; if it fails with EEXIST, check whether the thing that exists is in fact a directory. (A symlink to a directory qualifies; I wouldn’t be surprised if people are moving autom4te.cache around with symlinks.) Either way, if we fail, report strerror(errno) from the original mkdir failure. Also, print the current working directory as part of the error message; this aids debugging when you’re working with a big hairy nested tree. * bin/autom4te.in: Don’t check whether autom4te.cache exists before attempting to create it. Only stat autom4te.cache if mkdir fails with EEXIST, otherwise fail immediately. Make sure to report the errno code from mkdir, not the subsequent stat (if any). Report the current working directory as part of the error message. * tests/tools.at: Verify that autom4te reports the actual reason when it fails to create autom4te.cache. Verify that failure to create autom4te.cache because that name exists, but isn’t a directory, is detected.
* AC_INCLUDES_DEFAULT: Check for presence of C90 hosted headers (#110393)Zack Weinberg2020-12-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 1993, Autoconf has been assuming that it is safe to include any of the headers defined by ISO C90 without checking for them; this is inaccurate, since only a subset are necessarily available in a C90 *freestanding* environment. It is OK to assume the presence of a header in a macro that checks specifically for something declared by that header (if the header is not present, we will think the specific declaration is unavailable, which is probably accurate for modern embedded environments). It is also OK to continue recommending that user code use these headers unconditionally—anyone working with a freestanding environment knows it. But it is not OK for very generic code within Autoconf itself, such as AC_INCLUDES_DEFAULT, to make this assumption. Note that the set of headers that are not always available includes stdio.h, which we have been assuming can be included unconditionally for even longer. In AC_INCLUDES_DEFAULT, revert to checking for string.h and stdlib.h before including them. Also revert to defining STDC_HEADERS only when string.h and stdlib.h are available (but do not check for float.h and stdarg.h, as these are part of the freestanding set). Add a new check for stdio.h. Sort the inclusion list by standard (C90 freestanding; C90 hosted; C99; POSIX) and alphabetically within each group. Revise all the documentation and update the testsuite. This partially reverts commit 86c213d0e355296f026a36e3203c0813041aae89 and is a partial fix for bug #110393. * lib/autoconf/headers.m4 (AC_CHECK_INCLUDES_DEFAULT): Check for stdio.h, stdlib.h, and string.h before including them. Define STDC_HEADERS only when string.h and stdlib.h are both available. Organize includes list by standard, then alphabetically. * doc/autoconf.texi, NEWS: Update to match. * tests/local.at (AT_CHECK_DEFINES): Make regexes more specific. Also expect a definition of HAVE_STDIO_H. * tests/c.at, tests/semantics.at, tests/tools.at: Use <float.h>, not <stdio.h>, as a header that we expect always to exist. Add HAVE_STDIO_H to various lists of macros that are expected to appear in config.h.
* Make ‘forbidden tokens, basic’ test more robust.Zack Weinberg2020-11-051-1/+10
| | | | | | | | | While testing the previous patch I noticed that the ‘forbidden tokens, basic’ test can fail if it runs too fast, because the autom4te cache files aren’t considered newer than configure.ac. * tests/tools.at (forbidden tokens, basic): Add delays to ensure autom4te.cache files are newer than configure.ac.
* testsuite: Isolate aclocal from third-party macros (#110352).Zack Weinberg2020-11-021-8/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | Several tests in the testsuite run a system-provided aclocal, which will look into its $prefix/share/aclocal for third-party macros. If those macros are buggy, aclocal may bomb out even though the test doesn’t use them, causing the test to fail spuriously. In all tests that need to run aclocal, create an empty directory and give aclocal the --system-acdir option pointing at that directory. This masks out all these potentially buggy macros. (It does *not* mask out AM_INIT_AUTOMAKE, which aclocal will find in a different directory.) In all tests that run autoreconf but *don’t* need to run aclocal, create an empty aclocal.m4 and set ACLOCAL=true in the environment. Fixes bug #110352. Problem reported by Dagobert Michelsen. * tests/fortran.at * tests/tools.at * tests/torture.at: Set ACLOCAL=true in the environment in all tests that run autoreconf but don’t need to run aclocal. Set ACLOCAL="aclocal --system-acdir <empty directory>" in all tests that do need to run aclocal.
* mktmpdir: Ensure that $tmp is always an absolute pathname.Zack Weinberg2020-09-241-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Several autotools programs use ‘do’ to evaluate Perl code generated into a file in the temporary directory created by Autom4te::General::mktmpdir. If the environment variable TMPDIR is a relative path, mktmpdir will set $tmp to a relative path and we’ll end up trying to ‘do’ a relative path, which searches for the file in @INC. This doesn’t work under perl 5.26 or later, because ‘.’ was removed from @INC in that version (for security reasons). Ensure that mktmpdir sets $tmp to an absolute pathname. Also use File::Temp::tempdir to create the temporary directory, instead of shelling out to ‘mktemp -d’; this eliminates a subprocess and means we don’t have to worry about cleaning up the directory on exit. Problem found by Kent Fredric and reported as <https://bugs.gentoo.org/625576>. Supersedes Gentoo’s autoconf-2.69-perl-5.26-2.patch. * lib/Autom4te/General.pm (mktmpdir): Use File::Temp to create temporary directory. Ensure that $tmp is an absolute path. (END): No need to clean up $tmp. * tests/tools.at (autotools and relative TMPDIR): New test.
* Autoupdate AC_{DIAGNOSE,FATAL,OBSOLETE,WARNING} and _AC_COMPUTE_INT.Zack Weinberg2020-09-221-3/+126
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While working on the previous patches I noticed that all of these macros are officially obsolete, but autoupdate doesn’t replace them. _AC_COMPUTE_INT is easy to autoupdate. AC_{DIAGNOSE,FATAL,WARNING} require a little special handling because their replacements are m4sugar macros, and autoupdate normally expands m4sugar macros as it goes. Fortunately, the same workaround as is used for AC_FOREACH can be applied. AC_OBSOLETE also needs that workaround, and cannot be fully replaced automatically. The bulk of the patch is removing internal uses of AC_DIAGNOSE. * lib/autoconf/autoupdate.m4 * lib/autoconf/c.m4 * lib/autoconf/functions.m4 * lib/autoconf/general.m4 * lib/autoconf/headers.m4 * lib/autoconf/lang.m4 * lib/autoconf/status.m4 * lib/autoconf/types.m4 * tests/local.at * tests/tools.at: Use, and/or refer to, m4_warn instead of AC_DIAGNOSE. * lib/autoconf/general.m4 (_AC_COMPUTE_INT): Define using AU_DEFUN. (AC_DIAGNOSE, AC_FATAL, AC_WARNING): Autoupdate to m4_warn, m4_fatal, and m4_warn([syntax], [$1]) respectively, using the same paired AU_DEFUN/AC_DEFUN trick that is used for AC_FOREACH. (AC_OBSOLETE): Autoupdate to m4_warn([obsolete], [$1]) and advise hand-conversion to AU_DEFUN. * lib/autoconf/autoupdate.m4 (AU_DEFUN): Tweak quoting so m4_warn([$3]) is emitted into the edited configure.ac instead of being expanded at autoupdate time. * tests/tools.at (autoupdating AC_FOREACH): Adjust grep expressions. (autoupdating AC_DIAGNOSE and AC_WARNING): New test. (autoupdating AC_FATAL): New test. (autoupdating AC_OBSOLETE): New test. * tests/mktests.sh (ac_exclude_list, au_exclude_list): Exclude AC_DIAGNOSE, AC_FATAL, AC_FOREACH, AC_OBSOLETE, and AC_WARNING if not already excluded.
* Manually sync ChannelDefs.pm from automake.Zack Weinberg2020-09-221-6/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ChannelDefs.pm *ought* to be kept in sync between automake and autoconf, because it defines the set of valid -W options, and autoreconf assumes that it can pass arbitrary -W options to all of the tools it invokes. However, it isn’t covered by either project’s ‘make fetch’ and it hasn’t actually *been* in sync for more than 17 years. This patch manually brings over all of the changes made on the automake side. Once the complementary patch is applied by the automake team, both versions of the file will be the same, and then we can add it to the list in fetch.pl and not have this problem any more in the future. There are some user-visible consequences to bringing this file back into sync. The only one worth mentioning in NEWS is that the ‘obsolete’ category of warnings is now on by default. This had quite a bit of fallout throughout the testsuite. There are also some new warning categories that get mentioned in --help output, but we don’t actually generate any warnings in those categories, so people using ‘-Wall’ won’t see any change. More diagnostics are automatically tagged with ‘warning:’ or ‘error:’, which also had some fallout in the testsuite. Finally, ‘-Werror’ no longer causes complaints about unknown warning categories to be treated as hard errors. Internally, there are some small API changes: ‘parse_warnings’ is no longer usable as a ‘getopt’ callback function, and we now have a stub Autom4te/Config.pm to match the automake code’s expectations. (This file *should* also be synced from automake by ‘make fetch’, but we can’t quite do that yet because it’s a generated file and our build system is not prepared to handle adding *two* directories to @INC when running a not-yet-installed Perl script. I plan to fix that after 2.70.) As a side-effect of adding a Config.pm, ‘prog_error’ now says to report the bug to bug-autoconf, not bug-automake. If this is why we mostly haven’t been using prog_error for internal errors, we can stop avoiding it. (I did not change anything to use prog_error in this patch.) * lib/Autom4te/ChannelDefs.pm: Merge from automake. * lib/Autom4te/Config.pm: New file. * lib/local.mk (dist_perllib_DATA): Add Autom4te/Config.pm. * bin/autoconf.as: Update list of warning categories to match Autom4te::ChannelDefs::usage. * bin/autoheader.in (@warnings): New global. (parse_args): Don’t use parse_warnings as a getopt callback. (main): Add warnings options from our command line to $autoconf. No need to turn on 'obsolete' warnings explicitly. No need to include "warning: " in warning messages. * bin/autom4te.in (parse_args): Don’t use parse_warnings as a getopt callback. (main): No need to include "warning: " in warning messages. * bin/autoreconf.in (parse_args): parse_warnings now takes only one argument. * bin/autoupdate.in: Set WARNINGS=none in environment for all child processes. * tests/local.at (AT_CHECK_M4): Handle `autom4te: error: /usr/bin/m4 ...` like `autom4te: /usr/bin/m4 ...`. (_AT_CHECK_AC_MACRO): Add AUTOCONF-FLAGS argument, passed to both autoconf and autoheader. (AT_CHECK_MACRO): Default AUTOCONF-FLAGS argument to empty. Pass that argument to autoheader as well as autoconf. (AT_CHECK_AU_MACRO): Expect a “macro ‘NAME’ is obsolete’ diagnostic on the first run of autoconf. Pass -Wno-obsolete to autoconf on the second run, and to autoheader on both runs. * tests/base.at * tests/c.at * tests/compile.at * tests/m4sh.at * tests/m4sugar.at * tests/semantics.at * tests/tools.at * tests/torture.at: No need to pass -Wobsolete to autoconf. Pass -Wno-obsolete to autoheader where needed to avoid handling the same warning twice. Update various expectations for diagnostics to match behavior changes. * tests/tools.at (autoupdating AU_ALIAS): Add an AC_CONFIG_HEADERS line to the test configure.ac to eliminate an unrelated diagnostic.
* Warn if AC_INIT or AC_OUTPUT are missing from configure.ac (#107986)Zack Weinberg2020-08-181-5/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is almost always incorrect for a configure script to omit either AC_INIT or AC_OUTPUT. Issue warnings in the ‘syntax’ category for this. The implementation is, unfortunately, a bit of a kludge. To check for the _absence_ of a macro invocation, we can use m4_provide_if inside a m4_wrap hook. However, if we activate the m4_wrap hook directly from general.m4, we get spurious warnings at freeze time. We also get warnings whenever a script that’s missing AC_INIT and/or AC_OUTPUT is *traced*, which means we get double warnings from autoconf, and autoheader and aclocal complain about it too, which seems unnecessary. A clean way to deal with this would be to make the hook look for a special macro that’s defined only when autoconf (the program) is invoked without any --trace arguments. Unfortunately, autom4te doesn’t pass --define down to M4, and changing that would involve coordinating with Automake (the project), so instead I’ve gone for the kludge: a new file lib/autoconf/trailer.m4 that calls m4_wrap. This file is *not* included in autoconf.m4f, but it’s installed, and it’s added to the m4 invocation by autoconf (the program) only when not tracing. (It still uses m4_wrap, because we pass it to m4 *before* configure.ac, because otherwise we get nonsense locations for any *other* diagnostics coming out of this autoconf invocation. I don’t know why.) The additional checks in autoreconf are intended to make sure that if autoreconf skips a directory entirely, you get told why. Lots of tests in the testsuite didn’t bother with AC_OUTPUT, and somewhat fewer didn’t bother with AC_INIT; where possible I just added them. Suggested by David A. Wheeler, who submitted a patch, but I didn’t wind up using any of his code. (His implementation used an extra tracing pass, only checked for a missing AC_INIT, and invented a new command-line option to turn off this specific warning. I thought this was tidier overall, despite the kludge.) * lib/autoconf/general.m4 (_AC_FINALIZE): New macro: code to be run when generating configure, after the entire configure.ac is processed. Currently only checks that AC_INIT and AC_OUTPUT were called at some point, issuing syntax-category warnings if not. (AC_INIT, AC_OUTPUT): m4_provide self. * lib/autoconf/trailer.m4: New file that just calls m4_wrap([_AC_FINALIZE]). * lib/local.mk: Install new file. * bin/autoconf.as: Add trailer.m4 to the final invocation of autom4te, but only when not tracing. * bin/autoreconf.in (autoreconf_current_directory): Distinguish in diagnostics between “directory skipped because it doesn’t have a configure.ac or configure.in” (e.g. Cygnus configure) and “directory has a configure.ac but it doesn’t appear to be autoconf input.” * tests/*.at: Fix all tests affected by the new warnings.
* Expect OpenIndiana test failurePaul Eggert2020-08-021-0/+7
| | | | | | On OpenIndiana, Perl file locking does not work atop NFS. * tests/tools.at (autom4te cache locking): Expect this test to file if Perl file locking does not work.
* Formally obsolete AC_CONFIG_HEADER (#105403)Zack Weinberg2020-07-121-1/+1
| | | | | | | | | | | | | | | This macro was replaced by AC_CONFIG_HEADERS many years ago (before the beginning of the VCS history) and isn’t even documented, but we never got around to making autoupdate notice it. Problem reported *in 2006* by jensseidel@users.sf.net. There was one use of AC_CONFIG_HEADER in our source tree, which is converted. Also, to avoid confusing people reading old NEWS or TODO entries, all mentions of AC_CONFIG_HEADER therein are also replaced with AC_CONFIG_HEADERS. * lib/autoconf/status.m4 (AC_CONFIG_HEADER): Make an AU_ALIAS for AC_CONFIG_HEADERS.
* AC_REPLACE_FUNCS: invoke _AH_CHECK_FUNC and AC_LIBSOURCE unconditionally.Zack Weinberg2020-06-291-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | While investigating something else, I noticed that AC_REPLACE_FUNCS calls _AH_CHECK_FUNC and AC_LIBSOURCE in the success branch of an AC_CHECK_FUNC. This doesn’t work; both of those are marker macros that need to be expanded unconditionally at m4 time so that traces (placed by autoheader and automake, respectively) will fire. In order to fix this while keeping the code readable, I would up doing a major refactor. There are now four internal macros implementing AC_REPLACE_FUNCS. _AC_REPLACE_FUNC_U is called unconditionally for every shell word in the list passed to AC_REPLACE_FUNCS, and does _AH_CHECK_FUNC + AC_LIBSOURCE if it can, or issues a warning if it can’t. (It could make sense to make this a public function, if we think shell variables in the AC_REPLACE_FUNCS list need to be supported long-term. I dunno if there’s a use case that can’t be handled by AC_REPLACE_FUNCS inside a shell conditional just as well.) _AC_REPLACE_FUNC_L and _AC_REPLACE_FUNC_NL implement the actual test performed for each function to be replaced; the difference is that _L (for literal) can only be used on a function whose name is known at m4 expansion time, _NL (nonliteral) works regardless. _AC_REPLACE_FUNCS, which already existed, handles looping either at m4 time or shell time as appropriate. AC_REPLACE_FUNCS remains a thin wrapper that runs _AC_REPLACE_FUNCS(m4_flatten([$1])). The _bulk_ of the patch is changes to the testsuite so that it notices the original bug. Specifically, AT_CHECK_AUTOHEADER now takes an argument which is a whitespace-separated list of preprocessor macro names that ought to appear in the generated config.h.in. This can be set to ‘ignore’ to skip the test, and unfortunately that’s what the “trivial” per-macro tests have to do (AT_CHECK_MACRO and friends), so coverage is not ideal, but it’s better than what we had. Also, AT_CHECK_M4 now normalizes the backtrace lines that appear in the output of an AC_DIAGNOSE, e.g. configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete. configure.ac:6: You should run autoupdate. ../../lib/autoconf/lang.m4:125: AC_LANG_SAVE is expanded from... configure.ac:6: the top level becomes configure.ac:6: warning: The macro `AC_LANG_SAVE' is obsolete. configure.ac:6: You should run autoupdate. lang.m4: AC_LANG_SAVE is expanded from... configure.ac:6: the top level This allows us to write tests for these diagnostics that don’t depend on the relationship between the source and build directories, and won’t break when unrelated patches change the line number of a macro definition. * lib/autoconf/functions.m4 (AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS) (_AC_REPLACE_FUNC): Refactor into AC_REPLACE_FUNCS, _AC_REPLACE_FUNCS, _AC_REPLACE_FUNC_U, _AC_REPLACE_FUNC_L, _AC_REPLACE_FUNC_NL. Ensure that _AH_CHECK_FUNC and AC_LIBSOURCE are invoked unconditionally at m4 expansion time for each literal function name in the argument to AC_CHECK_FUNCS. Issue warnings about non-literal names. * tests/local.at (AT_CHECK_M4): Normalize backtrace lines from the output of AC_DIAGNOSE / m4_warn. (AT_CHECK_AUTOHEADER): Add arg EXPECTED-TMPLS giving a list of preprocessor macro names that should appear in the generated config.h.in. Use AT_CHECK_M4 to invoke autoheader. (_AT_CHECK_AC_MACRO, AT_CHECK_MACRO, AT_CHECK_AU_MACRO): Update uses of AT_CHECK_AUTOHEADER. * tests/fortran.at, tests/semantics.at, tests/tools.at * tests/torture.at: Update all uses of AT_CHECK_AUTOHEADER. * tests/semantics.at (AC_REPLACE_FUNCS test): Make somewhat more thorough, using new functionality of AT_CHECK_M4 and AT_CHECK_AUTOHEADER. Signed-off-by: Zack Weinberg <zackw@panix.com>
* Look harder for a shell whose -n is known to work.Zack Weinberg2020-06-291-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The test suite was insisting on using /bin/sh -n for syntax checking, which meant that if /bin/sh wasn’t one of the short list of shells whose -n is known to work, we would skip all of the syntax-check tests, even if some other shell was available that would work. Instead do like _AS_DETECT_BETTER_SHELL, and loop over possible shells, starting with $SHELL and going on to a hardwired list of known-good possibilities. The result is written to the substitution variable @SHELL_N@ and the testsuite uses that. (Should we invoke AC_PATH_PROG on the result of the search if it’s not already absolute?) * configure.ac: Search for a shell whose -n mode is known to work, instead of just checking /bin/sh. Set @SHELL_N@ to what we find. * tests/atlocal.in: Propagate @SHELL_N@ to testsuite. * tests/local.at (AT_CHECK_SHELL_SYNTAX): Use $SHELL_N instead of hardcoding /bin/sh. Update test for usable shell -n. (AT_CHECK_AUTOCONF): Update test for usable shell -n. * tests/tools.at: Update test for usable shell -n.
* maint: make update-copyrightJim Meyering2020-01-011-1/+1
|
* Fix test suite with modern PerlDaniel Colascione2018-03-191-1/+1
|
* Prefer HTTPS to FTP and HTTPPaul Eggert2017-09-161-2/+2
|
* "time stamp" -> "timestamp", as per POSIXPaul Eggert2017-09-161-3/+3
|
* maint: update copyright dates for 2017Jim Meyering2017-01-011-1/+1
| | | | | * all files: Run "make update-copyright". * doc/autoconf.texi: Update manually.
* autoheader: check templates of all config headersDaniel Elstner2016-12-211-0/+25
| | | | | | | | | | | | | * bin/autoheader.in: When checking for missing templates, take all config headers into account, not just the one generated by autoheader. This makes it possible to use AC_DEFINE() for secondary headers without duplicating the template into the first header. * tests/tools.at: Add a check for autoheader with multiple config headers. * NEWS: Document the new behavior. Message-Id: <1482336946.31331.2.camel@gmail.com> Signed-off-by: Eric Blake <eblake@redhat.com>
* maint: make update-copyrightPaul Eggert2016-02-061-1/+1
|
* maint: bump copyright to 2015Paul Eggert2015-01-021-1/+1
| | | | * all files: Run 'make update-copyright'.
* maint: bump copyright to 2014Eric Blake2014-01-011-1/+1
| | | | | | | Done via 'make update-copyright', since all files are effectively modified and distributed this year via public version control. * all files: Update copyright year.
* Modernize AC_INCLUDES_DEFAULT and friends.Zack Weinberg2013-09-211-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * lib/autoconf/headers.m4 (_AC_INCLUDES_DEFAULT_REQUIREMENTS): Include stddef.h, stdlib.h, and string.h unconditionally. Don't include memory.h at all. Don't use AC_HEADER_STDC. Don't check for stddef.h, stdlib.h, string.h, or memory.h. For compatibility, unconditionally define STDC_HEADERS, HAVE_STDLIB_H, and HAVE_STRING_H. (AN_HEADER list): Remove C89 headers, and memory.h from list. (AC_HEADER_STDC, AC_UNISTD_H): AU_DEFUN to trigger _AC_INCLUDES_DEFAULT_REQUIREMENTS if it hasn't already happened, and do nothing else. (AC_HEADER_TIME): AU_DEFUN, and define TIME_WITH_SYS_TIME unconditionally as long as sys/time.h is present. (AC_USG, AC_MEMORY_H): Assume existence of string.h. * lib/autoconf/functions.m4 (_AC_FUNC_MALLOC_IF, _AC_FUNC_REALLOC_IF): Don't use AC_HEADER_STDC. Assume stdlib.h exists. (AC_FUNC_MKTIME): Don't use AC_HEADER_TIME. Assume time.h exists. (AC_FUNC_ALLOCA): Assume stdlib.h exists. (_AC_LIBOBJ_FNMATCH): Assume wchar.h and wctype.h exist. (_AC_LIBOBJ_GETLOADAVG): Assume locale.h exists. (AC_FUNC_MMAP): Assume stdlib.h exists. * tests/tools.at: Use AC_WORDS_BIGENDIAN instead of AC_STDC_HEADERS in autoupdate test. * NEWS, doc/autoconf.texi: Document changes. Remove obsolete advice.
* maint: bump copyright to 2013Eric Blake2013-01-031-1/+1
| | | | | | | Done via 'make update-copyright', since all files are effectively modified and distributed this year via public version control. * all files: Update copyright year.
* AC_CONFIG_MACRO_DIRS: improve tracing and add sanity checksEric Blake2012-11-091-0/+71
| | | | | | | | | | | | | | | | | | | | | | | | Too many legacy tools exist for us to unilaterally quit supporting AC_CONFIG_MACRO_DIR - it is feasible for someone to want their package to bootstrap with both automake 1.13 and libtool 2.4.2, where the newer automake will only trace the new style of multiple directory listings, but the older libtool does a sed and settles on the one use of the old name. So, we let both macros forward to a new tracing macro, which also has the benefit of sanitizing calls into one directory per trace; we also ensure that the old macro is always traced, and appears at most once and before any use of the new macro. * doc/autoconf.texi (Input) <AC_CONFIG_MACRO_DIRS>: Document how to trace this macro. * lib/autom4te.in (Autoreconf-preselections) (Automake-preselections): Preselect this trace. * lib/autoconf/general.m4 (AC_CONFIG_MACRO_DIR_TRACE): New trace. (_AC_CONFIG_MACRO_DIRS_USED, _AC_CONFIG_MACRO_DIRS): New internal macros. (AC_CONFIG_MACRO_DIRS, AC_CONFIG_MACRO_DIR): Use them. * tests/tools.at (autoconf --trace: AC_CONFIG_MACRO_DIRS): New test.
* tests: sort preselections to make test failures easier to readEric Blake2012-09-211-2/+2
| | | | | | | Prompted by Stefano Lattarini's report of a test failure due to a missing preselection for automake 1.12. * tests/tools.at (autom4te preselections): Sort before diffing.
* general: deprecate 'configure.in' as autoconf inputStefano Lattarini2012-05-231-14/+14
| | | | | | | | | | | | | | | | | | | | | | | | It has been years since that has been deprecated in the documentation, in favour of 'configure.ac': Previous versions of Autoconf promoted the name configure.in, which is somewhat ambiguous (the tool needed to process this file is not described by its extension), and introduces a slight confusion with config.h.in and so on (for which '.in' means "to be processed by configure"). Using configure.ac is now preferred. It's now time to start giving runtime warning about the use of 'configure.in', so that support for it can be removed in future versions of autoconf/automake. * lib/Autom4te/Configure_ac.pm: Issue a warning in the 'obsolete' category if 'configure.in' is detected. Since this module is synced from Automake, this change is to be backported there (and will be soon). * doc/autoconf.texi: Update. * tests/tools.at: Adjust to avoid spurious failures. Signed-off-by: Stefano Lattarini <stefano.lattarini@gmail.com>
* maint: spelling fixesPaul Eggert2012-03-011-1/+1
|
* maint: update copyright yearPaul Eggert2012-01-041-1/+1
| | | | All files changed to add 2012, via 'make update-copyright'.
* maint: update copyright yearEric Blake2011-01-041-2/+2
| | | | | | All files changed to add 2011, via 'make update-copyright'. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: simplify grepping of 'automake --version'.Stefano Lattarini2010-09-131-1/+1
| | | | | | | | | | * tests/tools.at (autom4te preselections): Remove minor redundancies in regular expressions used to grep the output 'automake --version' for test skipping. * tests/torture.at (Configuring subdirectories) (Unusual Automake input files): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* tests: skip broken automake wrapper on MirBSDEric Blake2010-09-131-2/+3
| | | | | | | | | | | | | | | | | On a fresh default install, MirBSD ships with an automake wrapper script that has bad behavior: $ automake --version; echo $? Provide an AUTOMAKE_VERSION environment variable, please 0 * tests/tools.at (autom4te preselections): Skip, rather than fail, if 'automake --version' succeeds without printing a version when an environment variable is not set. * tests/torture.at (Configuring subdirectories) (Unusual Automake input files): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* m4sh: revert incorrect mix of "${a='b'}"Eric Blake2010-08-251-1/+1
| | | | | | | | | Regression introduced in cb27df430d86d5a16bc1f210d36e29400369dbc2. * bin/autoconf.as: Revert leak of literal '' into assignment. * tests/tools.at (autom4te preselections): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* docs: mention cost of globbing during variable expansionEric Blake2010-08-251-1/+1
| | | | | | | | | | | | | | | | | | | | | * doc/autoconf.texi (Shell Substitutions) <${var=literal}>: Recommend quoting substitutions that might trigger globbing. (Limitations of Builtins) <:>: Likewise. * bin/autoconf.as: Follow our own advice. * lib/autoconf/functions.m4 (AC_FUNC_SELECT_ARGTYPES): Likewise. * lib/autoconf/general.m4 (_AC_INIT_PARSE_ARGS): Likewise. * lib/autoconf/status.m4 (AC_OUTPUT): Likewise. * lib/autotest/general.m4 (_AT_FINISH): Likewise. * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Likewise. * tests/autotest.at (parallel autotest and signal handling): Likewise. * tests/c.at (AC_OPENMP and C, AC_OPENMP and C++): Likewise. * tests/foreign.at (shtool): Likewise. * tests/fortran.at: Likewise. * tests/tools.at (autom4te preselections): Likewise. * tests/torture.at (VPATH): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
* Properly quote AC_PREREQ during autoupdate.Eric Blake2010-06-071-1/+1
| | | | | | | | | | * lib/autoconf/general.m4 (AC_PREREQ): Follow consistent quoting style for AC_PREREQ. * tests/tools.at (autoupdating AC_PREREQ): Update expected results. Reported by NightStrike. Signed-off-by: Eric Blake <eblake@redhat.com>
* Formatting cleanups in macro comments.Ralf Wildenhues2010-03-121-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | For a list of candidate unaligned underlines, use this script: for f in `git ls-files`; do awk '{ len[NR] = length($0) } /----*/ && len[NR-1] != 0 { if (len[NR-1] != len[NR]) print FILENAME ":" NR ":" $0 }' $f done * lib/autoconf/c.m4, lib/autoconf/erlang.m4, lib/autoconf/fortran.m4, lib/autoconf/functions.m4, lib/autoconf/general.m4, lib/autoconf/lang.m4, lib/autoconf/programs.m4, lib/autoconf/specific.m4, lib/autoconf/status.m4, lib/autoconf/types.m4, lib/autotest/general.m4, lib/autotest/specific.m4, lib/m4sugar/m4sh.m4, lib/m4sugar/m4sugar.m4, tests/autotest.at, tests/local.at, tests/m4sh.at, tests/semantics.at, tests/tools.at, tests/torture.at: Fix macro comment format. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix `autom4te cache creation' testsuite failure on FreeBSD.Ralf Wildenhues2010-03-021-1/+2
| | | | | | | | | * tests/tools.at (autom4te cache creation): Normalize exit status of failed redirection to 1, may be 2 with FreeBSD sh. * THANKS: Update. Report by Václav Haisman. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Fix test failure when a shell uses $TMPDIR for here-documents.Dmitry V. Levin2010-01-211-3/+4
| | | | | | | | * tests/tools.at (autotools and whitespace in file names): Create $TMPDIR before potential use like in other whitespace tests. Signed-off-by: Dmitry V. Levin <ldv@altlinux.org> Signed-off-by: Eric Blake <ebb9@byu.net>
* Don't fail autom4te preselection test due to different Automake.Ralf Wildenhues2010-01-061-2/+7
| | | | | | | | | | | * tests/tools.at (autom4te preselections): If the cache test fails, extract the Automake version from the toplevel Makefile.in file of the source tree; skip, rather than fail the test group if the automake program has a different version. * THANKS: Update. Report by Dieter Jurzitza, fix suggested by Eric Blake. Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* Update copyright year.Eric Blake2010-01-051-2/+2
| | | | | | All files changed to add 2010, via 'make update-copyright'. Signed-off-by: Eric Blake <ebb9@byu.net>
* Warn if using unnamed diversion.Eric Blake2009-12-041-4/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | * lib/m4sugar/m4sugar.m4 (_m4_divert, m4_divert_push): Add optional parameter, which controls warning. (m4_divert_pop, m4_cleardivert, m4_divert_require) (_m4_require_call): Adjust callers. * lib/m4sugar/m4sh.m4 (AS_REQUIRE): Likewise. * tests/m4sh.at (AT_DATA_LINENO): Avoid triggering the warning. * tests/m4sugar.at (AT_CHECK_M4SUGAR_TEXT, m4@&t@_append) (m4@&t@_text_wrap, recursion): Likewise. (m4@&t@_warn, m4@&t@_divert_stack): Adjust expected output. * tests/tools.at (autom4te and whitespace in file names) (autoconf: the empty token): Avoid triggering the warning. (autoconf: AC_PRESERVE_HELP_ORDER): New test. * tests/mktests.sh (ac_exclude_list): Retire prior test. * NEWS: Document the warning. * doc/autoconf.texi (Redefined M4 Macros) <m4_divert>, <m4_undivert>: Make even more explicit that using these directly is discouraged. (Diversion support): Further warn against improper diversion changes. <m4_divert_text>: Give an example of proper use. Reported by Mike Frysinger. Signed-off-by: Eric Blake <ebb9@byu.net>
* Fix failure of test 35 when the user has a .autom4te.cfg file.Paolo Bonzini2009-11-221-0/+2
| | | | | * tests/tools.at (autom4te cache creation): Skip the test if the user has a .autom4te.cfg file.