Subject: standards/17732: escaped comments & make(1)
To: None <firstname.lastname@example.org>
From: Patrick Welche,SCC,ext.35710, <email@example.com>
Date: 07/26/2002 19:44:40
>Synopsis: make doesn't honour escaped comment lines
>Arrival-Date: Fri Jul 26 11:45:01 PDT 2002
>Originator: Patrick Welche
>Release: NetBSD 1.6D
According to make(1):
There are seven different types of lines in a makefile: file dependency
specifications, shell commands, variable assignments, include statements,
conditional directives, for loops, and comments.
In general, lines may be continued from one line to the next by ending
them with a backslash (`\'). The trailing newline character and initial
whitespace on the following line are compressed into a single space.
So a makefile containing
# hello \
really only contains a comment and should give the error "no target to make"
rather than "line 2: Need an operator". This cropped up in automake's
According to Jaromir Dolecek, SUSv3 "specifies that comments start
with hash and continue until unescaped newline is reached."