Boost logo

Boost-Build :

From: peter_schoen1_web_de (Peter.Schoen1_at_[hidden])
Date: 2003-09-02 05:05:06


Hi

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 ] ;
echo Project directory: $(prjDir) ;

local implFiles = [ path.glob $(prjDir) : *.cpp ] ;

Now this doesn't work, IF bjam is called from the directory
containing the MyLib Jamfile.

The "echo" output is:

Project directory: ../../util/boostTestUtils
Project directory:

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

The error is:

*** argument error
* rule path.glob ( dir : patterns + )
* called with: ( : *.cpp )
* missing argument dir

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

Very best wishes

-Peter-

 


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