detect a syntax error
authorTom Tromey <tromey@redhat.com>
Tue, 2 Jun 1998 19:30:39 +0000 (19:30 +0000)
committerTom Tromey <tromey@redhat.com>
Tue, 2 Jun 1998 19:30:39 +0000 (19:30 +0000)
ChangeLog
TODO
automake.in

index 2f811f9..fc844c5 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+Tue Jun  2 13:27:34 1998  Tom Tromey  <tromey@cygnus.com>
+
+       * automake.in (read_am_file): Error if blank line or comment
+       follows trailing backslash.  Test syntax.test.
+       (file_contents_with_transform): Likewise.
+
 Thu May 28 18:49:47 1998  Ian Lance Taylor  <ian@cygnus.com>
 
        * automake.in (handle_configure): Always use $(SHELL) when running
diff --git a/TODO b/TODO
index e79c4c9..9c5142d 100644 (file)
--- a/TODO
+++ b/TODO
@@ -8,14 +8,6 @@
        LL_info_TEXINFOS = ...
   will put info files for language LL into $(infodir)/LL.
 
-* something like this fails:
-
-       foo = q \
-
-       lib_LTLIBRARIES = foo.la
-
-  this should give an error.
-
 * dependency tracking doesn't work well when a file is removed
   the new code to track header dependencies exacerbates this
   what is the fix?
index 46385d6..a91bf46 100755 (executable)
@@ -5217,12 +5217,16 @@ sub read_am_file
        {
            # Stick a single white line before the incoming macro or rule.
            $spacing = "\n";
+           &am_line_error ($., "blank line following trailing backslash")
+               if $saw_bk;
        }
        elsif (/$COMMENT_PATTERN/o)
        {
            # Stick comments before the incoming macro or rule.
            $comment .= $spacing . $_;
            $spacing = '';
+           &am_line_error ($., "comment following trailing backslash")
+               if $saw_bk;
        }
        elsif ($saw_bk)
        {
@@ -5734,12 +5738,16 @@ sub file_contents_with_transform
        {
            # Stick a single white line before the incoming macro or rule.
            $spacing = "\n";
+           &am_line_error ($., "blank line following trailing backslash")
+               if $saw_bk;
        }
        elsif (/$COMMENT_PATTERN/o)
        {
            # Stick comments before the incoming macro or rule.
            $comment .= $spacing . $_;
            $spacing = '';
+           &am_line_error ($., "comment following trailing backslash")
+               if $saw_bk;
        }
        elsif ($saw_bk)
        {