Date: Wed, 21 Jul 2004 18:00:34 GMT From: Hartmut Brandt <harti@FreeBSD.org> To: jhs@jhs.muc.de, harti@FreeBSD.org, freebsd-bugs@FreeBSD.org, harti@FreeBSD.org Subject: Re: bin/25627: Cannot append hash after .elif in Makefile, (but can after .if) Message-ID: <200407211800.i6LI0Y05078376@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200407211800.i6LI0Y05078376>