mirror of https://github.com/ARMmbed/mbed-os.git
prepend VPATH to preinclude and don't escape asm macros
parent
675ca1a698
commit
e439b85de1
|
@ -126,8 +126,15 @@ class Makefile(Exporter):
|
||||||
ctx.update(self.format_flags())
|
ctx.update(self.format_flags())
|
||||||
|
|
||||||
# Add the virtual path the the include option in the ASM flags
|
# Add the virtual path the the include option in the ASM flags
|
||||||
ctx['asm_flags'] = map(lambda item: "-I" + ctx['vpath'][0] + "/" + item[2:]
|
new_asm_flags = []
|
||||||
if item.startswith('-I') else item, ctx['asm_flags'])
|
for flag in ctx['asm_flags']:
|
||||||
|
if flag.startswith('-I'):
|
||||||
|
new_asm_flags.append("-I{}/{}".format(ctx['vpath'][0], flag[2:]))
|
||||||
|
elif flag.startswith('--preinclude='):
|
||||||
|
new_asm_flags.append("--preinclude={}/{}".format(ctx['vpath'][0], flag[13:]))
|
||||||
|
else:
|
||||||
|
new_asm_flags.append(flag)
|
||||||
|
ctx['asm_flags'] = new_asm_flags
|
||||||
|
|
||||||
for templatefile in \
|
for templatefile in \
|
||||||
['makefile/%s_%s.tmpl' % (self.TEMPLATE,
|
['makefile/%s_%s.tmpl' % (self.TEMPLATE,
|
||||||
|
@ -148,7 +155,7 @@ class Makefile(Exporter):
|
||||||
"""Format toolchain flags for Makefile"""
|
"""Format toolchain flags for Makefile"""
|
||||||
flags = {}
|
flags = {}
|
||||||
for k, v in self.flags.items():
|
for k, v in self.flags.items():
|
||||||
if k in ['asm_flags', 'c_flags', 'cxx_flags']:
|
if k in ['c_flags', 'cxx_flags']:
|
||||||
flags[k] = map(lambda x: x.replace('"', '\\"'), v)
|
flags[k] = map(lambda x: x.replace('"', '\\"'), v)
|
||||||
else:
|
else:
|
||||||
flags[k] = v
|
flags[k] = v
|
||||||
|
|
Loading…
Reference in New Issue