diff options
author | Jason Power <power.jg@gmail.com> | 2012-09-12 14:52:04 -0500 |
---|---|---|
committer | Jason Power <power.jg@gmail.com> | 2012-09-12 14:52:04 -0500 |
commit | aa8bcd15ec1ba916f3e750f41697a65e06b3c2ac (patch) | |
tree | ef66477d4b1904699ab751a841ff465768ab158e /src/mem/slicc/symbols/SymbolTable.py | |
parent | c6927ed13868c096a60df6a217f92857799b5be6 (diff) | |
download | gem5-aa8bcd15ec1ba916f3e750f41697a65e06b3c2ac.tar.xz |
Ruby: Modify Scons so that we can put .sm files in extras
Also allows for header files which are required in slicc generated
code to be in a directory other than src/mem/ruby/slicc_interface.
Diffstat (limited to 'src/mem/slicc/symbols/SymbolTable.py')
-rw-r--r-- | src/mem/slicc/symbols/SymbolTable.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mem/slicc/symbols/SymbolTable.py b/src/mem/slicc/symbols/SymbolTable.py index 81d0768f9..d2c9337f1 100644 --- a/src/mem/slicc/symbols/SymbolTable.py +++ b/src/mem/slicc/symbols/SymbolTable.py @@ -124,15 +124,15 @@ class SymbolTable(object): if isinstance(symbol, type): yield symbol - def writeCodeFiles(self, path): + def writeCodeFiles(self, path, includes): makeDir(path) code = self.codeFormatter() - code(''' -/** Auto generated C++ code started by $__file__:$__line__ */ + code('/** Auto generated C++ code started by $__file__:$__line__ */') + + for include_path in includes: + code('#include "${{include_path}}"') -#include "mem/ruby/slicc_interface/RubySlicc_includes.hh" -''') for symbol in self.sym_vec: if isinstance(symbol, Type) and not symbol.isPrimitive: code('#include "mem/protocol/${{symbol.c_ident}}.hh"') @@ -140,7 +140,7 @@ class SymbolTable(object): code.write(path, "Types.hh") for symbol in self.sym_vec: - symbol.writeCodeFiles(path) + symbol.writeCodeFiles(path, includes) def writeHTMLFiles(self, path): makeDir(path) |