Commit Graph

5293 Commits

Author SHA1 Message Date
Ralf Wildenhues
4c2c793ed5 Fix some write failure cases in Autotest.
* lib/autotest/general.m4 (AT_INIT): Do not exit successfully
upon write failures for --help, --version, --list.
Guard against write failures for intermediate created scripts.
<at_func_create_debugging_script>: Do not make the debugging
script executable if it is not complete.
2007-12-16 22:24:14 +01:00
Eric Blake
af2f1f262c Fix thinko in earlier patch - m4_join isn't defined yet.
* lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro)
(_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer)
(m4_require): Use m4_do, not m4_join.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-12 16:31:21 -07:00
Eric Blake
d3579af38c Fix some whitespace tests on cygwin.
* tests/tools.at (autom4te and whitespace in file names): Restore
font-lock.  Create $TMPDIR before it might be used.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-12 15:50:31 -07:00
Eric Blake
525da55580 Fix spurious testsuite failure with to M4 1.4.11.
* tests/local.at (AT_CHECK_M4): Cater to new m4 error message.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-12 14:46:41 -07:00
Eric Blake
18e4a9e117 Optimize AC_REQUIRE.
* lib/m4sugar/m4sugar.m4 (m4_expansion_stack_push, _m4_defun_pro)
(_m4_defun_pro_outer, _m4_defun_epi, _m4_defun_epi_outer)
(m4_require): Avoid extra macro calls.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-12 14:18:25 -07:00
Ralf Wildenhues
8fab8ab6d2 * tests/torture.at (srcdir): Fix quoting. 2007-12-08 12:00:02 +01:00
Ralf Wildenhues
3b27d0a8a8 Do not pass top_srcdir to configure scripts in testsuite.
* tests/autotest.at (srcdir propagation): Copy install-sh to
source tree.
(my only test): Drop setting of `top_srcdir'.
* tests/base.at (Input/Output): Likewise.
* tests/local.at (AT_CONFIGURE_AC): Copy install-sh,
config.guess, and config.sub to test source tree.
Drop AC_CONFIG_AUX_DIR setting.
(AT_CHECK_CONFIGURE): Drop setting of `top_srcdir'.
* tests/torture.at (Substitute a 2000-byte string): Drop
AC_CONFIG_AUX_DIR setting, copy install-sh to test source tree.
(Substitute a newline, datarootdir workaround): Likewise.
(Define a newline): Adjust for linenumber changes in configure.ac.
* tests/foreign.at (Libtool): Adjust comment to reflect changes.
2007-12-08 11:58:44 +01:00
Ralf Wildenhues
5efda51756 * tests/semantics.at (AC_PATH_PROGS_FEATURE_CHECK): Skip test if pwd contains whitespace. 2007-12-08 11:54:28 +01:00
Ralf Wildenhues
be000532a9 Quote $abs_top_srcdir in tests.
* tests/local.at (AT_CHECK_PERL_SYNTAX): Likewise.
* tests/tools.at (Syntax of the shell scripts): Likewise.
2007-12-08 11:53:38 +01:00
Ralf Wildenhues
587ce8cecd * tests/m4sh.at (LINENO): Quote $0. 2007-12-08 11:52:54 +01:00
Ralf Wildenhues
814cfb9003 Fix testsuite program wrapper for whitespace in pwd.
The problem here is that the usual mantra is that command
variables can contain arguments, thus we cannot just escape
$AUTOCONF, $AUTOM4TE etc.  The compromise is to put the
$top_builddir/tests directory early in $PATH, so that the
wrappers are found by their plain name.

* tests/wrapper.as: Put $testdir early in $PATH.
(AUTOCONF, AUTOHEADER, AUTOM4TE): Set to plain command names.
2007-12-08 11:52:15 +01:00
Ralf Wildenhues
ce429ecdc0 Proper config.status --file/--header and $srcdir escaping.
* lib/autoconf/status.m4 (_AC_OUTPUT_MAIN_LOOP): Quote special
characters in $ac_file_inputs.
(_AC_OUTPUT_FILE, _AC_OUTPUT_HEADER): eval $ac_file_inputs
accordingly.
* tests/torture.at (datarootdir workaround): Adjust.
(AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS): Extend test.
2007-12-08 11:50:48 +01:00
Ralf Wildenhues
064ce0b6be Fix Autotest for whitespace in pwd.
* lib/autotest/general.m4 (AT_INIT)
<at_func_create_debugging_script, Driver Loop>:
Quote $at_group_dir.
* tests/autotest.at (whitespace in absolute testdir): New test.
2007-12-08 11:49:15 +01:00
Ralf Wildenhues
7b092b1af3 * lib/autom4te.in: Quote @datadir@. 2007-12-08 11:48:10 +01:00
Ralf Wildenhues
449317f7ee Proper file name escaping in Autoconf programs and Perl modules.
This includes escaping of characters special to the shell
as well as special to Perl, e.g., leading `<' or `>'.
For example, when $file starts with `>', `open ">$file"'
wrongly tries to append to a different file.

* bin/autoconf.as: Fix quoting for autom4te options.
* lib/Autom4te/General.pm (shell_quote): New function, taken
from coreutils, written by Jim Meyering.
(mktmpdir): Use it.
* bin/autom4te.in (files_to_options, handle_m4): Use shell_quote
and open_quote.
* bin/autoreconf.in (parse_args): Likewise.
* bin/autoscan.in (main): Likewise.
* bin/autoupdate.in (main): Likewise.
* bin/autoheader.in: Likewise, fixing old insufficient escaping.
* bin/ifnames.in: Likewise, XFile usage fixes.
* tests/tools.at (autom4te and whitespace in file names): Extend
test.  Test twice, with special characters allowed on w32, and the
rest.  Test leading and trailing whitespace, for `open_quote'.
(autotools and whitespace in file names): New, analogous test.
Reported by Paul Eggert and Benoit Sigoure, additional suggestions
by Russ Allbery and Eric Blake.
2007-12-08 11:46:43 +01:00
Ralf Wildenhues
7fb34e3eec Sync from Automake.
* lib/Autom4te/Channels.pm, lib/Autom4te/Configure_ac.pm,
lib/Autom4te/Struct.pm, lib/Autom4te/XFile.pm: Likewise.
* lib/Autom4te/FileUtils.pm (open_quote): New function.
(update_file, contents): Use it.
2007-12-08 11:39:34 +01:00
Ralf Wildenhues
7d3ffc74fd * Makefile.am (autom4te-update): Rewrite for git. 2007-12-08 10:14:11 +01:00
Ralf Wildenhues
2b1c424154 * doc/autoconf.texi (autom4te Invocation, Autom4te Cache): Fix typos. 2007-12-04 22:36:22 +01:00
Ralf Wildenhues
612e11627d Add ChangeLog entry for last commit. 2007-12-04 22:36:02 +01:00
Ralf Wildenhues
fefcc77fea Fix copyright years.
* Makefile.am, doc/install.texi, lib/autoconf/fortran.m4,
lib/autoconf/lang.m4, lib/freeze.mk: Likewise.
2007-12-04 22:30:33 +01:00
Eric Blake
73a757c58c Manually resync with gnulib, since 'make cvs-update' no longer works.
* build-aux/config.guess: New upstream version.
* build-aux/config.sub: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-04 10:20:04 -07:00
Eric Blake
3832e8e303 When using older automake, don't downgrade build-aux/texinfo.tex.
* configure.ac (AM_INIT_AUTOMAKE): Add no-texinfo.tex option.
* doc/Makefile.am (TEXINFO_TEX): Add.

Signed-off-by: Eric Blake <ebb9@byu.net>
2007-12-04 10:14:35 -07:00
Paul Eggert
b524b0f996 Fix AC_C_BIGENDIAN bug caused by new awk method of substitution.
* lib/autoconf/c.m4 (AC_C_BIGENDIAN): Don't comment out the
#undef as this runs afoul of our new way of creating config.h.
Problem reported by Jim Meyering in
<http://lists.gnu.org/archive/html/autoconf-patches/2007-11/msg00164.html>.
2007-11-27 09:06:40 -08:00
Ralf Wildenhues
952adbf389 Fix autom4te for unusual characters in input file names.
* bin/autom4te.in (files_to_options): Quote active characters
for the shell.
* tests/tools.at (autom4te and white space in file names):
New test.
2007-11-26 19:40:50 +01:00
Ralf Wildenhues
ee28883f0e Document Tru64 awk input splitting limitation.
* doc/autoconf.texi (Limitations of Usual Tools) <awk>:
Document that Tru64 awk always splits $0.
2007-11-26 19:36:48 +01:00
Stepan Kasal
2fe86f6854 * lib/autotest/general.m4 (AT_INIT): Do not extract the
`#AT_STOP_...' line at the end of each test.
2007-11-24 00:35:16 +01:00
Ralf Wildenhues
ce4ff03763 Fix awk script optimization.
* lib/autotest/general.m4 (AT_INIT): For awk line number
extraction script, ensure `$at_group' has a defined value
even for the empty set, and properly quote its usage inside
the awk script.
2007-11-23 19:42:00 +01:00
Ralf Wildenhues
a13f9b79a6 * doc/autoconf.texi (Shell Functions): New chapter. Document
IRIX sh $0 issue in functions, move content from ...
(Portable Shell): ... here.
(Shell Script Compiler): Note that shell functions are not
totally unportable any more.
2007-11-22 08:11:00 +01:00
Ralf Wildenhues
844f770885 * lib/autotest/general.m4 (AT_INIT): Exit awk script after
extracting the line numbers of the last needed test.
2007-11-22 08:09:03 +01:00
Ralf Wildenhues
33df9071f5 * lib/autotest/general.m4 (AT_INIT) <at_func_create_debugging_script>:
Fix quoting.
2007-11-20 22:11:47 +01:00
Ralf Wildenhues
4d8234a76c Fix IRIX testsuite debugging failures: $0 in functions.
* lib/autotest/general.m4 (AT_INIT) <at_func_create_debugging_script>:
Do not use $0 inside a function, as IRIX sh will set that to the
function name rather than the script invocation name.
2007-11-19 21:24:54 +01:00
Paolo Bonzini
22ced06229 * lib/autotest/general.m4 (at_func_test): Use cached line numbers
to extract test scripts.
(AT_INIT): Extract and cache test script line numbers.
2007-11-19 21:19:15 +01:00
Ralf Wildenhues
dad571f749 * lib/autotest/general.m4: Revert 2007-11-15 patch and
subsequent fixups; the awk -> here-document conversion trashes
performance too much with AIX sh.
2007-11-19 21:18:04 +01:00
Ralf Wildenhues
fff5f1c998 * tests/local.at: Do not test m4, perl with AT_TESTED. 2007-11-18 17:24:56 +01:00
Ralf Wildenhues
5ccf45a370 Diagnose and guard against write errors dealing with config.status.
The general idea is this: all write failures from `configure'
writing `config.status' are indicated by $ac_write_error, which
is only checked at the end.  This is safe because config.status
code is not executed before the file is complete.  Other write
failures, be they inside config.status, or in sub shell/awk
scripts spawned from configure or config.status, typically need
earlier checking, as their results are used right afterwards.
* lib/autoconf/status.m4 (AC_OUTPUT): Initialize `ac_write_fail'
before writing config.status, check afterwards.
(_AC_OUTPUT_FILES_PREPARE, _AC_OUTPUT_FILE)
(_AC_OUTPUT_HEADERS_PREPARE,_AC_OUTPUT_CONFIG_STATUS):
Set `ac_write_error' for write failures to config.status.  Barf
upon write failures to temporary files.
Adjust note about closing and reopening the here-document.
(_AC_OUTPUT_HEADER, _AC_OUTPUT_LINK, _AC_OUTPUT_COMMAND)
(_AC_OUTPUT_MAIN_LOOP): Likewise, adjust note about closing and
reopening the here-document.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Ensure `ac_write_error' does not escape into config.status.
Also, add a couple of code paths not yet exercised in the test
suite: a config file with input from stdin, and a config header
output to stdout.
Suggestion for catching write errors by Bruno Haible.
2007-11-18 14:03:06 +01:00
Ralf Wildenhues
90661f5cd9 Avoid error with Tru64 awk and testsuite lines with many words.
* lib/autotest/general.m4 (AT_INIT): In the awk script that
reads the testsuite, set the field separator to an unusual value,
in order to not run over the limit of 199 fields.  Tru64 4.0D awk
even splits the input if $i, i>0, was never accessed in the script.
2007-11-17 09:36:17 +01:00
Ralf Wildenhues
17f6602af3 Revert 2007-10-17 change.
* TODO: Multiline args in config files and headers mean something
different and are not fixed, see
<http://lists.gnu.org/archive/html/autoconf-patches/2007-05/msg00017.html>
Report by Stepan Kasal.
2007-11-17 09:31:11 +01:00
Ralf Wildenhues
d7fd618ede * doc/autoconf.texi (Generic Programs): Fix typo. 2007-11-17 09:24:52 +01:00
Stepan Kasal
ff4249b312 add a chlog entry for the prev commit 2007-11-16 23:00:41 +01:00
Stepan Kasal
cf733bdf5f doc: AC_*_TOOL does not canonicalize the prefix
* doc/autoconf.texi (Generic Programs): Do not say that the *_TOOL
macros canonicalize, they simply use the `host_alias'.
2007-11-16 14:47:00 +01:00
Ralf Wildenhues
22000bf9f8 Diagnose write errors in config.status instantiations.
* lib/autoconf/status.m4 (_AC_OUTPUT_FILE)
(_AC_OUTPUT_HEADER, _AC_OUTPUT_MAIN_LOOP): Bail out
on write errors.
* tests/torture.at (AC_CONFIG_FILES, HEADERS, LINKS and COMMANDS):
Extend test to also check for some write error failures, using...
<AT_CHECK_CONFIG_CREATION_NOWRITE>: ...this new macro.
Report by Bruno Haible.
2007-11-16 07:51:10 +01:00
Ralf Wildenhues
c19717746b Indentation fixups.
* lib/autotest/general.m4 (AT_INIT) <at_func_log_failure>: Fix
indentation.
(_AT_CHECK): Use less indentation, to save space.
2007-11-16 07:48:55 +01:00
Ralf Wildenhues
94296894f0 Add witness macro for @top_build_prefix@ substitution.
* lib/autoconf/status.m4 (_AC_HAVE_TOP_BUILD_PREFIX): New macro.
(_AC_OUTPUT_FILE): Mention it here.
2007-11-15 22:30:15 +01:00
Ralf Wildenhues
8c29e96f9d * lib/autotest/general.m4 (at_func_test): Remove.
(AT_INIT): Pre-extract test groups into separate files.
(AT_CLEANUP): Source pre-extracted file instead of calling at_func_test.
Remove at-test-source files together with the $at_group_dir.
* tests/autotest.at (Long test source lines): New test.
2007-11-15 22:23:59 +01:00
Ralf Wildenhues
c33d474779 Shell functions and variables may share a namespace.
* doc/autoconf.texi (Portable Shell): Mention Solaris sh
limitation.
2007-11-15 07:58:03 +01:00
Paul Eggert
675668479d * lib/autoconf/types.m4 (_AC_TYPE_LONG_LONG_SNIPPET): Make comment match
gnulib.
2007-11-14 15:42:59 -08:00
Ralf Wildenhues
f32d0d7753 * lib/autoconf/status.m4: Fix a couple of comment typos. 2007-11-14 21:57:37 +01:00
Ralf Wildenhues
5779945993 * lib/m4sugar/m4sh.m4 (AS_TMPDIR): Use $as_me, not $me. 2007-11-14 21:55:59 +01:00
Paul Eggert
0cb78970e9 Fix typo in my previous changelog entry. 2007-11-13 12:42:02 -08:00
Jim Meyering
86328d8c43 Clean up the rule to create "expr".
* tests/Makefile.am (expr): Don't redirect directly to target.
Redirect just once, not for each echo statement.
Use $@, not literal "expr".
2007-11-13 09:37:43 +01:00