diff options
author | José Fonseca <jfonseca@vmware.com> | 2012-08-14 12:18:45 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2012-08-14 12:19:56 +0100 |
commit | ea8dcfc90d5abbf699cd64be4dccd1e69fe82d75 (patch) | |
tree | b455ea19ab8b015cf925605da801f8cf11886b0f /scons/source_list.py | |
parent | 605f964d5cc7016fc74e0563829fa794da845c20 (diff) |
scons: Populate top_srcdir and top_builddir variables when reading Makefiles.sources.
This is not entirely correct, as scons doesn't put binaries in a
"src" subdirectory, but doesn't seem to be a problem for now.
Diffstat (limited to 'scons/source_list.py')
-rw-r--r-- | scons/source_list.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/scons/source_list.py b/scons/source_list.py index 8111f43184..e16d1f9b6d 100644 --- a/scons/source_list.py +++ b/scons/source_list.py @@ -13,6 +13,7 @@ The goal is to allow Makefile's and SConscript's to share source listing. class SourceListParser(object): def __init__(self): + self.symbol_table = {} self._reset() def _reset(self, filename=None): @@ -20,7 +21,6 @@ class SourceListParser(object): self.line_no = 1 self.line_cont = '' - self.symbol_table = {} def _error(self, msg): raise RuntimeError('%s:%d: %s' % (self.filename, self.line_no, msg)) @@ -125,3 +125,6 @@ class SourceListParser(object): raise return self.symbol_table + + def add_symbol(self, name, value): + self.symbol_table[name] = value |