Boost logo

Boost-Build :

From: Andre Genereux (andre_genereux01_at_[hidden])
Date: 2005-11-03 19:05:01

Consider the following directory structure:

| |World.h
| |World.cxx
| |
| |---lib2---|Jamfile
| |Hello.h
| |Hello.cxx

As you may guess, the lib Jamfiles contain lib targets, and the app
Jamfile contains an exe target.

I want to change the build directory of each one from bin to build
(for whatever reason). Thus, I place the following at the top of my

project proj-name
: build-dir build

The build-project for lib2 could also go in the lib1 Jamfile, the
effect is identical.

I expect this to do the following:
lib1 will be built in src/lib1/build/etc...
lib2 will be built in src/lib1/lib2/build/etc...
app will be built in src/app/build/etc...

When I run bjam from src, lib1, or app, this is exactly what happens.
However, if I run it from lib2, lib2 builds in:


This is entirely not what I want. It also seems kind of silly that the
library will built in different directories depending on where you run
bjam. Is this a bug, or a feature that can hopefully be circumvented?

In case you need them, here are my Jamfiles:



project test-proj ;

using gcc ;

build-project lib1 ;
build-project lib1/lib2 ;
build-project app ;



project world
: build-dir build

lib World : World.cxx lib2//Hello
: <include>.
: : <include>. ;



project hello
: build-dir build ;

lib Hello : Hello.cxx
: <include>.
: : <include>. ;



project helloworld
: build-dir build

exe HelloWorld : helloWorld.cxx ../lib1//World
: <include>. ;


Andre Genereux

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