+2000-11-25 Tom Tromey <tromey@cygnus.com>
+
+ * automake.in (file_contents_with_transform): Added file name and
+ line number to error report.
+ (MACRO_PATTERH, BOGUS_MACRO_PATTERN): Leading spaces are ok.
+
2000-11-23 Pavel Roskin <proski@gnu.org>
* m4/regex.m4 (AM_WITH_REGEX): This macro was broken because
$COMMENT_PATTERN = "^#";
$RULE_PATTERN = "^([\$a-zA-Z_.][-.a-zA-Z0-9_(){}/\$]*) *:([^=].*|)\$";
$SUFFIX_RULE_PATTERN = "^\\.([a-zA-Z0-9]+)\\.([a-zA-Z0-9]+)\$";
-$MACRO_PATTERN = "^([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
-$BOGUS_MACRO_PATTERN = "^([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
+# Only recognize leading spaces, not leading tabs. If we recognize
+# leading tabs here then we need to make the reader smarter, because
+# otherwise it will think rules like `foo=bar; \' are errors.
+$MACRO_PATTERN = "^ *([A-Za-z0-9_]+)[ \t]*([:+]?)=[ \t]*(.*)\$";
+$BOGUS_MACRO_PATTERN = "^ *([^ \t]*)[ \t]*([:+]?)=[ \t]*(.*)\$";
$GNITS_VERSION_PATTERN = "[0-9]+\\.[0-9]+([a-z]|\\.[0-9]+)?";
$IF_PATTERN = "^if[ \t]+\([A-Za-z][A-Za-z0-9_]*\)[ \t]*\(#.*\)?\$";
$ELSE_PATTERN = "^else[ \t]*\(#.*\)?\$";
$result_vars .= $comment . $spacing . $_ if ! $skipping;
$comment = $spacing = '';
$saw_bk = /\\$/;
- print STDERR "automake: programming error: .am macro \`$1' with trailing backslash\n"
+ print STDERR "automake: programming error: .am macro \`$1' with trailing backslash at $file:$.\n"
if $saw_bk;
$am_var_defs{$1} = $3;
}