[jamming] Implicit action won't work

Russell rjshaw at iprimus.com.au
Sat Feb 8 17:22:07 PST 2003


Ingo Weinhold wrote:
>>When i run jam, the rule HEX executes, but the action HEX
>>doesn't execute. Why?
>>
>>In Jamrules:
>>
>>rule HEX
>>{
>>   echo "Doing rule" ;
>>}
>>
>>actions HEX
>>{
>>   echo "Doing action"
>>}
> 
> 
> The actions only get executed, when the respective target on which it 
> is invoked is rebuilt.

Ok, i got that sorted;)
Now, i'm trying to understand SEARCH behaviour. In the Jamfile, i have:

SEARCH_SOURCE = objs ;
LOCATE_TARGET = objs ;
HEX myprog : myprog.exe ;

In Jamrules, i have:

rule HEX
{
   LOCATE on $(<) = $(LOCATE_TARGET) ;
   SEARCH on $(>) = $(SEARCH_SOURCE) ;
   Depends $(<) : $(>) ;
   Depends all : $(<) ;
   echo "Rule HEX:" $(<) $(>) ;
}

actions HEX
{
   echo "Action HEX:" $(<) $(>)
}

Running jam gives:
   Rule HEX: myprog myprog.exe
   Action HEX: myprog objs/myprog.exe

I don't understand why the second line doesn't say:
   Action HEX: objs/myprog objs/myprog.exe




More information about the jamming mailing list