On Fri, 2015-01-16 at 12:52 -0800, Parke wrote: > It appears that if there are no normal prerequisites, $< will ignore > any order-only prerequisites. > > This is not the behavior I expected, and I could not find > documentation describing this behavior.
I agree it should be documented explicitly, but I don't necessarily think it's wrong. You may note that the $^ variable doesn't contain order-only prerequisites either. The idea is that prerequisites that are order-only are qualitatively different than normal prerequisites; they're there only to ensure things happen in a particular order. The manual gives a hint: http://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html when it says that order-only prerequisites don't create a "dependency relationship"; because of this they aren't included in the normal dependency variables like $^ and $<. If the prerequisite needed to be both ordered AND create a dependency relationship, then it would be a normal prerequisite not an order-only prerequisite. > foo bar: > @ echo $@ $< If you really want this behavior, you can write: foo bar: @ echo $@ $(firstword $< $|) _______________________________________________ Bug-make mailing list Bug-make@gnu.org https://lists.gnu.org/mailman/listinfo/bug-make