From a058ab98a45503e22af7067fc4b1f35d7ed05037 Mon Sep 17 00:00:00 2001 From: Martin Kojtal Date: Wed, 6 Apr 2016 19:02:25 +0100 Subject: [PATCH] Tools - project options.macros None fix Handle when options.macros is None, which results in Traceback --- tools/project.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/project.py b/tools/project.py index ca20e755dd..c7d44f0447 100644 --- a/tools/project.py +++ b/tools/project.py @@ -145,7 +145,9 @@ if __name__ == '__main__': project_dir = options.source_dir project_name = basename(project_dir) project_temp = project_dir - lib_symbols = [] + options.macros + lib_symbols = [] + if options.macros: + lib_symbols += options.macros zip = False # don't create zip clean = False # don't cleanup because we use the actual source tree to generate IDE files else: @@ -179,7 +181,9 @@ if __name__ == '__main__': # Some libraries have extra macros (called by exporter symbols) to we need to pass # them to maintain compilation macros integrity between compiled library and # header files we might use with it - lib_symbols = [] + options.macros + lib_symbols = [] + if options.macros: + lib_symbols += options.macros for lib in LIBRARIES: if lib['build_dir'] in test.dependencies: lib_macros = lib.get('macros', None)