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
bld.ap_stlib(
name=vehicle + '_libs',
vehicle=vehicle,
libraries=bld.ap_common_vehicle_libraries() + [
ap_vehicle=vehicle,
ap_libraries=bld.ap_common_vehicle_libraries() + [
'APM_Control',
'AP_Arming',
'AP_Camera',

View File

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

View File

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

View File

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

View File

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

View File

@ -166,13 +166,13 @@ def unique_list(items):
def ap_stlib(bld, **kw):
if 'name' not in kw:
bld.fatal('Missing name for ap_stlib')
if 'vehicle' not in kw:
bld.fatal('Missing vehicle for ap_stlib')
if 'libraries' not in kw:
bld.fatal('Missing libraries for ap_stlib')
if 'ap_vehicle' not in kw:
bld.fatal('Missing ap_vehicle for ap_stlib')
if 'ap_libraries' not in kw:
bld.fatal('Missing ap_libraries for ap_stlib')
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:
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['source'] = sources
kw['target'] = kw['name']
kw['defines'] = _get_legacy_defines(kw['vehicle'])
kw['defines'] = _get_legacy_defines(kw['ap_vehicle'])
kw['idx'] = _get_next_idx()
bld.stlib(**kw)

View File

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