From owner-freebsd-bugs@FreeBSD.ORG Mon Jun 21 13:37:16 2010 Return-Path: Delivered-To: freebsd-bugs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33415106566C for ; Mon, 21 Jun 2010 13:37:16 +0000 (UTC) (envelope-from brde@optusnet.com.au) Received: from mail06.syd.optusnet.com.au (mail06.syd.optusnet.com.au [211.29.132.187]) by mx1.freebsd.org (Postfix) with ESMTP id A79A88FC26 for ; Mon, 21 Jun 2010 13:37:15 +0000 (UTC) Received: from c122-106-145-229.carlnfd1.nsw.optusnet.com.au (c122-106-145-229.carlnfd1.nsw.optusnet.com.au [122.106.145.229]) by mail06.syd.optusnet.com.au (8.13.1/8.13.1) with ESMTP id o5LDbBfJ012349 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 21 Jun 2010 23:37:13 +1000 Date: Mon, 21 Jun 2010 23:37:11 +1000 (EST) From: Bruce Evans X-X-Sender: bde@delplex.bde.org To: Garrett Wollman In-Reply-To: <201006210250.o5L2o4Bj033248@freefall.freebsd.org> Message-ID: <20100621232444.B43803@delplex.bde.org> References: <201006210250.o5L2o4Bj033248@freefall.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed Cc: freebsd-bugs@freebsd.org Subject: Re: bin/148024: Some built-in AT&T/POSIX compat make variables are broken X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Jun 2010 13:37:16 -0000 On Mon, 21 Jun 2010, Garrett Wollman wrote: > In article > , > 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