Date: Mon, 21 Jun 2010 23:37:11 +1000 (EST) From: Bruce Evans <brde@optusnet.com.au> To: Garrett Wollman <wollman@hergotha.csail.mit.edu> Cc: freebsd-bugs@freebsd.org Subject: Re: bin/148024: Some built-in AT&T/POSIX compat make variables are broken Message-ID: <20100621232444.B43803@delplex.bde.org> In-Reply-To: <201006210250.o5L2o4Bj033248@freefall.freebsd.org> References: <201006210250.o5L2o4Bj033248@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, 21 Jun 2010, Garrett Wollman wrote: > In article > <mit.lcs.mail.freebsd-bugs/201006210044.o5L0iPXK000857@www.freebsd.org>, > gcooper@freebsd.org writes: > > >foo: bar > > @echo target: $@ prereq: $< > >$ make -f ~/Makefile.prereq foo > >target: foo prereq: This doesn't look like a POSIX makefile (IIRC the original mail shows a cat command to show the whole makefile). A POSIX makefile must begin with a .POSIX special target. See sys.mk. The POSIX support in sys.mk probably doesn't actually work right, but that is another bug. (Most recently I noticed breakage of the POSIX mandated rules by encrufting them with CTFCONVERT shell commands.) > >The above invocation should have printed out: > > > >target: foo prereq: bar > > No. $< is only defined for pattern rules. > > >$< > > In an inference rule, the $< macro shall evaluate to the filename > >whose existence allowed the inference rule to be chosen for the target. > >In the .DEFAULT rule, the $< macro shall evaluate to the current target > >name. The meaning of the $< macro shall be otherwise unspecified. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Strange wording. It commands itself the not specifiy something that it doesn't specify. Anyway, this means that the makefile is more non-POSIX than just its missing .POSIX. Bruce
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20100621232444.B43803>