waf: add "ap_" prefix to keywords "libraries" and "vehicle"

As an effort to keep things specific to ardupilot API in the build system
consistent and easy way to identify.
This commit is contained in:
Gustavo Jose de Sousa 2016-07-25 17:31:08 -03:00 committed by Lucas De Marchi
parent 282817eeb9
commit f2dec971e7
7 changed files with 18 additions and 18 deletions

View File

@ -5,8 +5,8 @@ def build(bld):
vehicle = bld.path.name vehicle = bld.path.name
bld.ap_stlib( bld.ap_stlib(
name=vehicle + '_libs', name=vehicle + '_libs',
vehicle=vehicle, ap_vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [ ap_libraries=bld.ap_common_vehicle_libraries() + [
'APM_Control', 'APM_Control',
'AP_Arming', 'AP_Arming',
'AP_Camera', 'AP_Camera',

View File

@ -5,8 +5,8 @@ def build(bld):
vehicle = bld.path.name vehicle = bld.path.name
bld.ap_stlib( bld.ap_stlib(
name=vehicle + '_libs', name=vehicle + '_libs',
vehicle=vehicle, ap_vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [ ap_libraries=bld.ap_common_vehicle_libraries() + [
'AC_PID', 'AC_PID',
], ],
use='mavlink', use='mavlink',

View File

@ -5,8 +5,8 @@ def build(bld):
vehicle = bld.path.name vehicle = bld.path.name
bld.ap_stlib( bld.ap_stlib(
name=vehicle + '_libs', name=vehicle + '_libs',
vehicle=vehicle, ap_vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [ ap_libraries=bld.ap_common_vehicle_libraries() + [
'AP_ADSB', 'AP_ADSB',
'AC_AttitudeControl', 'AC_AttitudeControl',
'AC_InputManager', 'AC_InputManager',

View File

@ -5,8 +5,8 @@ def build(bld):
vehicle = bld.path.name vehicle = bld.path.name
bld.ap_stlib( bld.ap_stlib(
name=vehicle + '_libs', name=vehicle + '_libs',
vehicle=vehicle, ap_vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [ ap_libraries=bld.ap_common_vehicle_libraries() + [
'APM_Control', 'APM_Control',
'APM_OBC', 'APM_OBC',
'AP_ADSB', 'AP_ADSB',

View File

@ -11,8 +11,8 @@ def build(bld):
bld.ap_stlib( bld.ap_stlib(
name=vehicle + '_libs', name=vehicle + '_libs',
vehicle=vehicle, ap_vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [ ap_libraries=bld.ap_common_vehicle_libraries() + [
'AP_InertialNav', 'AP_InertialNav',
], ],
use='mavlink', use='mavlink',

View File

@ -166,13 +166,13 @@ def unique_list(items):
def ap_stlib(bld, **kw): def ap_stlib(bld, **kw):
if 'name' not in kw: if 'name' not in kw:
bld.fatal('Missing name for ap_stlib') bld.fatal('Missing name for ap_stlib')
if 'vehicle' not in kw: if 'ap_vehicle' not in kw:
bld.fatal('Missing vehicle for ap_stlib') bld.fatal('Missing ap_vehicle for ap_stlib')
if 'libraries' not in kw: if 'ap_libraries' not in kw:
bld.fatal('Missing libraries for ap_stlib') bld.fatal('Missing ap_libraries for ap_stlib')
sources = [] sources = []
libraries = unique_list(kw['libraries'] + bld.env.AP_LIBRARIES) libraries = unique_list(kw['ap_libraries'] + bld.env.AP_LIBRARIES)
for lib_name in libraries: for lib_name in libraries:
lib_node = bld.srcnode.find_dir('libraries/' + lib_name) lib_node = bld.srcnode.find_dir('libraries/' + lib_name)
@ -185,7 +185,7 @@ def ap_stlib(bld, **kw):
kw['features'] = kw.get('features', []) + bld.env.AP_STLIB_FEATURES kw['features'] = kw.get('features', []) + bld.env.AP_STLIB_FEATURES
kw['source'] = sources kw['source'] = sources
kw['target'] = kw['name'] kw['target'] = kw['name']
kw['defines'] = _get_legacy_defines(kw['vehicle']) kw['defines'] = _get_legacy_defines(kw['ap_vehicle'])
kw['idx'] = _get_next_idx() kw['idx'] = _get_next_idx()
bld.stlib(**kw) bld.stlib(**kw)

View File

@ -263,8 +263,8 @@ def _build_common_taskgens(bld):
# split into smaller pieces with well defined boundaries. # split into smaller pieces with well defined boundaries.
bld.ap_stlib( bld.ap_stlib(
name='ap', name='ap',
vehicle='UNKNOWN', ap_vehicle='UNKNOWN',
libraries=bld.ap_get_all_libraries(), ap_libraries=bld.ap_get_all_libraries(),
use='mavlink', use='mavlink',
) )