diff options
author | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-17 07:05:27 -0400 |
---|---|---|
committer | Steve Reinhardt <stever@eecs.umich.edu> | 2006-05-17 07:05:27 -0400 |
commit | 343bff3b7dadfe9f6e6062610a086dea0783722a (patch) | |
tree | 492343f7bebb25b8aabcfa7f820e157db9f158f3 | |
parent | aaf1969c7845adbd6e25d5863b0a52d9f14cc71d (diff) | |
download | gem5-343bff3b7dadfe9f6e6062610a086dea0783722a.tar.xz |
Backport ISA scanner fix from newmem to work with
scons 0.96.9* versions.
arch/SConscript:
Backport ISA scanner fix from newmem.
--HG--
extra : convert_revision : 96be75660f85900fd26badef36fb4109b36d8394
-rw-r--r-- | arch/SConscript | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/arch/SConscript b/arch/SConscript index 0533261a2..92547c0ae 100644 --- a/arch/SConscript +++ b/arch/SConscript @@ -96,18 +96,12 @@ for hdr in isa_switch_hdrs: # import SCons.Scanner -def ISAScan(): - return SCons.Scanner.Classic("ISAScan", - "$ISASUFFIXES", - "SRCDIR", - '^[ \t]*##[ \t]*include[ \t]*"([^>"]+)"') +isa_scanner = SCons.Scanner.Classic("ISAScan", + [".isa", ".ISA"], + "SRCDIR", + r'^\s*##include\s+"([\w/.-]*)"') -def ISAPath(env, dir, target=None, source=None, a=None): - return (Dir(env['SRCDIR']), Dir('.')) - -iscan = Scanner(function = ISAScan().scan, skeys = [".isa", ".ISA"], - path_function = ISAPath) -env.Append(SCANNERS = iscan) +env.Append(SCANNERS = isa_scanner) # # Now create a Builder object that uses isa_parser.py to generate C++ @@ -134,8 +128,7 @@ def isa_desc_emitter(target, source, env): return (isa_desc_gen_files, [isa_parser, cpu_models_file] + source) # Pieces are in place, so create the builder. -isa_desc_builder = Builder(action='$SOURCES $TARGET.dir $CPU_MODELS', - source_scanner = iscan, +isa_desc_builder = Builder(action='python $SOURCES $TARGET.dir $CPU_MODELS', emitter = isa_desc_emitter) env.Append(BUILDERS = { 'ISADesc' : isa_desc_builder }) |