[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
autom4te partly swallows m4_pattern_forbid multi-line comments
From: |
Hans Ulrich Niedermann |
Subject: |
autom4te partly swallows m4_pattern_forbid multi-line comments |
Date: |
Mon, 16 Jun 2008 22:41:12 +0200 |
User-agent: |
Thunderbird 2.0.0.14 (X11/20080501) |
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
Description: OpenPGP digital signature
- autom4te partly swallows m4_pattern_forbid multi-line comments,
Hans Ulrich Niedermann <=