From: Alexandre Duret-Lutz Date: Fri, 4 Jan 2002 11:06:15 +0000 (+0000) Subject: * automake.in (read_am_file): Thinko in "comment following X-Git-Tag: v1.10.2~1505 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=659dd9ae60bc7f1472e28d5c6f9130cdd1145f54;p=platform%2Fupstream%2Fautomake.git * automake.in (read_am_file): Thinko in "comment following trailing backslash" detection. * tests/comment5.test: Test for this too. --- diff --git a/ChangeLog b/ChangeLog index ad42504..dd01c94 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2002-01-04 Alexandre Duret-Lutz + + * automake.in (read_am_file): Thinko in "comment following + trailing backslash" detection. + * tests/comment5.test: Test for this too. + 2002-01-02 Tom Tromey * automake.texi (Extending): Added index for uninstall-hook. @@ -22,7 +28,7 @@ 2002-01-02 Alexandre Duret-Lutz * 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 diff --git a/automake.in b/automake.in index 9dfed8e..28ff84e 100755 --- a/automake.in +++ b/automake.in @@ -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) { diff --git a/tests/comment5.test b/tests/comment5.test index 2eca8d1..9b4c623 100755 --- a/tests/comment5.test +++ b/tests/comment5.test @@ -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