+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
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
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
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
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)