mirror of https://github.com/ARMmbed/mbed-os.git
Move filter dot into exporter base class
parent
062164eaad
commit
b60729d147
|
@ -259,6 +259,20 @@ class Exporter(object):
|
||||||
def all_supported_targets(cls):
|
def all_supported_targets(cls):
|
||||||
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)]
|
return [t for t in TARGET_MAP.keys() if cls.is_target_supported(t)]
|
||||||
|
|
||||||
|
@staticmethod
|
||||||
|
def filter_dot(str):
|
||||||
|
"""
|
||||||
|
Remove the './' or '.\\' prefix, if present.
|
||||||
|
"""
|
||||||
|
if str == None:
|
||||||
|
return None
|
||||||
|
if str[:2] == './':
|
||||||
|
return str[2:]
|
||||||
|
if str[:2] == '.\\':
|
||||||
|
return str[2:]
|
||||||
|
return str
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def apply_supported_whitelist(compiler, whitelist, target):
|
def apply_supported_whitelist(compiler, whitelist, target):
|
||||||
"""Generate a list of supported targets for a given compiler and post-binary hook
|
"""Generate a list of supported targets for a given compiler and post-binary hook
|
||||||
|
|
|
@ -417,21 +417,6 @@ class GNUARMEclipse(Exporter):
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
# -------------------------------------------------------------------------
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def filter_dot(str):
|
|
||||||
"""
|
|
||||||
Remove the './' prefix, if present.
|
|
||||||
This function assumes that resources.win_to_unix()
|
|
||||||
replaced all windows backslashes with slashes.
|
|
||||||
"""
|
|
||||||
if str == None:
|
|
||||||
return None
|
|
||||||
if str[:2] == './':
|
|
||||||
return str[2:]
|
|
||||||
return str
|
|
||||||
|
|
||||||
# -------------------------------------------------------------------------
|
|
||||||
|
|
||||||
def dump_tree(self, nodes, depth=0):
|
def dump_tree(self, nodes, depth=0):
|
||||||
for k in nodes.keys():
|
for k in nodes.keys():
|
||||||
node = nodes[k]
|
node = nodes[k]
|
||||||
|
|
Loading…
Reference in New Issue