[prev in list] [next in list] [prev in thread] [next in thread]
List: autoconf-bug
Subject: autom4te partly swallows m4_pattern_forbid multi-line comments
From: Hans Ulrich Niedermann <hun () n-dimensional ! de>
Date: 2008-06-16 20:41:12
Message-ID: 4856CFE8.5070902 () n-dimensional ! de
[Download RAW message or body]
If you have a command like
m4_pattern_forbid([SOME_PATTERN], [some
multi-line
comment])
in your configure.ac, the error message will only
contain the comment's first line.
My original test case was
dnl configure.ac - process with autoreconf
AC_INIT([autoconf m4_pattern_forbid error message bug], [0], [], [])
m4_pattern_forbid([FOOBAR], [Line 1 of error message
Line 2 of error message
Line 3 of error message])
FOOBAR
AC_OUTPUT
but this can be reduced to
dnl configure.ac - process with autoconf (without "re")
AS_INIT
m4_pattern_forbid([FOOBAR], [Line 1 of error message
Line 2 of error message
Line 3 of error message])
FOOBAR
In both test cases, the output will look like
configure.ac:2: error: line 1 of comment \
If this token and others are legitimate, please use m4_pattern_allow.
See the Autoconf documentation.
It appears autom4te calls m4 and has m4 store all
m4_pattern_allow and m4_pattern_forbid invocations from
configure.ac into a file $tmp/patterns which consists of
lines like:
forbid:^AS_BLAH$:
forbid:FOOBAR:special comment
allow:AS_MEH
In the case of a multi-line comment, this will end up
looking like
forbid:^AS_BLAH$:
forbid:FOOBAR:Line 1 of error message
Line 2 of error message
Line 3 of error message
allow:AS_MEH
and autom4te's sub handle_output() will ignore all lines
not starting with either 'allow:' or 'forbid:'.
I can see these potential solutions:
0. NOTABUG. Undocumented behaviour.
1. Let m4 create the $tmp/patterns file converting
multi-line comments into an escaped one-line form
and let autom4te later unescape them.
2. Let m4 create the $tmp/patterns file as-is, but have
autom4te re-assemble multi-line comments.
I will reply to this mail with a quick-and-dirty patch
implementing 2.
["signature.asc" (application/pgp-signature)]
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic