waf: fix blddestdir

The destination directory for binaries should be
<build_dir>/<board>/bin/ and not
<build_dir>/<board>/<where-wscript-file-is>/bin

The same reasoning can be applied for others: tools, examples, etc
should follow the same rule.

Before this patch, compiling for example ArduPlane for navio we would
have:

    [339/339] Linking build/navio/ArduPlane/bin/ArduPlane

And now we have:

    [339/339] Linking build/navio/bin/ArduPlane
This commit is contained in:
Lucas De Marchi 2016-01-17 00:33:00 -02:00
parent eb6c89d09c
commit d663a748f2
1 changed files with 3 additions and 2 deletions

View File

@ -94,11 +94,12 @@ def program(bld, blddestdir='bin',
kw['features'] = common_features(bld) + kw.get('features', [])
target = os.path.join(blddestdir, program_name)
name = os.path.join(blddestdir, program_name)
target = bld.bldnode.find_or_declare(name)
bld.program(
target=target,
name=target,
name=name,
**kw
)