Tools - project options.macros None fix

Handle when options.macros is None, which results in Traceback
Martin Kojtal 2016-04-06 19:02:25 +01:00
parent a215fe48fd
commit a058ab98a4
1 changed files with 6 additions and 2 deletions

View File

@ -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)