Boost logo

Boost-Build :

Subject: Re: [Boost-build] Newbie Q
From: Brent72 (bkleineibst_at_[hidden])
Date: 2009-08-04 09:01:08

Alex Richardson-2 wrote:
> Next, at the top of my Jamroot file I have the lines:
> path-constant SRC_DIR : . ;
> SHELL "( cd $(SRC_DIR) && ./ )" ;
> Unlike a 'target' rule, bjam runs the 'SHELL' rule/command as soon as
> it is encountered. So as bjam starts to read through my Jamroot file
> to gether targets, the first thing it does is to run my shell script.


I'm also a newbie to bjam and have a similar requirement to John. I tried
the above suggestion to run a script that creates/updates a source file. I
found that on the first build the script gets updated, but the project isn't
rebuilt. On the 2nd build the script gets updated again and the project is
rebuilt. It seems to be building the project every 2nd build.

It seems to me that the 'SHELL' command isn't executed before calculating
the targets. Is there any way to get around this?

Here's my very simple test jamfile:
SHELL "echo //Test > test.h" ;
exe test : test.cpp ;

I have tried moving the SHELL command to jamroot, but no change.

View this message in context:
Sent from the Boost - Build mailing list archive at

Boost-Build list run by bdawes at, david.abrahams at, gregod at, cpdaniel at, john at