Skip to content

Commit

Permalink
Introduce FEATURE_ keyword which behaves like TARGET_ but is generate…
Browse files Browse the repository at this point in the history
…d from targets features (see targets.json)
  • Loading branch information
screamerbg committed Jun 9, 2016
1 parent 7d583e5 commit e7c3c88
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions workspace_tools/toolchains/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ def get_symbols(self):
# Target and Toolchain symbols
labels = self.get_labels()
self.symbols = ["TARGET_%s" % t for t in labels['TARGET']]
self.symbols.extend(["FEATURE_%s" % t for t in labels['FEATURE']])
self.symbols.extend(["TOOLCHAIN_%s" % t for t in labels['TOOLCHAIN']])

# Config support
Expand Down Expand Up @@ -314,6 +315,7 @@ def get_labels(self):
toolchain_labels.remove('mbedToolchain')
self.labels = {
'TARGET': self.target.get_labels(),
'FEATURE': self.target.features,
'TOOLCHAIN': toolchain_labels
}
return self.labels
Expand Down Expand Up @@ -364,6 +366,7 @@ def scan_resources(self, path):

if ((d.startswith('.') or d in self.legacy_ignore_dirs) or
(d.startswith('TARGET_') and d[7:] not in labels['TARGET']) or
(d.startswith('FEATURE_') and d[8:] not in labels['FEATURE']) or
(d.startswith('TOOLCHAIN_') and d[10:] not in labels['TOOLCHAIN'])):
dirs.remove(d)

Expand Down

0 comments on commit e7c3c88

Please sign in to comment.