Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2003-09-02 05:20:58


Hi Peter,

> I trying to implement behaviour like this:
>
> lib MyLib : *.cpp ;
>
> I tried this:
>
> lib MyLib : [ path.glob . : *.cpp ] ;
>
> But this works only if bjam is started from the directory containing
> the cpp files and the MyLib Jamfile. Otherwise "." points to the
> directory where bjam was started and not to the directory containing
> the MyLib Jamfile.
>
> So I tried this:
>
> local prjDir = [ modules.peek project : location ] ;

I think this line is not correct: you're accessing "location" varible inside
"project" module, which is internal to that module, and generally speaking,
has no relation to the Jamfile location.

> So the Jamfiles seems to be evaluated twice, the second time
> [ modules.peek project : location ] seems to return "void".

I think they should be evaluated only one. If there are really evaluated twice
for you, maybe you could send me a testcase?

> Can you tell me the correct way to achieve the goal, please?

The following code works for me:

local location = [ project.attribute $(__name__) location ] ;
local l = [ path.glob $(location) : *.c ] ;
ECHO $(l) !!! ;

This probably should become new rule "glob" available in Jamfile context...

- Volodya

 


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