diff options
author | Nathan Binkert <binkertn@umich.edu> | 2007-03-26 21:07:32 -0700 |
---|---|---|
committer | Nathan Binkert <binkertn@umich.edu> | 2007-03-26 21:07:32 -0700 |
commit | d8ca2d3b16d998eaf68bae0235740278aa27c5d5 (patch) | |
tree | 398c594c84f646cf90ef44e57a6cfb3541feec2a /src/base/SConscript | |
parent | 01ac962a06ba0a668d35218e3d97f154a11012c3 (diff) | |
download | gem5-d8ca2d3b16d998eaf68bae0235740278aa27c5d5.tar.xz |
Instead of creating a new python process to run traceflags.py,
just directly exec the file and generate the flags
--HG--
extra : convert_revision : d648ca7348404ded5337db327adafccbd2ae40c8
Diffstat (limited to 'src/base/SConscript')
-rw-r--r-- | src/base/SConscript | 24 |
1 files changed, 20 insertions, 4 deletions
diff --git a/src/base/SConscript b/src/base/SConscript index 788aa3e6f..6fc140145 100644 --- a/src/base/SConscript +++ b/src/base/SConscript @@ -30,10 +30,26 @@ Import('*') -# base/traceflags.{cc,hh} are generated from base/traceflags.py. -# $TARGET.base will expand to "<build-dir>/base/traceflags". -env.Command(['traceflags.hh', 'traceflags.cc'], 'traceflags.py', - 'python $SOURCE $TARGET.base') +def make_cc(target, source, env): + assert(len(source) == 1) + assert(len(target) == 1) + + traceflags = {} + execfile(str(source[0]), traceflags) + func = traceflags['gen_cc'] + func(str(target[0])) + +def make_hh(target, source, env): + assert(len(source) == 1) + assert(len(target) == 1) + + traceflags = {} + execfile(str(source[0]), traceflags) + func = traceflags['gen_hh'] + func(str(target[0])) + +env.Command('traceflags.hh', 'traceflags.py', make_hh) +env.Command('traceflags.cc', 'traceflags.py', make_cc) Source('annotate.cc') Source('bigint.cc') |