From a89a1a8a8a396fc979d0cf52d2a4e1a5886cfb72 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Thu, 21 Jan 2016 11:47:10 -0200 Subject: [PATCH] waf: use ardupilotwaf as a Waf tool That will make it possible to replace calls of the form `ardupilotwaf.(bld, )` with `bld.()` 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 --- wscript | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wscript b/wscript index f2d107f8b0..f8f3105fe2 100644 --- a/wscript +++ b/wscript @@ -117,6 +117,7 @@ def list_boards(ctx): print(*boards.get_boards_names()) def build(bld): + bld.load('ardupilotwaf') bld.load('gtest') #generate mavlink headers @@ -137,11 +138,10 @@ def build(bld): # the tools and examples. This is the first step until the # dependency on the vehicles is reduced. Later we may consider # split into smaller pieces with well defined boundaries. - ardupilotwaf.ap_stlib( - bld, + bld.ap_stlib( name='ap', vehicle='UNKNOWN', - libraries=ardupilotwaf.get_all_libraries(bld), + libraries=bld.get_all_libraries(), use='mavlink', ) # TODO: Currently each vehicle also generate its own copy of the