+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.
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
$comment .= $spacing . $_;
$spacing = '';
file_error ($here, "comment following trailing backslash")
- if $saw_bk && $comment ne '';
+ if $saw_bk && $comment eq '';
}
elsif ($saw_bk)
{
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