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:

<top>/bin/<property_list>/<top_to_a_src_path>/a.obj

with this scheme, everything below:

<top>/bin/<property_list>

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

and:

<top>/libs/cyclic_ptr/test/ bin

and:

whatever.

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
../../utility/src/obj_id.cpp
<lib>../../cyclic_ptr/build/libboost_cyclic_ptr

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:

<top>/libs/cyclic_ptr/build/bin/libboost_cyclic_ptr.a/gcc/debug/runtime-link-dynamic/libboost_cyclic_ptr.a

but the obj_id.o file is placed at:

<top>/libs/cyclic_ptr/example/bin/main.exe/gcc/debug/runtime-link-dynamic/obj_id.o

instead of:

<top>/libs/utility/src/bin/gcc/debug/obj_id.o

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

../../utility/src/obj_id.cpp

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 acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk