Boost logo

Boost-Build :

From: Vladimir Prus (ghost_at_[hidden])
Date: 2005-11-24 06:48:36


Hi,
I've run into a corner case in the install rule. Say, I want to install all
*needed* libraries in my project into "/usr/lib".

I can write:

install dist-libs : main_exe : <install-dependencies>on
<install-type>LIB
<location>/usr/lib ;

and all libraries "main_exe" depends on will be automatically installed.
Note that "main_exe" itself won't be installed.

Now what about:

install everything : main_exe header.h :
<install-dependencies>on
<install-type>LIB
<location>/opt/my_project ;

This case it very similar -- it will install all used libraries. And it won't
install "header.h". I'm wondering if that's no too surprising behaviour --
one specifies a target explictly, and it's ignored.

It's easy to change V2 code, so that all explicitly specified targets are
installed, but in the first case we don't want "main_exe" to be installed to
the "lib" directory. And so we'd need another feature to say "install only
targets with explicitly allowed type".

This becomes too complicated, so I'd prefer noting the current behaviour in
the docs, and suggesting to use the following when both libraries and headers
must be installed.

install libs : main_exe :
<install-dependencies>on
<install-type>LIB
<location>/opt/my_project ;
install headers : header.h : <location>/opt/my_project ;

Anybody feels strongly against this?

- Volodya


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