mirror of https://github.com/ArduPilot/ardupilot
waf: use ardupilotwaf as a Waf tool
That will make it possible to replace calls of the form `ardupilotwaf.<method>(bld, <keyword-args...>)` with `bld.<method>(<keyword-args...>)` in the wscripts. Advantages of that approach: - there is no need to import ardupilotwaf in every single wscript - it follows the same standard used by c and cxx tools (like bld.program, bld.stlib etc) - semantically, ap_program, ap_stlib, example etc are all build related methods, so it makes sense to bind them to the build context - from the wscripts' perspective, the code is cleaner, since ardupilotwaf, which is not specific to just build contexts, isn't *explictly* used
This commit is contained in:
parent
12cfe222eb
commit
a89a1a8a8a
6
wscript
6
wscript
|
@ -117,6 +117,7 @@ def list_boards(ctx):
|
||||||
print(*boards.get_boards_names())
|
print(*boards.get_boards_names())
|
||||||
|
|
||||||
def build(bld):
|
def build(bld):
|
||||||
|
bld.load('ardupilotwaf')
|
||||||
bld.load('gtest')
|
bld.load('gtest')
|
||||||
|
|
||||||
#generate mavlink headers
|
#generate mavlink headers
|
||||||
|
@ -137,11 +138,10 @@ def build(bld):
|
||||||
# the tools and examples. This is the first step until the
|
# the tools and examples. This is the first step until the
|
||||||
# dependency on the vehicles is reduced. Later we may consider
|
# dependency on the vehicles is reduced. Later we may consider
|
||||||
# split into smaller pieces with well defined boundaries.
|
# split into smaller pieces with well defined boundaries.
|
||||||
ardupilotwaf.ap_stlib(
|
bld.ap_stlib(
|
||||||
bld,
|
|
||||||
name='ap',
|
name='ap',
|
||||||
vehicle='UNKNOWN',
|
vehicle='UNKNOWN',
|
||||||
libraries=ardupilotwaf.get_all_libraries(bld),
|
libraries=bld.get_all_libraries(),
|
||||||
use='mavlink',
|
use='mavlink',
|
||||||
)
|
)
|
||||||
# TODO: Currently each vehicle also generate its own copy of the
|
# TODO: Currently each vehicle also generate its own copy of the
|
||||||
|
|
Loading…
Reference in New Issue