waf: use blddestdir to define task generator name

The only exception is for binaries that go in 'bin', like vehicles.
That way, partial builds follow the rule:
 - If building a vehicle or some helper that goes into 'bin', just use the
   binary name as the argument for --target. Example: `waf --target
   ArduCopter`.
 - For other binaries, the name of the directory they are placed in must be
   used. Example: `waf --target tests/test_vectors`.
This commit is contained in:
Gustavo Jose de Sousa 2016-01-11 19:47:40 -02:00 committed by Lucas De Marchi
parent a55d803638
commit e549d0a3eb
1 changed files with 3 additions and 0 deletions

View File

@ -89,6 +89,9 @@ def program(bld, blddestdir='bin', **kw):
target = bld.bldnode.find_or_declare(blddestdir + '/' +
name + '.' + bld.env.BOARD)
if blddestdir != 'bin':
name = blddestdir + '/' + name
bld.program(
target=target,
name=name,