[jamming] Implicit action won't work

Ingo Weinhold bonefish at cs.tu-berlin.de
Sun Feb 9 16:23:38 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

I don't know either. I threw your lines into a Jamfile and got:

$ jam-2.4
Rule HEX: myprog myprog.exe
..found 9 target(s)...
..updating 1 target(s)...
HEX objs/myprog
Action HEX: objs/myprog objs/myprog.exe
..updated 1 target(s)...

Tested with plain Jam 2.4.

CU, Ingo





More information about the jamming mailing list