Hi,

I'm trying to replace my current build system with Boost.build. Very simply, my directory structure looks like this:

/Jamroot
/src
/src/Jamfile
/src/project1
/src/project1/Jamfile
/src/project1/*.cpp
/src/project2
/src/project2/Jamfile
/src/project2/*.cpp

Now, project1 and project2 share some external libraries. So, according to the manual I should add them to site-config.jam like so:

import project ;
project.initialize $(__name__) ;
project site-config ;
lib whatever : : <name>whatever : : <include>/usr/local/include/whatever ;

I put this site-config.jam in the same directory as Jamroot.

My issue is that references to site-config don't seem to work. So in /src/project1/Jamfile I have:

exe project1 : project1.cpp /site-config//whatever ;

but I get:

error: Unable to find file or target named
error:     '/site-config//whatever'
error: referred from project at
error:     '.'

I also tried using a path-constant to refer to the top level directory. So, in Jamroot I have:

path-constant TOP : . ;

and in /src/project1/Jamfile:

exe project1 : project1.cpp TOP/site-config//whatever ;

but that doesn't work either:

error: Unable to find file or target named
error:     'TOP/site-config//whatever'
error: referred from project at
error:     '.'

How, should I be structuring this? I'd like my external libraries to all be defined at the root of the project so they're easy to modify on different computers. I'd also like to be able to run bjam in any subdirectory to just build what's in that directory and below. So, I need some way to import targets from the root directory.

Thanks,
Avery