As I understand things, you can write a variable like
X on <ouput>foo = xxx ;
but there is no syntax to read x back.
_If_ a rule accessed target-specific variables, we could do this:
rule READ { return $($(>)) ; }
For example:
rule B { X on $(<) = hello ; Y on $(<) = [ READ $(<) : X ] eh ; }
actions B { echo $(Y) }
But rules don't access local variables. We might extend the
variable access syntax:
rule B { X on $(<) = hello ; Y on $(<) = $(X on $(<)) eh ; }
There doesn't seem to be any problems with this except to define the more
complex cases, such as $(x:E="blue_moon" on <output>foo). But in current
jam, this isn't defined either. Solution? Remove the spaces:
rule B { X_on_$(<) = hello ; Y_on_$(<) = $(X_on_$(<)) eh ; }
actions B { echo $(Y_on_$(<)) }
B x.cs ;
ALWAYS x.cs ;
Depends all : x.cs ;
On-target variables turn out to be unnecessary.