Boost logo

Boost-Build :

Subject: Re: [Boost-build] Newbie Q
From: Reynolds, John (John.Reynolds_at_[hidden])
Date: 2009-08-06 09:37:56


Brent

You are probably better writing a generator or make rule see http://www.boost.org/doc/tools/build/doc/html/bbv2/builtins/raw.html

 

-----Original Message-----
From: boost-build-bounces_at_[hidden] [mailto:boost-build-bounces_at_[hidden]] On Behalf Of Brent72
Sent: 04 August 2009 14:01
To: boost-build_at_[hidden]
Subject: Re: [Boost-build] Newbie Q

Alex Richardson-2 wrote:
>
> Next, at the top of my Jamroot file I have the lines:
>
> path-constant SRC_DIR : . ;
> SHELL "( cd $(SRC_DIR) && ./extract_boost.sh )" ;
>
> 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.
>

Hi.

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: http://www.nabble.com/Beginner-problems---bjam-tp21794467p24808120.html
Sent from the Boost - Build mailing list archive at Nabble.com.
_______________________________________________
Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build

Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk