aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/make
diff options
context:
space:
mode:
authorHartmut Brandt <harti@FreeBSD.org>2004-07-22 11:12:01 +0000
committerHartmut Brandt <harti@FreeBSD.org>2004-07-22 11:12:01 +0000
commit19a7439eddfc8dcf8377ba443567803bf3cdc608 (patch)
tree76075c23d5f2e5f565b3c53273722b86789557e4 /usr.bin/make
parent328dbe4a949869880b1946b6a5b044872ee42d0e (diff)
Notes
Diffstat (limited to 'usr.bin/make')
-rw-r--r--usr.bin/make/parse.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/usr.bin/make/parse.c b/usr.bin/make/parse.c
index e8a9935fcd23..9cbef9929553 100644
--- a/usr.bin/make/parse.c
+++ b/usr.bin/make/parse.c
@@ -2021,6 +2021,13 @@ ParseSkipLine(int skip, int keep_newline)
while (((c = ParseReadc()) != '\n' || lastc == '\\')
&& c != EOF) {
+ if (skip && c == '#' && lastc != '\\') {
+ /* let a comment be terminated even by an escaped \n.
+ * This is consistent to comment handling in ParseReadLine */
+ while ((c = ParseReadc()) != '\n' && c != EOF)
+ ;
+ break;
+ }
if (c == '\n') {
if (keep_newline)
Buf_AddByte(buf, (Byte)c);