[net.bugs.4bsd] "Make" manual doesn't match code

mogul@Gregorio.ARPA (12/01/84)

Index:	bin/make/gram.y 4.2BSD

Description:
	The user's guide for "make" (/usr/doc/make) says
	
	  "There is also a comment convention: all characters after a
	  sharp (#) are ignored, as is the sharp itself."
	
	and
	
	  "A command is any string of characters not including a sharp
	  (except in quotes) or newline."

	The manual page (/usr/man/man1) is less explicit:
	
	  "Sharp and newline surround comments"

	Neither document is correct.  A sharp is treated as a comment
	character, whether surrounded by quotes or not, wherever it
	appears EXCEPT if it appears in a command.  If it appears in
	a command, it is passed to the shell untouched.  (A command is
	the tail of any line following a ";", or any line started by a
	tab.)
	
	This makes it impossible, for example, to define a "macro" with
	an embedded "#".

Repeat-By:
	call this "makefile" and run make:
	################################################################
	MACRO = "# fails"
	
	all: works fails
	
	works:
		echo "# works"
		echo # works too

	fails:
		echo $(MACRO)
	################################################################
	When I run it, it doesn't print "# fails".