diff options
author | Chris Johns <chrisj@rtems.org> | 2017-10-27 17:22:12 +1100 |
---|---|---|
committer | Chris Johns <chrisj@rtems.org> | 2017-10-27 17:26:26 +1100 |
commit | 9b54dd8e185291f6656fca3f38da1c38947c8dd6 (patch) | |
tree | 8d47737b24f29214a156ffc483fc5bca28d565c9 | |
parent | RSB - Add support for RISC-V RV64 (64-bit) toolchain v2 (diff) | |
download | rtems-source-builder-9b54dd8e185291f6656fca3f38da1c38947c8dd6.tar.bz2 |
sb: Add a defined check.
Updates #3210.
-rw-r--r-- | source-builder/sb/macros.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/source-builder/sb/macros.py b/source-builder/sb/macros.py index 2af8d36..28a52b2 100644 --- a/source-builder/sb/macros.py +++ b/source-builder/sb/macros.py @@ -447,6 +447,9 @@ class macros: if key in self.macros[map]: del self.macros[map][key] + def defined(self, key, globals = True, maps = None): + return self.get(key, globals, maps) is not None + def expand(self, _str): """Simple basic expander of config file macros.""" expanded = True |