|
View:
New views
9 Messages
—
Rating Filter:
Alert me
|
|
|
staging subprojectsHi,
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? Thanks, Jim Gallagher _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: staging subprojectsJim 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? "//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 _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
|
|
|
Re: staging subprojectsFor 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@...> wrote: Johan, _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: staging subprojectsJim Gallagher 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. 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. HTH / Johan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
|
|
|
Re: staging subprojectsJim Gallagher wrote:
> Johan, > > Sorry, took some short cuts to assemble a quick reply, and made a > mess. > > OK, a stripped down project: I can see the same problem, and stripped down the project even further to: ============================= Jamroot: import os ; import feature ; import type ; path-constant TOP : . ; project TEST ; # find all the jam subprojects JamProjects = [ MATCH (.*)/Jamfile : [ glob-tree Jamfile ] ] ; for local proj in $(JamProjects) { build-project $(proj) ; } alias sub-stages : $(JamProjects)//stage ; install stage : sub-stages ; =========================== sub/Jamfile: lib a : a.c ; lib b : b.c ; lib c : c.c ; install stage-client : a c : <location>$(TOP)/stage/client ; install stage-server : b c : <location>$(TOP)/stage/server ; explicit stage stage-client stage-server ; alias stage : stage-client stage-server ; ================================== Judging from the output when running e.g. "bjam -q debug" message it seems like the "<location>" in the subprojects isn't being respected/detected; it looks like c.dll is attempted to get installed into "$(TOP)/stage" from both of the sub-targets. I'll take another look at it when I have some spare time. / Johan _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
Re: staging subprojectsAMDG
Johan Nilsson wrote: > Jim Gallagher wrote: >> Johan, >> >> Sorry, took some short cuts to assemble a quick reply, and made a >> mess. >> >> OK, a stripped down project: > > I can see the same problem, and stripped down the project even further > to: > > ============================= > Jamroot: > > import os ; > import feature ; > import type ; > > path-constant TOP : . ; > > project TEST ; > > # find all the jam subprojects > JamProjects = > [ MATCH (.*)/Jamfile : [ glob-tree Jamfile ] ] > ; > > for local proj in $(JamProjects) > { > build-project $(proj) ; > } > > > alias sub-stages : $(JamProjects)//stage ; > > install stage > : > sub-stages > ; You shouldn't use install here. This use of install finds c twice. Just use alias stage : $(JamProjects)//stage ; In Christ, Steven Watanabe _______________________________________________ Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost-build |
|
|
|
| Free embeddable forum powered by Nabble | Forum Help |