* autoconf.sh (finalize.awk): Don't leave spaces before the user

function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
This commit is contained in:
Akim Demaille 2000-08-09 06:53:07 +00:00
parent 7d811d6ff1
commit 4df82da14e
6 changed files with 59 additions and 10 deletions

View File

@ -1,3 +1,12 @@
2000-08-09 Akim Demaille <akim@epita.fr>
* autoconf.sh (finalize.awk): Don't leave spaces before the user
function calls.
Reported by John David Anglin.
* doc/autoconf.texi (Limitations of Usual Tools): Start the AWK
section.
* tests/tools.m4 (AWK portability): New test.
2000-08-0 Pavel Roskin <proski@gnu.org>
* Makefile.am: substitute @bindir@ in shell scripts, needed by

View File

@ -364,12 +364,12 @@ case $task in
if (index (\$0, macro))
{
delete macros [macro]
undefined ("$infile", line, macro)
undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
undefined ("$outfile", macros [macro], macro)
undefined("$outfile", macros [macro], macro)
exit 1
}
}

View File

@ -364,12 +364,12 @@ case $task in
if (index (\$0, macro))
{
delete macros [macro]
undefined ("$infile", line, macro)
undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
undefined ("$outfile", macros [macro], macro)
undefined("$outfile", macros [macro], macro)
exit 1
}
}

View File

@ -364,12 +364,12 @@ case $task in
if (index (\$0, macro))
{
delete macros [macro]
undefined ("$infile", line, macro)
undefined("$infile", line, macro)
}
}
close ("$infile")
for (macro in macros)
undefined ("$outfile", macros [macro], macro)
undefined("$outfile", macros [macro], macro)
exit 1
}
}

View File

@ -5092,14 +5092,14 @@ often possible to avoid this problem using @samp{echo "x$word"}, taking
the @samp{x} into account later in the pipe.
@table @asis
@item @command{break}
@cindex @command{break}
The use of @samp{break 2} etc. is safe.
@item @command{!}
@cindex @command{!}
You can't use @command{!}, you'll have to rewrite your code.
@item @command{break}
@cindex @command{break}
The use of @samp{break 2} etc. is safe.
@item @command{case}
@cindex @command{case}
You don't need to quote the argument, no splitting is performed.
@ -5353,6 +5353,21 @@ The small set of tools you can expect to find on any machine can still
find some limitations you should be aware of.
@table @asis
@item @command{awk}
@cindex @command{awk}
Don't leave white spaces before the parentheses in user functions calls,
@sc{gnu} awk will reject it:
@example
$ gawk 'function die () @{ print "Aaaaarg!" @}
BEGIN @{ die () @}'
gawk: cmd. line:2: BEGIN @{ die () @}
gawk: cmd. line:2: ^ parse error
$ gawk 'function die () @{ print "Aaaaarg!" @}
BEGIN @{ die() @}'
Aaaaarg!
@end example
@item @command{cat}
@cindex @command{cat}
Don't rely on any option.

View File

@ -262,3 +262,28 @@ configure:3: warning: undefined macro: AC_OUTPUT
]])
AT_CLEANUP(configure)
## ---------------------------- ##
## autoconf's AWK portability. ##
## ---------------------------- ##
AT_SETUP(AWK portability)
AT_DATA([configure.in],
[[AC_INIT
]])
if (gawk --version) >/dev/null 2>&1; then
# Generation of the script.
AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir], 0,
[], [])
# Tracing.
AT_CHECK([AWK='gawk --posix' ../autoconf --autoconf-dir .. -l $at_srcdir -t AC_INIT], 0,
ignore, [])
fi
AT_CLEANUP(configure)