From 60abd4ff2fe6aacf8b14c4e9e4829779b77692d7 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Fri, 15 Jan 2016 14:32:49 -0200 Subject: [PATCH] waf: don't differentiate taskgen names from targets for programs waf's terminology might be a bit confusing regarding the word 'target'. As an attribute for a task generator, it means the paths of the files supposed to be built. As a command line option (--target), it means the list of names of the task generators to be used in the build. Before this commit, only vehicles programs had their task generators' target parameter value different from the name parameter. Now, there's no distinction between those two parameters for the case of programs. --- README_waf.txt | 4 ++-- Tools/ardupilotwaf/ardupilotwaf.py | 9 ++------- wscript | 6 +++--- 3 files changed, 7 insertions(+), 12 deletions(-) diff --git a/README_waf.txt b/README_waf.txt index 038418ae5d..c0a3912582 100644 --- a/README_waf.txt +++ b/README_waf.txt @@ -26,13 +26,13 @@ It's possible to build for just a vehicle or an example by specifying it as the target: # From the top directory - waf --target ArduCopter + waf --targets bin/ArduCopter # List all the targets available waf list There are also shortcuts for vehicle builds, for example: - # Shortcut for waf --targets ArduCopter + # Shortcut for waf --targets bin/ArduCopter waf copter By default all the files produced by the build will be inside the build/ diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index c8a3ac2292..6d01c0e900 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -93,16 +93,11 @@ def program(bld, blddestdir='bin', kw['features'] = common_features(bld) + kw.get('features', []) - if blddestdir == 'bin': - name = program_name - else: - name = blddestdir + '/' + program_name - - target = bld.bldnode.find_or_declare(blddestdir + '/' + program_name) + target = blddestdir + '/' + program_name bld.program( target=target, - name=name, + name=target, **kw ) diff --git a/wscript b/wscript index 8ab30d9aeb..a9f2136854 100644 --- a/wscript +++ b/wscript @@ -186,6 +186,6 @@ class CheckContext(BuildContext): '''executes tests after build''' cmd = 'check' -copter = ardupilotwaf.build_shortcut(targets='ArduCopter') -plane = ardupilotwaf.build_shortcut(targets='ArduPlane') -rover = ardupilotwaf.build_shortcut(targets='APMrover2') +copter = ardupilotwaf.build_shortcut(targets='bin/ArduCopter') +plane = ardupilotwaf.build_shortcut(targets='bin/ArduPlane') +rover = ardupilotwaf.build_shortcut(targets='bin/APMrover2')