waf: make program() use blddestdir param

That param defines where the binary will be saved in the build directory,
namely `build/<board>/<blddestdir>`. The default is 'bin', for binaries that are
to be shipped for installation.
This commit is contained in:
Gustavo Jose de Sousa 2016-01-08 18:43:51 -02:00 committed by Lucas De Marchi
parent 4c60dd5e44
commit a55d803638
1 changed files with 3 additions and 2 deletions

View File

@ -74,7 +74,7 @@ def get_all_libraries(bld):
libraries.extend(['AP_HAL', 'AP_HAL_Empty'])
return libraries
def program(bld, **kw):
def program(bld, blddestdir='bin', **kw):
if 'target' in kw:
bld.fatal('Do not pass target for program')
if 'defines' not in kw:
@ -87,7 +87,8 @@ def program(bld, **kw):
kw['features'] = common_features(bld) + kw.get('features', [])
target = bld.bldnode.make_node(name + '.' + bld.env.BOARD)
target = bld.bldnode.find_or_declare(blddestdir + '/' +
name + '.' + bld.env.BOARD)
bld.program(
target=target,
name=name,