]> git.ipfire.org Git - thirdparty/automake.git/commitdiff
* automake.in (read_am_file): Escaped newlines in comments are not
authorAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Jul 2002 21:28:41 +0000 (21:28 +0000)
committerAlexandre Duret-Lutz <adl@gnu.org>
Thu, 25 Jul 2002 21:28:41 +0000 (21:28 +0000)
portable.  If a comment line doesn't start with a `#', add it.
* tests/comment6.test: Ensure this is done.

ChangeLog
automake.in
tests/comment6.test

index 26fc8caef0415ed17ef33ba55e3d8496cd0e4955..e737dd38643160c09b8ff59cb930052dd67f3004 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2002-07-25  Alexandre Duret-Lutz  <duret_g@epita.fr>
+
+       * automake.in (read_am_file): Escaped newlines in comments are not
+       portable.  If a comment line doesn't start with a `#', add it.
+       * tests/comment6.test: Ensure this is done.
+
 2002-07-24  Alexandre Duret-Lutz  <duret_g@epita.fr>
 
        Fix failures reported by Patrick Welche on NetBSD.
index b771965ceffd045c5a1d8c0a7af08096c28df934..313839c0009d30a7967efb993ffede8ee65d2fdf 100755 (executable)
@@ -7361,6 +7361,14 @@ sub read_am_file ($)
            }
            elsif ($prev_state == IN_COMMENT)
            {
+               # If the line doesn't start with a `#', add it.
+               # We do this because a continuated comment like
+               #   # A = foo \
+               #         bar \
+               #         baz
+               # is not portable.  BSD make doesn't honor
+               # escaped newlines in comments.
+               s/^#?/#/;
                $comment .= $spacing . $_;
            }
            else # $prev_state == IN_VAR_DEF
index 382139403543a29d51145c447515bbf52d6ef959..4438d6eb9c385a12b41ea0421811d7a998caaca9 100755 (executable)
@@ -31,6 +31,9 @@ $AUTOMAKE
 ./configure
 $MAKE
 
+grep '# SOME_FILES' Makefile
+grep '# *file3' Makefile
+
 cat > Makefile.am << 'EOF'
 all-local:
        @echo Good
@@ -44,3 +47,5 @@ EOF
 $AUTOMAKE
 ./configure
 $MAKE
+grep '# SOME_FILES' Makefile
+grep '# *file3' Makefile