For those projects that should not be staged, this seems to work:

    install stage ;

    explicit stage ;

Does that appear acceptable?

On Fri, Sep 25, 2009 at 9:41 AM, Jim Gallagher <jim@thegallaghers.biz> wrote:
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@lists.boost.org
> 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