On Fri, 2019-02-08 at 14:32 -0500, Mike Haboustak wrote: > I've been trying to make use of secondary expansion and I ran into some > confusion that I couldn't reconcile with manual. Specifically, The value > of the automatic variable $< is not what I'd expect during the second > expansion of an implicit rule prerequisite. > > It seems that the value of $< is getting defaulted for implicit rules > during second expansion. However, the value of $< is correct in the > recipe. > > If this is the expected behavior, is there a way I can use secondary > expansion with implicit rules and get the correct value of $< for > foo.o (foo.c)?
I can't remember the complexity around expanding $< for implicit rules; it's something to do with when the expansion happens during pattern matching. However, for a workaround you can use $$*.c instead of $$< in this situation and get the same result. _______________________________________________ Help-make mailing list Help-make@gnu.org https://lists.gnu.org/mailman/listinfo/help-make