From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-02-09 03:42:56
> We build the same library using different dependencies. For instance one
> library is either linked with the open-source MPI implementation MPI or
> linked with a commercial implemantion like POE (MPI of IBM).
> So our Jamfile looks like:
> lib some_lib_mpich : foo.cpp /user-config//libmpich ;
> lib some_lib_poe : foo.cpp /user-config//libpoe ;
> Now when intalling, we 'stage' these targets into a directory that
> contains all libraries linked with mpich and into a directory that
> contains all libraries linked with poe. However we would like that the
> library in those directories have the same name. Thus we would like to
> do soth like:
> stage mpich : some_lib_mpich : <rename>some_lib ;
> stage poe : some_lib_poe : <rename>some_lib ;
It was possible in the past using almost the same syntax (<name> instead of
<rename>). However, I've recently removed this functionality because it might
not work reliably.
lib a : a.cpp ;
lib b : b.cpp a ;
stage a_dist : a : <name>my_a <location>dist ;
stage a_dist : b : <name>my_b <location>dist ;
On Linux, you need to relink the library when changing the name. When
relinking 'b' you probably need to link it against *staged* a -- because the
name of 'a' is changed during staging too. Without this, 'b' will still refer
to library called 'a', even though 'my_b' is installed.
Implementing the right behaviour is somewhat hard. What if I build only 'b',
for example. I need to link my_b against my_a, but my_a is not staged....
I would suggest using either new feature or <location-prefix> to build the two
libraries into different directories, but with the same name.
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