5 messages in com.perforce.jamming[jamming] reading on-target variables
FromSent OnAttachments
Bartosz Fenski aka fEnIo18 Oct 2003 12:02 
Alan Baljeu" <alanb@cornerstonemold.com (Alan Baljeu)20 Oct 2003 06:42 
Chris Antos20 Oct 2003 11:04 
Alen Ladavac20 Oct 2003 12:28 
Alen Ladavac21 Oct 2003 00:33 
Subject:[jamming] reading on-target variables
From: ()
Date:10/20/2003 06:42:56 AM
List:com.perforce.jamming

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.