Boost logo

Boost-Build :

Subject: Re: [Boost-build] Dependent install targets
From: Johan Nilsson (r.johan.nilsson_at_[hidden])
Date: 2008-12-16 06:27:39

[long time since last post]

I've been testing a bit more using Boost.Build and Boost.Jam from trunk as
well as version from 1.34.1 (the problem occurs with both versions).

"Steven Watanabe" <watanabesj_at_[hidden]> skrev i meddelandet
> Johan Nilsson wrote:
>> - Project A installs a.exe to e.g. /projA/bin/a.exe
>> - Project B installs b.exe to e.g. /projB/bin/b.exe
>> - The latter should also include project A's a.exe target installation to
>> /projB/bin/a.exe
>> Is there a way of doing this by simply referring to a single target
>> defined within project A?
>> I guess it would be possible to explicitly refer to specific targets from
>> project B, e.g. "/projA/src/a/Jamfile//a", but I'd like project A to
>> define what dependent projects gets to install.
> You'll want to override the <location> property.
> Project A, Jamfile.jam:
> install relocatable-install : a : : <location>/projA/bin ;
> Project B, Jamfile.jam:
> alias install : /projA//relocatable-install/<location>/projB/bin ;

I couldn't get this to work. I get the following complaints:

C:\users\jni\scratch\tests\\dep_install\projB>bjam -a release
.../\path.jam:169: in path.join from module path
error: only the first element may be rooted
.../\virtual-target.jam:629: in
object(file-target)@77.path from module object(file-target)@77
.../\virtual-target.jam:927: in
virtual-target.register from module virtual-target
.../\stage.jam:184: in construct from module
.../\targets.jam:1244: in
object(install-target-class)@39.generate from module object(install-ta
.../\targets.jam:767: in generate-really from module
.../\targets.jam:739: in
object(main-target)@52.generate from module object(main-target)@52
.../\targets.jam:883: in
targets.generate-from-reference from module targets
.../\targets.jam:1168: in generate-dependencies from
module object(alias-target-class)@35
.../\targets.jam:1218: in
object(alias-target-class)@35.generate from module object(alias-target
.../\targets.jam:767: in generate-really from module
.../\targets.jam:739: in
object(main-target)@44.generate from module object(main-target)@44
.../\targets.jam:257: in
object(project-target)@33.generate from module object(project-target)@3
.../\build-system.jam:682: in load from module build-system
...\\trunk\kernel\modules.jam:283: in import from module modules
...\\trunk\kernel\bootstrap.jam:138: in boost-build from module
...\\trunk\boost-build.jam:8: in module scope from module

What seems to work is:

--- project B Jamroot ---

use-project /A : $(A-ROOT) ;

install bin
 /A//bin # aka relocatable-install

> Note that <location> needs to be in the default-build for
> projA//install so that it can be overridden.

That seems to apply to the above solution as well. Still, I can only get
this to work with the above toy projects; in my actual project I get the
error referenced in my previous posting.

/ Johan

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