summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2009-02-09 20:10:14 -0800
committerNathan Binkert <nate@binkert.org>2009-02-09 20:10:14 -0800
commitdd6ea8797fdfbe00331a17ab3ffade10bbcbde1f (patch)
tree01f8abebf1a39a3ac7cfefde16dc935cada02966 /src
parent9e268ae63fe61c2365447d0df6baa351751cacb7 (diff)
downloadgem5-dd6ea8797fdfbe00331a17ab3ffade10bbcbde1f.tar.xz
scons: Require SCons version 0.98.1
This allows me to clean things up so we are up to date with respect to deprecated features. There are many features scheduled for permanent failure in scons 2.0 and 0.98.1 provides the most compatability for that. It also paves the way for some nice new features that I will add soon
Diffstat (limited to 'src')
-rw-r--r--src/SConscript29
-rw-r--r--src/arch/alpha/SConsopts2
2 files changed, 6 insertions, 25 deletions
diff --git a/src/SConscript b/src/SConscript
index 894a08df9..c02bf239d 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -48,7 +48,7 @@ Import('*')
# Children need to see the environment
Export('env')
-build_env = dict([(opt, env[opt]) for opt in env.ExportOptions])
+build_env = dict([(opt, env[opt]) for opt in env.ExportVariables])
def sort_list(_list):
"""return a sorted copy of '_list'"""
@@ -242,7 +242,7 @@ for extra_dir in extras_dir_list:
build_dir = joinpath(env['BUILDDIR'], root[prefix_len:])
SConscript(joinpath(root, 'SConscript'), build_dir=build_dir)
-for opt in env.ExportOptions:
+for opt in env.ExportVariables:
env.ConfigFile(opt)
########################################################################
@@ -353,25 +353,6 @@ depends = [ File(py_modules[dep]) for dep in module_depends ]
# Commands for the basic automatically generated python files
#
-scons_dir = str(SCons.Node.FS.default_fs.SConstruct_dir)
-
-hg_info = "Unknown"
-hg_demandimport = False
-try:
- if not exists(scons_dir) or not isdir(scons_dir) or \
- not exists(joinpath(scons_dir, ".hg")):
- raise ValueError(".hg directory not found")
- import subprocess
- output = subprocess.Popen("hg id -n -i -t -b".split(),
- stdout=subprocess.PIPE).communicate()[0]
- hg_info = output.strip()
-except ImportError, e:
- print "Mercurial not found"
-except ValueError, e:
- print e
-except Exception, e:
- print "Other mercurial exception: %s" % e
-
# Generate Python file containing a dict specifying the current
# build_env flags.
def makeDefinesPyFile(target, source, env):
@@ -381,7 +362,7 @@ def makeDefinesPyFile(target, source, env):
print >>f, "hgRev = '%s'" % hg_info
f.close()
-defines_info = [ Value(build_env), Value(hg_info) ]
+defines_info = [ Value(build_env), Value(env['HG_INFO']) ]
# Generate a file with all of the compile options in it
env.Command('python/m5/defines.py', defines_info, makeDefinesPyFile)
PySource('m5', 'python/m5/defines.py')
@@ -970,11 +951,11 @@ def makeEnv(label, objsfx, strip = False, **kwargs):
libname = 'm5_' + label
exename = 'm5.' + label
- new_env = env.Copy(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
+ new_env = env.Clone(OBJSUFFIX=objsfx, SHOBJSUFFIX=objsfx + 's')
new_env.Label = label
new_env.Append(**kwargs)
- swig_env = new_env.Copy()
+ swig_env = new_env.Clone()
if env['GCC']:
swig_env.Append(CCFLAGS='-Wno-uninitialized')
swig_env.Append(CCFLAGS='-Wno-sign-compare')
diff --git a/src/arch/alpha/SConsopts b/src/arch/alpha/SConsopts
index 633eeb06f..b418e27c8 100644
--- a/src/arch/alpha/SConsopts
+++ b/src/arch/alpha/SConsopts
@@ -33,5 +33,5 @@ Import('*')
all_isa_list.append('alpha')
# Alpha can be compiled with Turbolaser support instead of Tsunami
-sticky_opts.Add(BoolOption('ALPHA_TLASER',
+sticky_vars.Add(BoolVariable('ALPHA_TLASER',
'Model Alpha TurboLaser platform (vs. Tsunami)', False))