waf: make AP_NavEKF3_core.h a vehicle dependent include

This commit is contained in:
Andrew Tridgell 2021-01-19 12:53:39 +11:00
parent ad2ab333f9
commit 3c825bdffc

View File

@ -51,8 +51,10 @@ def _vehicle_index(vehicle):
_vehicle_indexes[vehicle] = len(_vehicle_indexes) + 1 _vehicle_indexes[vehicle] = len(_vehicle_indexes) + 1
return _vehicle_indexes[vehicle] return _vehicle_indexes[vehicle]
_vehicle_macros = ('SKETCHNAME', 'SKETCH', 'APM_BUILD_DIRECTORY', # note that AP_NavEKF3_core.h is needed for AP_NavEKF3_feature.h
'APM_BUILD_TYPE') _vehicle_macros = ['SKETCHNAME', 'SKETCH', 'APM_BUILD_DIRECTORY',
'APM_BUILD_TYPE',
'AP_NavEKF3_core.h']
_macros_re = re.compile(r'\b(%s)\b' % '|'.join(_vehicle_macros)) _macros_re = re.compile(r'\b(%s)\b' % '|'.join(_vehicle_macros))
def _remove_comments(s): def _remove_comments(s):
@ -159,6 +161,7 @@ class ap_library_check_headers(Task.Task):
'libraries/AP_Camera/AP_RunCam.h', 'libraries/AP_Camera/AP_RunCam.h',
'libraries/AP_Common/AP_FWVersionDefine.h', 'libraries/AP_Common/AP_FWVersionDefine.h',
'libraries/AP_Scripting/lua_generated_bindings.h', 'libraries/AP_Scripting/lua_generated_bindings.h',
'libraries/AP_NavEKF3/AP_NavEKF3_feature.h',
) )
whitelist = tuple(os.path.join(*p.split('/')) for p in whitelist) whitelist = tuple(os.path.join(*p.split('/')) for p in whitelist)