]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
* tests/tools.at (unexpanded macros): Strengthen.
authorAkim Demaille <akim@epita.fr>
Fri, 3 Nov 2000 15:08:28 +0000 (15:08 +0000)
committerAkim Demaille <akim@epita.fr>
Fri, 3 Nov 2000 15:08:28 +0000 (15:08 +0000)
* autoconf.sh (finalize.awk): Use `sub' instead of `index' +
`substr'.
More comments.

ChangeLog
autoconf.in
autoconf.sh
bin/autoconf.in
tests/tools.at

index 001793ca4c67ec18734a4957672bb744d59bcf5e..ba8c22d550814eb15d3bc689a45e0098d31b7d4a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2000-11-03  Akim Demaille  <akim@epita.fr>
+
+       * tests/tools.at (unexpanded macros): Strengthen.
+       * autoconf.sh (finalize.awk): Use `sub' instead of `index' +
+       `substr'.
+       More comments.
+
 2000-11-03  Akim Demaille  <akim@epita.fr>
 
        * Makefile.am (.m4.m4f): Check that processing produces only
index 04a5eb947b9579c5118c257b59d49bb4a159b76a..fe51ab853b2d1713db3295c272ebd09c3509f02e 100644 (file)
@@ -346,9 +346,11 @@ case $task in
         continue
       # Dubious feature: we tolerate macro names when commented.
       code_part = \$0
-      comment_start = index (code_part, "#")
-      if (comment_start)
-        code_part = substr (\$0, 0, comment_start)
+      sub (/#.*/, "", code_part)
+
+      # We don't \`if ... else if ...' because a single line may contain
+      # several unexpanded names.  That's also why the last two \`match'
+      # are not grouped together.
       if (match (code_part, /[^$WORDCHAR](A[$ALPHABET]|m4)_[$WORDCHAR]*/))
         {
            macros [substr (code_part, RSTART + 1, RLENGTH - 1)] = oline
index 04a5eb947b9579c5118c257b59d49bb4a159b76a..fe51ab853b2d1713db3295c272ebd09c3509f02e 100644 (file)
@@ -346,9 +346,11 @@ case $task in
         continue
       # Dubious feature: we tolerate macro names when commented.
       code_part = \$0
-      comment_start = index (code_part, "#")
-      if (comment_start)
-        code_part = substr (\$0, 0, comment_start)
+      sub (/#.*/, "", code_part)
+
+      # We don't \`if ... else if ...' because a single line may contain
+      # several unexpanded names.  That's also why the last two \`match'
+      # are not grouped together.
       if (match (code_part, /[^$WORDCHAR](A[$ALPHABET]|m4)_[$WORDCHAR]*/))
         {
            macros [substr (code_part, RSTART + 1, RLENGTH - 1)] = oline
index 04a5eb947b9579c5118c257b59d49bb4a159b76a..fe51ab853b2d1713db3295c272ebd09c3509f02e 100644 (file)
@@ -346,9 +346,11 @@ case $task in
         continue
       # Dubious feature: we tolerate macro names when commented.
       code_part = \$0
-      comment_start = index (code_part, "#")
-      if (comment_start)
-        code_part = substr (\$0, 0, comment_start)
+      sub (/#.*/, "", code_part)
+
+      # We don't \`if ... else if ...' because a single line may contain
+      # several unexpanded names.  That's also why the last two \`match'
+      # are not grouped together.
       if (match (code_part, /[^$WORDCHAR](A[$ALPHABET]|m4)_[$WORDCHAR]*/))
         {
            macros [substr (code_part, RSTART + 1, RLENGTH - 1)] = oline
index 84615e9ad77a6cc933595b80a6b61996277bfc61..d346f4dda874f4d8c09f2ff49b7d2731ab964fa3 100644 (file)
@@ -336,14 +336,20 @@ AT_SETUP(unexpanded macros)
 
 AT_DATA([configure.in],
 [[AC_PLAIN_SCRIPT()dnl
-AC_THIS_IS_PROBABLY_NOT_DEFINED
+AB_THIS_IS_PROBABLY_NOT_DEFINED
+AND_AZ_THAT_EITHER
+and_AZ_that_too
+# This is legal, also there is `AC_DEFINE' in there.
+BAC_DEFINE
 # AC_THIS_IS_A_COMMENT so just shut up.
 It would be very bad if Autoconf forgot to expand [AC_]OUTPUT!
 ]])
 
 AT_CHECK([autoconf --autoconf-dir .. -l $at_srcdir], 1, [],
-[[configure.in:2: error: undefined macro: AC_THIS_IS_PROBABLY_NOT_DEFINED
-configure:3: error: undefined macro: AC_OUTPUT
+[[configure.in:2: error: undefined macro: AB_THIS_IS_PROBABLY_NOT_DEFINED
+configure.in:3: error: undefined macro: AND_AZ_THAT_EITHER
+configure.in:4: error: undefined macro: and_AZ_that_too
+configure:7: error: undefined macro: AC_OUTPUT
 ]])
 
 AT_CLEANUP(configure)