Fix review requests

- Shorten variable name
- Use comprehension to format include paths
pull/3585/head
Franz Schnyder 2017-01-05 18:17:46 +01:00 committed by Anna Bridge
parent 429e22757b
commit 16eaec27be
1 changed files with 2 additions and 2 deletions

View File

@ -14,14 +14,14 @@ class Eclipse(Makefile):
py_ocd_settings launch file, and software link .p2f file
"""
super(Eclipse, self).generate()
include_paths_replace_re= re.compile(r'(^[.]/|^[.]$)')
starting_dot = re.compile(r'(^[.]/|^[.]$)')
ctx = {
'name': self.project_name,
'elf_location': join('BUILD',self.project_name)+'.elf',
'c_symbols': self.toolchain.get_symbols(),
'asm_symbols': self.toolchain.get_symbols(True),
'target': self.target,
'include_paths': map(lambda s: include_paths_replace_re.sub('%s/' % self.project_name, s), self.resources.inc_dirs),
'include_paths': [starting_dot.sub('%s/' % self.project_name, inc) for inc in self.resources.inc_dirs],
'load_exe': str(self.LOAD_EXE).lower()
}