automake-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

trailing-backslash-thinko.patch


From: Alexandre Duret-Lutz
Subject: trailing-backslash-thinko.patch
Date: Thu, 03 Jan 2002 17:43:18 +0100
User-agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/21.1 (i386-debian-linux-gnu)

Akim ran across this a moment ago.

Index: ChangeLog
===================================================================
RCS file: /cvs/automake/automake/ChangeLog,v
retrieving revision 1.1708
diff -u -r1.1708 ChangeLog
--- ChangeLog   2002/01/02 19:07:30     1.1708
+++ ChangeLog   2002/01/03 16:40:26
@@ -1,3 +1,9 @@
+2002-01-03  Alexandre Duret-Lutz  <address@hidden>
+
+       * automake.in (read_am_file): Thinko in "comment following
+       trailing backslash" detection.
+       * tests/comment5.test: Test for this too.
+
 2002-01-02  Tom Tromey  <address@hidden>
 
        * automake.texi (Extending): Added index for uninstall-hook.
Index: automake.in
===================================================================
RCS file: /cvs/automake/automake/automake.in,v
retrieving revision 1.1256
diff -u -r1.1256 automake.in
--- automake.in 2002/01/02 16:01:21     1.1256
+++ automake.in 2002/01/03 16:40:26
@@ -6872,7 +6872,7 @@
            $comment .= $spacing . $_;
            $spacing = '';
            file_error ($here, "comment following trailing backslash")
-               if $saw_bk && $comment ne '';
+               if $saw_bk && $comment eq '';
        }
        elsif ($saw_bk)
        {
Index: tests/comment5.test
===================================================================
RCS file: /cvs/automake/automake/tests/comment5.test,v
retrieving revision 1.1
diff -u -r1.1 comment5.test
--- comment5.test       2002/01/02 16:01:23     1.1
+++ comment5.test       2002/01/03 16:40:26
@@ -37,4 +37,18 @@
 EOF
 
 $AUTOMAKE && exit 1
-:
+
+## Make sure backslashes are still allowed within the comment.
+## This usually happen 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

-- 
Alexandre Duret-Lutz




reply via email to

[Prev in Thread] Current Thread [Next in Thread]