Hello,

I'm new to the boost.build system, yesterday I've installed bjam and boost.build and at the first glance it was very easy to use and powerful.
I set up my project according to the tuturials and documentation and ran into a problem and didn't find a solution.

My Problem:

I have a library say TEST1 in one subproject dependent on a library say TEST2 in another subproject. I've put it in the sources list, but it isn't handled right.
On the one hand it even doesn't compile the library TEST2 in the other subproject when I run bjam to compile library TEST1 on the other hand
the library is passed to the linking process like an installed library ( -lTEST2 ). The result is:

~/TestDir1 michael$ bjam --v2
...found 28 targets...
...updating 1 target...
darwin.link.dll ../TestDir1/bin/darwin/debug/libTEST1.dylib
/usr/bin/libtool: can't locate file for: -lTEST2
/usr/bin/libtool: file: -lTEST2 is not an object file (not allowed in a library)
...

Firstly the problem is, that it obviously can't find the library. I know how to compile it by hand, but I want it to automatically be done.

The line it tries looks:
 g++ -dynamiclib  -o "../Test1Dir/bin/darwin/debug/libTEST1.dylib" <all the object files> -lTEST2 -g

but it should look like this

 g++ -dynamiclib  -o "../Test1Dir/bin/darwin/debug/libTEST1.dylib" <all the object files> "../Test2Dir/bin/darwin/debug/libTEST2.dylib" -g

Secondly I want the library TEST2 to be compiled when I run bjam to compile TEST1.

running bjam in the root directory doesn't work for me, I didn't work the problem out yet.

Thanks for your help,
Michi

My Directory structure is like this:
root
- Jamroot
+ Test1Dir
 |-- Jamfile
 |-+src
+ Test2Dir
 |-- Jamfile
 |-+src

########################################
My Jamroot:
########################################

project test
: requirements <include>/Developer/C++/TUT
;

use-project /test/test2 : Test2Dir ;
use-project /test/test1 : Test1Dir ;

build-project /test/test2 ;
build-project /test/test1 ;

########################################
My Jamfile in Test2Dir:
########################################

project test2
: requirements <include>src
;

SOURCE_DIRS = 
src
;

SOURCES =
[ GLOB $(SOURCE_DIRS) : *.cpp *.c ]
;

lib TEST2 : $(SOURCES) : : : <include>src ;


########################################
My Jamfile in Test1Dir
########################################

project test1
: requirements <include>src
;

SOURCE_DIRS = 
src
src/csv
;

TEST_DIRS = 
test
test/csv
;

SOURCES =
[ GLOB $(SOURCE_DIRS) : *.cpp *.c ]
/test/test2//TEST2
;

TEST_SOURCES = 
TEST1
[ GLOB $(TEST_DIRS) : *.cpp *.c ]
;

lib TEST1 : $(SOURCES) : : : <include>src ;

exe tests : $(TEST_SOURCES) ;

explicit tests ;


########################################