Boost logo

Boost-Build :

From: Larry Evans (jcampbell3_at_[hidden])
Date: 2002-06-27 17:10:57

David Abrahams wrote:

> From: "Larry Evans" <jcampbell3_at_[hidden]>
> > What about:
> >
> > <property_list>/<top_to_a_src_path>/a.obj
> > <property_list>/<top_to_a_target_path>/a.exe
> >
> > ? In the above, the <top_to*> symbols are essentially the
> > subinclude paths in the Jamfiles, i.e. the path from the "top" directory
> to
> > the source file directory or main target directory.
> There's really no need for that, since the bin/ directories are already
> located in a place corresponding to that path.

I was unclear. The v1 jam produces the bin directory in the same directory
where the Jamfile is located. For example, I've got a Jamfile in
<top>/libs/smart_ptr/test/ and the bin directory is located the same place.

What I'm proposing is a location in:


with this scheme, everything below:


would be compiled with the same properties; hence, the object files
and library files can be linked together. As a side-effect, the code
is reused. This is is contrast with having the a.obj file located in:

<top>/libs/smart_ptr/test/ bin


<top>/libs/cyclic_ptr/test/ bin



Now the way jam works now is fine for libraries because they're put in
a directory all their own and can be reused in a Jamfile like:

unit-test main.exe
: main.cpp

but the .o files, at least I don't think, can be similary reused. I'm probably
missing something. Maybe somehow you can specify a .o file as a main target
and it's put in its own directory, like libboost_cyclic_ptr.a. I guess the key
concept is that .o files should be placed like libraries. For example, my libbbost_cyclic_ptr
library is placed at:


but the obj_id.o file is placed at:


instead of:


where it can be reused by any other main target which has:


in the <sources> of it's unit-test rule.

> > The Jamfile for <property_list>/<top_to_a_target_path>/a.exe
> > would specify just <top_to_a_src_path>/a.obj
> Usually Jamfiles don't ever mention .obj files explicitly... can you say
> more specifically what you had in mind?

I meant to say <top_to_a_src_path>/a.cpp.


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