Bug in Make - comments don't work as documented

John M Sellens jmsellens at watmath.UUCP
Sun Sep 30 05:27:54 AEST 1984


The way make handles comments and the way the documentation says
they are handled are inconsistent.

The documentation says that "all characters after a aharp (#) are ignored,
as is the sharp itself" ('Make - A Program for Maintaining Computer
Programs', S.I. Feldman, page 3, under Description Files and Substitutions).

But - try this as a Makefile:

# This is a comment
all : ; echo hello # This is not a comment
# This is a comment
	echo goodbye # This is not a comment either
nothing: # This is a comment

Now, I can see the reason for this, and it would otherwise be impossible
(as near as I can figure out)  to get a '#' on a command line.  Perhaps
the comment convention should be changed to "lines beginning with a sharp
are ignored" and forget trying to allow trailing comments ...

John M Sellens
UUCP:  {decvax|utzoo|ihnp4|allegra|clyde}!watmath!jmsellens
CSNET: jmsellens%watmath at waterloo.csnet
ARPA:  jmsellens%watmath%waterloo.csnet at csnet-relay.arpa



More information about the Net.bugs mailing list