[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Secondary expansion and pattern rules

From: Paul Smith
Subject: Re: Secondary expansion and pattern rules
Date: Fri, 08 Feb 2019 16:07:08 -0500

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

However, for a workaround you can use $$*.c instead of $$< in this
situation and get the same result.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]