]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* autoconf.sh (finalize.awk): Don't leave spaces before the user
authorAkim Demaille <akim@epita.fr>
Wed, 9 Aug 2000 06:53:07 +0000 (06:53 +0000)
committerAkim Demaille <akim@epita.fr>
Wed, 9 Aug 2000 06:53:07 +0000 (06:53 +0000)
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.

ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in
doc/autoconf.texi
tests/tools.m4

index a6ed61701e60a6b5d6006705762890afc5719421..555445566f64efca080ab658866388e8b3726388 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 8bb4d9dd888bb238259e5b95d50516192ef88167..517dd6264e592f29f2d20ab1928a846404b5688c 100644 (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
         }
     }
index 8bb4d9dd888bb238259e5b95d50516192ef88167..517dd6264e592f29f2d20ab1928a846404b5688c 100644 (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
         }
     }
index 8bb4d9dd888bb238259e5b95d50516192ef88167..517dd6264e592f29f2d20ab1928a846404b5688c 100644 (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
         }
     }
index 8a041f46ae0b4fedfe12eae16e5351eede7f9c41..a0ed8b59cc80c21dc5994d52a7e64956effcd755 100644 (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.
index 3889f74b1c6909c65c6908dcf2460c367ab52c41..6bceef1af7bf413ce7411bb83443c931a65c3726 100644 (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)