From owner-freebsd-bugs Thu Apr 18 7:10:14 2002 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.FreeBSD.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 032A337B41A for ; Thu, 18 Apr 2002 07:10:04 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3IEA3r22544; Thu, 18 Apr 2002 07:10:03 -0700 (PDT) (envelope-from gnats) Date: Thu, 18 Apr 2002 07:10:03 -0700 (PDT) Message-Id: <200204181410.g3IEA3r22544@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: Ruslan Ermilov Subject: Re: bin/37224: make: $< only set for implicit rules Reply-To: Ruslan Ermilov Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org The following reply was made to PR bin/37224; it has been noted by GNATS. From: Ruslan Ermilov To: Gerald Pfeifer Cc: bug-followup@FreeBSD.org Subject: Re: bin/37224: make: $< only set for implicit rules Date: Thu, 18 Apr 2002 17:06:57 +0300 --5Mfx4RzfBqgnTE/w Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 18, 2002 at 01:23:18PM +0200, Gerald Pfeifer wrote: >=20 > .c.o: > echo $< >=20 > foo: bar.c > echo $< >=20 >=20 > Specifically, 'make bar.o' prints bar.c, as expected, while 'make foo' > prints the empty string (as $< has not been set). >=20 > GNU make prints bar.c in both cases, and also my reading of > IEEE Std 1003.1-2001 indicates that make(1) is incorrect here. >=20 No, POSIX.1-2001 requests the $< to be defined in the "inference" rules, i.e., .c.o type of rules. For "target" rules, like "foo: bar.c" above, it should be undefined: : $< 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. For example, ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ : in the .c.a inference rule, $< represents the prerequisite : .c file. I think this PR can be closed. Cheers, --=20 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 --5Mfx4RzfBqgnTE/w Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.0.6 (FreeBSD) Comment: For info see http://www.gnupg.org iD8DBQE8vtMAUkv4P6juNwoRAqktAJ0Y8nYdeNRKTS5ZfIYEZWv+CHnYxQCfcciF A1dm7hv4NeNFR39gQEUN/wU= =Cy4T -----END PGP SIGNATURE----- --5Mfx4RzfBqgnTE/w-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message