bin/25627: Cannot append hash after .elif in Makefile, (but can after .if)

Hartmut Brandt harti at FreeBSD.org
Wed Jul 21 11:00:35 PDT 2004


Synopsis: Cannot append hash after .elif in Makefile, (but can after .if)

State-Changed-From-To: suspended->open
State-Changed-By: harti
State-Changed-When: Wed Jul 21 17:51:06 GMT 2004
State-Changed-Why: 
I think I have a working patch. The problem with the original patch
seems to be that the function in question (ParseSkipLine) is called from
two places to do two entirely different things: with skip=true it is called
from the conditional handling code to skip false .if contents until a
line beginning with a dot is found. All input is discarded in this case.
It is also called from the .for handling code to collect the for loop.
In this case skip=false and the function will return the entire for loop.

In the latter case we should not skip comments, because this must be done
in the main code. Comment skipping is just a little bit more complex
than just looking for a '#'. Think of:

foo:
	echo '#define INET' >opt_inet.h

harti



Responsible-Changed-From-To: freebsd-bugs->harti
Responsible-Changed-By: harti
Responsible-Changed-When: Wed Jul 21 17:51:06 GMT 2004
Responsible-Changed-Why: 
I think I have a working patch. The problem with the original patch
seems to be that the function in question (ParseSkipLine) is called from
two places to do two entirely different things: with skip=true it is called
from the conditional handling code to skip false .if contents until a
line beginning with a dot is found. All input is discarded in this case.
It is also called from the .for handling code to collect the for loop.
In this case skip=false and the function will return the entire for loop.

In the latter case we should not skip comments, because this must be done
in the main code. Comment skipping is just a little bit more complex
than just looking for a '#'. Think of:

foo:
	echo '#define INET' >opt_inet.h

harti


http://www.freebsd.org/cgi/query-pr.cgi?pr=25627


More information about the freebsd-bugs mailing list