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')