From owner-freebsd-bugs Thu Apr 18 8:40:26 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 C63AB37B405 for ; Thu, 18 Apr 2002 08:40:03 -0700 (PDT) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.6/8.11.6) id g3IFe3C41106; Thu, 18 Apr 2002 08:40:03 -0700 (PDT) (envelope-from gnats) Date: Thu, 18 Apr 2002 08:40:03 -0700 (PDT) Message-Id: <200204181540.g3IFe3C41106@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 18:30:05 +0300 --pZs/OQEoSSbxGlYw Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Apr 18, 2002 at 04:19:39PM +0200, Gerald Pfeifer wrote: > On Thu, 18 Apr 2002, Ruslan Ermilov wrote: > >> 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. > > 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. >=20 > This was my first thinking as well, but then I got apparently confused by > the standard. :-( >=20 > > I think this PR can be closed. >=20 > If this isn't a bug in the implementation, the man page for make(1) should > be updated. The following certainly is not sufficient: >=20 > .IMPSRC The name/path of the source from which the target is to > be transformed (the ``implied'' source); also known as > `<'. >=20 > The current man page even does not contain the string "inference" at all, > and the above is the only reference to "implied" as well. >=20 > In other words, even if the implementation is correct, there is certainly > a lack of documentation, so instead of closing the PR it ought to be moved > from bin to doc in this case. >=20 In PMake, they are called "Transformation Rules", and are well documented in section 3.1 of the SEE ALSO referenced document. Have a look at it. Sad as it is, we aren't allowed to directly take and incorporate POSIX texts, though they apparently took BSD manuals as the basis. 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 --pZs/OQEoSSbxGlYw 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 iD8DBQE8vuZ9Ukv4P6juNwoRAhIqAJ0VuImc5FXzeoyG+RTzCYeePxKdwgCfTup3 ckW+YnQdgwyW1sWfTxd/WrA= =fZqU -----END PGP SIGNATURE----- --pZs/OQEoSSbxGlYw-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message