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
news:4935BC69.40400_at_providere-consulting.com...
> AMDG
>
> 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\boost.build\dep_install\projB>bjam -a release
.../boost.build/trunk/util\path.jam:169: in path.join from module path
error: only the first element may be rooted
.../boost.build/trunk/build\virtual-target.jam:629: in
object(file-target)@77.path from module object(file-target)@77
.../boost.build/trunk/build\virtual-target.jam:927: in
virtual-target.register from module virtual-target
.../boost.build/trunk/tools\stage.jam:184: in construct from module
object(install-target-class)@39
.../boost.build/trunk/build\targets.jam:1244: in
object(install-target-class)@39.generate from module object(install-ta
.../boost.build/trunk/build\targets.jam:767: in generate-really from module
object(main-target)@52
.../boost.build/trunk/build\targets.jam:739: in
object(main-target)@52.generate from module object(main-target)@52
.../boost.build/trunk/build\targets.jam:883: in
targets.generate-from-reference from module targets
.../boost.build/trunk/build\targets.jam:1168: in generate-dependencies from
module object(alias-target-class)@35
.../boost.build/trunk/build\targets.jam:1218: in
object(alias-target-class)@35.generate from module object(alias-target
.../boost.build/trunk/build\targets.jam:767: in generate-really from module
object(main-target)@44
.../boost.build/trunk/build\targets.jam:739: in
object(main-target)@44.generate from module object(main-target)@44
.../boost.build/trunk/build\targets.jam:257: in
object(project-target)@33.generate from module object(project-target)@3
.../boost.build/trunk\build-system.jam:682: in load from module build-system
...\boost.build\trunk\kernel\modules.jam:283: in import from module modules
...\boost.build\trunk\kernel\bootstrap.jam:138: in boost-build from module
...\boost.build\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
 :
 <install-type>EXE
 <variant>debug:<location>$(BIN-DBG)
 <variant>release:<location>$(BIN-REL)
 ;

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