Date: Thu, 18 Apr 2002 07:20:03 -0700 (PDT) From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> To: freebsd-bugs@FreeBSD.org Subject: Re: bin/37224: make: $< only set for implicit rules Message-ID: <200204181420.g3IEK3424118@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/37224; it has been noted by GNATS. From: Gerald Pfeifer <pfeifer@dbai.tuwien.ac.at> To: Ruslan Ermilov <ru@freebsd.org> Cc: bug-followup@freebsd.org Subject: Re: bin/37224: make: $< only set for implicit rules Date: Thu, 18 Apr 2002 16:19:39 +0200 (CEST) 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. This was my first thinking as well, but then I got apparently confused by the standard. :-( > I think this PR can be closed. If this isn't a bug in the implementation, the man page for make(1) should be updated. The following certainly is not sufficient: .IMPSRC The name/path of the source from which the target is to be transformed (the ``implied'' source); also known as `<'. The current man page even does not contain the string "inference" at all, and the above is the only reference to "implied" as well. 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. Gerald -- Gerald "Jerry" pfeifer@dbai.tuwien.ac.at http://www.dbai.tuwien.ac.at/~pfeifer/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200204181420.g3IEK3424118>