|
Boost-Build : |
Subject: Re: [Boost-build] staging subprojects
From: Jim Gallagher (jim_at_[hidden])
Date: 2009-09-25 12:41:06
Johan,
Thanks for your suggestion. It seems to work fine, but what about when
one of the subprojects should not be staged? I've been experimenting
with trying to define a "null" stage rule for those subprojects, but I
am not having much luck.
Thanks,
Jim
> From: "Johan Nilsson"
> To: boost-build_at_[hidden]
> Subject: Re: [Boost-build] staging subprojects
> Jim Gallagher wrote:
>> Hi,
>>
>> I have a project tree, and I force the entire tree to be built by
>> invoking the build at the root. I have the following in my Jamroot:
>>
>> # find all the jam subprojects
>> JamProjects =
>> [ MATCH (.*)/Jamfile : [ glob-tree Jamfile ] ]
>> ;
>>
>> #build-project $(BJamProjects) ;
>> for local proj in $(JamProjects)
>> {
>> build-project $(proj) ;
>> }
>>
>>
>> Building works fine. In addition to a lib or exe rule, most of the
>> subprojects have an install rule that looks like this:
>>
>> install stage
>> : theLib
>> : <location>$(STAGE_SERVER)
>> ;
>>
>> Running bjam stage in each of the subprojects works as expected,
>> resulting in a copy of the lib or exe being place in the specified
>> directory. I am having difficulty getting a root build to have each
>> subproject run the stage target. Any suggestions as to how I could
>> accomplish this?
>
> Basically, you can use found jam projects, replacing the "/Jamfile$" with
> "//stage", and e.g. add these to an alias, e.g:
>
> -- Jamroot (partial, untested) --
>
> path-constant all-stage : all-stage ;
>
> alias sub-stages : sub1//stage sub2//stage ; # but generating the target
> list automatically
>
> install stage :
> sub-stages
> :
> <location>$(all-stage) # overrides location if exists in sub-stage
> ;
>
> ---
>
> See also attached archive.
>
> HTH / 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