]> sourceware.org Git - automake.git/commitdiff
* automake.in (file_contents_with_transform): Added file name and
authorTom Tromey <tromey@redhat.com>
Sun, 26 Nov 2000 01:39:48 +0000 (01:39 +0000)
committerTom Tromey <tromey@redhat.com>
Sun, 26 Nov 2000 01:39:48 +0000 (01:39 +0000)
line number to error report.
(MACRO_PATTERH, BOGUS_MACRO_PATTERN): Leading spaces are ok.

ChangeLog
automake.in

index 585d4e573738c5fe3f3468420a81c661ac136b56..c25ee52d3d9815a4314efa44e207696895cf00ef 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+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
index 89a88c957b9c98edeeea51207d13e7211c0ff4fa..8dc8172685ace89ef3551346bd21c1dbe063c414 100755 (executable)
@@ -41,8 +41,11 @@ $WHITE_PATTERN = "^[ \t]*\$";
 $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]*\(#.*\)?\$";
@@ -7009,7 +7012,7 @@ sub file_contents_with_transform
            $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;
        }
This page took 0.110502 seconds and 5 git commands to generate.