* automake.in (read_am_file): Thinko in "comment following
authorAlexandre Duret-Lutz <adl@gnu.org>
Fri, 4 Jan 2002 11:06:15 +0000 (11:06 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Fri, 4 Jan 2002 11:06:15 +0000 (11:06 +0000)
trailing backslash" detection.
* tests/comment5.test: Test for this too.

ChangeLog
automake.in
tests/comment5.test

index ad42504..dd01c94 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-01-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * automake.in (read_am_file): Thinko in "comment following
+       trailing backslash" detection.
+       * tests/comment5.test: Test for this too.
+
 2002-01-02  Tom Tromey  <tromey@redhat.com>
 
        * automake.texi (Extending): Added index for uninstall-hook.
@@ -22,7 +28,7 @@
 2002-01-02  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        * tests/comment4.test: New file.
-       * tests/Makefile.am (TESTS): Add command4.test.
+       * tests/Makefile.am (TESTS): Add comment4.test.
 
        Fix for comment4.test:
        * automake.in (read_am_file): Output leading comments only when
index 9dfed8e..28ff84e 100755 (executable)
@@ -6872,7 +6872,7 @@ sub read_am_file ($)
            $comment .= $spacing . $_;
            $spacing = '';
            file_error ($here, "comment following trailing backslash")
-               if $saw_bk && $comment ne '';
+               if $saw_bk && $comment eq '';
        }
        elsif ($saw_bk)
        {
index 2eca8d1..9b4c623 100755 (executable)
@@ -37,4 +37,18 @@ var = foo
 EOF
 
 $AUTOMAKE && exit 1
-:
+
+## Make sure backslashes are still allowed within a comment.
+## This usually happens when commenting out a Makefile rule.
+
+cat > Makefile.am << 'EOF'
+all-local:
+       @echo ${var}
+
+# a comment with backslash \
+# but terminated by a line without backslash
+
+var = foo
+EOF
+
+$AUTOMAKE