From 2e1ac0de8d800794f3e29cdd79b584b5a1ac4579 Mon Sep 17 00:00:00 2001 From: Gustavo Jose de Sousa Date: Mon, 25 Jul 2016 17:38:38 -0300 Subject: [PATCH] waf: make get_legacy_defines() "public" That function will be used by an upcoming separate tool. --- Tools/ardupilotwaf/ardupilotwaf.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Tools/ardupilotwaf/ardupilotwaf.py b/Tools/ardupilotwaf/ardupilotwaf.py index 5d321d0967..47531357e0 100644 --- a/Tools/ardupilotwaf/ardupilotwaf.py +++ b/Tools/ardupilotwaf/ardupilotwaf.py @@ -60,7 +60,7 @@ COMMON_VEHICLE_DEPENDENT_LIBRARIES = [ 'AP_ICEngine', ] -def _get_legacy_defines(sketch_name): +def get_legacy_defines(sketch_name): return [ 'APM_BUILD_DIRECTORY=APM_BUILD_' + sketch_name, 'SKETCH="' + sketch_name + '"', @@ -111,7 +111,7 @@ def ap_program(bld, program_name = bld.path.name if use_legacy_defines: - kw['defines'].extend(_get_legacy_defines(bld.path.name)) + kw['defines'].extend(get_legacy_defines(bld.path.name)) kw['cxxflags'] = kw.get('cxxflags', []) + ['-include', 'ap_config.h'] kw['features'] = kw.get('features', []) + bld.env.AP_PROGRAM_FEATURES @@ -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['ap_vehicle']) + kw['defines'] = get_legacy_defines(kw['ap_vehicle']) kw['idx'] = _get_next_idx() bld.stlib(**kw)