Boost logo

Boost-Build :

From: Reece Dunn (msclrhd_at_[hidden])
Date: 2006-01-11 09:20:41


Phillip Seaver wrote:
>I'd like to be able to automatically add projects when their directories
>exist. The reason is that we'd like to be able to not require having
>our entire source tree in order to build any project. What I tried is:
>
>local sub_dirs = [ sequence.transform path.parent : [ path.glob * :
>Jamfile ] ] ;
>for local d in $(sub_dirs) {
> use-project /$(d) : $(d) ;
>}
>[...]
>I put the above code (with "sub_dirs" in it) into the Jamfile in "libs"
>and tried "exe z : z.c /a//y" in "b" but it said that it couldn't find
>"/a//y".
>
>What am I doing wrong? Is there a better way to do it?

Try:
     use-project ./$(d) : $(d) ;
or even:
     use-project $(d) : $(d) ;
in the above code.

When it is trying to resolve the path, BB is matching /a as an absolute
path, but if your file is in /usr/boost/projects/a then this won't work.
Essentially, you either want a relative path (the second example) or to use
the current directory as a basis for the path (the first example).

Remember: treat locating a project like locating a directory.

HTH,
- Reece


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