diff options
author | Nathan Binkert <nate@binkert.org> | 2009-01-19 09:59:13 -0800 |
---|---|---|
committer | Nathan Binkert <nate@binkert.org> | 2009-01-19 09:59:13 -0800 |
commit | f15f252d4e45f74a3b6e5ef0a7afacc656480792 (patch) | |
tree | 92445e959dbc707e290659ac9ccdd4782992fdf4 /src/python/m5/__init__.py | |
parent | 51d780fa4d84316bdd56a2d7cd405642e887c649 (diff) | |
download | gem5-f15f252d4e45f74a3b6e5ef0a7afacc656480792.tar.xz |
python: Rework how things are imported
Diffstat (limited to 'src/python/m5/__init__.py')
-rw-r--r-- | src/python/m5/__init__.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/python/m5/__init__.py b/src/python/m5/__init__.py index 7b071bccd..4151d1a13 100644 --- a/src/python/m5/__init__.py +++ b/src/python/m5/__init__.py @@ -77,18 +77,18 @@ env.update(os.environ) # importing *you*). try: import internal - running_m5 = True except ImportError: - running_m5 = False + internal = None -if running_m5: - import defines - build_env.update(defines.m5_build_env) -else: - import __scons - build_env.update(__scons.m5_build_env) +import defines +build_env.update(defines.buildEnv) + +if internal: + defines.compileDate = internal.core.compileDate + for k,v in internal.core.__dict__.iteritems(): + if k.startswith('flag_'): + setattr(defines, k[5:], v) -if running_m5: from event import * from simulate import * from main import options, main |