Boost logo

Boost-Build :

Subject: Re: [Boost-build] Boost-build Digest, Vol 49, Issue 27
From: Jim Gallagher (jim_at_[hidden])
Date: 2009-09-29 19:04:29


Johan,

I'm fine with "alias stage ;". That makes sense.

So now I have a different issue. I have situations like this, where I
would like to stage a given lib to both a client and a server staging
area:

lib a : a.c ;
lib b : b.c ;
lib c : c.c ;

install stage-client
        : a c
        : <location>$(STAGE_CLIENT)
;

install stage-server
        : b c
        : <location>$(STAGE_SERVER)
;

explicit stage stage-client stage-server ;
alias stage : stage-client stage-server ;

If I run "bjam stage" at the subproject level, it works fine. If I run
it at the top level, I get errors like this:

M:\test_20090928\src>bjam stage
M:/test_20090928/boost-build/build\virtual-target.jam:996: in
virtual-target.register-actual-name from module virtual-target
error: Duplicate name of actual target: <pstage>c.exe
error: previous virtual target { common%common.copy-c.exe.EXE {
common%common.copy-c.exe.EXE { msvc%msvc.link-c.exe.EXE {
msvc%msvc.compile.c-c.obj.OBJ { c.c.C } } } } }
error: created from ./stage
error: another virtual target { common%common.copy-c.exe.EXE {
common%common.copy-c.exe.EXE { msvc%msvc.link-c.exe.EXE {
msvc%msvc.compile.c-c.obj.OBJ { c.c.C } } } } }
error: created from ./stage
error: added properties: none
error: removed properties: none
M:/test_20090928/boost-build/build\virtual-target.jam:459: in
actualize-no-scanner from module object(file-target)@5045
M:/test_20090928/boost-build/build\virtual-target.jam:111: in
object(file-target)@5045. actualize from module
object(file-target)@5045
M:/test_20090928/boost-build\build-system.jam:488: in load from module
build-system
M:\test_20090928\devutils\..\boost-build\kernel\modules.jam:261: in
import from module modules
M:\test_20090928\devutils\..\boost-build\kernel\bootstrap.jam:132: in
boost-build from module
M:\test_20090928\devutils\..\boost-build\boost-build.jam:1: in module
scope from module

I think the errors are telling me that it has a problem with c.exe
being a target that gets copied to two different places. Any idea how
to get around this?

Thanks,
Jim

> Try:
>
> alias stage ;
>
> Alternatives (to avoid every Jamfile having to define this):
>
> As you have the paths to the Jamfiles, you _could_ make a regex search for
> e.g. "^\s*install\s+stage" (not sure if this exact regex works with the
> Boost.Jam regex engine). Hackish, but workable. As a variation you could add
> your own unique tags somewhere inside the Jamfiles to mark file as having a
> stage target.
>


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