Reputation: 83
I have a folder IntegrationArea
and a project, main
, composed of 2 sub-projects, a
and b
, that looks like below:
IntegrationArea
main
|
a
|
wscript
|
b
|
wscript
|
wscript
Running waf build
in main/a
builds the artifatcs in a/build
. Running waf install
from the main/a
installs the artifacts from a/build
into the IntegrationArea
. So, after the build, the artifacts are available for the build of main/b
.
How can I write main/wscript
so that running waf build
from main
results in the followings:
cd a; waf build; waf install
cd ../b; waf build; waf install
I would need main/wscript
to contain something like
bld.cmd=('build install')
bld.recurse('a b')
Upvotes: 1
Views: 77
Reputation: 15180
I'm not sure I understand your problem. If you have something like:
# wscript in main
def build(bld):
bld.recurse(["a", "b"])
With:
# wscript in a
def build(bld):
bld(rule = touch, target = "a")
bld.install_files("../integration", "a")
def touch(task):
task.outputs[0].write("done a")
And:
# wscript in b
def build(bld):
bld(rule = touch, target = "b")
bld.install_files("../integration", "b")
def touch(task):
task.outputs[0].write("done b")
You can just go to main directory and start your install:
cd ~/main
waf install
Upvotes: 0