more docs

This commit is contained in:
Thomas Nagy 2013-05-25 15:31:30 +02:00
parent ff4c5d301d
commit 10347ac94f
1 changed files with 6 additions and 4 deletions

View File

@ -26,11 +26,13 @@ def configure(conf):
def build(bld):
bld.post_mode = Build.POST_LAZY
# build directory for the external library
# declare the temporary build directory for the external library
# it is best to keep it under the project build directory
tmp_dir = bld.bldnode.make_node('external_lib')
# build the external library
bld(rule=some_fun, target=tmp_dir.make_node('flag.lock'))
# build the external library through an external process
# the "update_outputs" is unnecessary unless an external folder is given, for example tmp_dir = bld.root.make_node('/tmp/aaa')
bld(rule=some_fun, target=tmp_dir.make_node('flag.lock'), update_outputs=True)
# once it is done create a second build group
bld.add_group()
@ -38,7 +40,7 @@ def build(bld):
# read the library
bld.read_shlib('foo', paths=[tmp_dir], export_includes=[tmp_dir], export_defines=['A=1'])
# and use this library, for a target
# use this library for a target
# no additional build group needed since "app" will wait on "foo" through the use= system
bld.program(source='main.c', target='app', use='foo')