From a55d803638c318952689251010da8496d432a63a Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Fri, 8 Jan 2016 18:43:51 -0200 Subject: [PATCH] waf: make program() use blddestdir param That param defines where the binary will be saved in the build directory, namely `build//`. The default is 'bin', for binaries that are to be shipped for installation. --- Tools/ardupilotwaf/ardupilotwaf.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index 07264c0987..5a638bbcd6 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -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,