Date: Thu, 26 Sep 2002 11:50:38 +0300 From: Ruslan Ermilov <ru@FreeBSD.org> To: Juli Mallett <jmallett@FreeBSD.org> Cc: cvs-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/usr.bin/make parse.c Message-ID: <20020926085038.GB9743@sunbay.com> In-Reply-To: <200209260644.g8Q6iUiv000195@freefall.freebsd.org> References: <200209260644.g8Q6iUiv000195@freefall.freebsd.org>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --]
On Wed, Sep 25, 2002 at 11:44:30PM -0700, Juli Mallett wrote:
> jmallett 2002/09/25 23:44:30 PDT
>
> Modified files:
> usr.bin/make parse.c
> Log:
> Remove a semicolon that appears to be a lie.
>
> Spotted by: SPARC64 make WARNS=3
> Sponsored by: Rachel Hestilow <rachel@jerkcity.com>
>
> Revision Changes Path
> 1.43 +1 -1 src/usr.bin/make/parse.c
>
As an aside. Our make(1) suffers from the parsing bug in
parse.c:ParseReadLine(). When it sees a colon (`:') it
marks the line as being a "dependency" line, and when it
later sees a semicolon (`;') it replaces it by a newline.
The net effect is that the following fragment blows up:
%%%
HDRS= foo.h bar.h
SRCDIR= ${.CURDIR}
barf:
.for h in ${HDRS:S;^;${SRCDIR}/;}
@echo ${h}
.endfor
%%%
This, OTOH, works:
%%%
HDRS= foo.h bar.h
SRCDIR= ${.CURDIR}
swallow:
.for h in ${HDRS:S/^/${SRCDIR}\//}
@echo ${h}
.endfor
%%%
In OpenBSD, this has been fixed yet in 2001 by the new parsing code
(parse.c,v 1.59 and related changes).
Cheers,
--
Ruslan Ermilov Sysadmin and DBA,
ru@sunbay.com Sunbay Software AG,
ru@FreeBSD.org FreeBSD committer,
+380.652.512.251 Simferopol, Ukraine
http://www.FreeBSD.org The Power To Serve
http://www.oracle.com Enabling The Information Age
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (FreeBSD)
iD8DBQE9kspeUkv4P6juNwoRAokWAJ9GZaA3IwO1WTn7S5GMQyyG/fwxAQCcDv44
UpvlNfQTtvcbOww+Iz08jXI=
=wg4P
-----END PGP SIGNATURE-----
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020926085038.GB9743>
