summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorNathan Binkert <nate@binkert.org>2007-07-26 23:15:49 -0700
committerNathan Binkert <nate@binkert.org>2007-07-26 23:15:49 -0700
commitf0fef8f850b0c5aa73337ca11b26169163b2b2e1 (patch)
treed49d3492618ee85717554cddbe62cba1b5e7fb9c /SConstruct
parent6b73ff43ff58502c80050c7aeff5a08a4ce61f87 (diff)
parentcda354b07035f73a3b220f89014721300d36a815 (diff)
downloadgem5-f0fef8f850b0c5aa73337ca11b26169163b2b2e1.tar.xz
Merge python and x86 changes with cache branch
--HG-- extra : convert_revision : e06a950964286604274fba81dcca362d75847233
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct15
1 files changed, 14 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index ec60964e4..a2760c4a4 100644
--- a/SConstruct
+++ b/SConstruct
@@ -435,6 +435,15 @@ all_isa_list.sort()
all_cpu_list.sort()
default_cpus.sort()
+def ExtraPathValidator(key, val, env):
+ if not val:
+ return
+ paths = val.split(':')
+ for path in paths:
+ path = os.path.expanduser(path)
+ if not isdir(path):
+ raise AttributeError, "Invalid path: '%s'" % path
+
sticky_opts.AddOptions(
EnumOption('TARGET_ISA', 'Target ISA', 'alpha', all_isa_list),
BoolOption('FULL_SYSTEM', 'Full-system support', False),
@@ -461,7 +470,9 @@ sticky_opts.AddOptions(
('BATCH_CMD', 'Batch pool submission command name', 'qdo'),
('PYTHONHOME',
'Override the default PYTHONHOME for this system (use with caution)',
- '%s:%s' % (sys.prefix, sys.exec_prefix))
+ '%s:%s' % (sys.prefix, sys.exec_prefix)),
+ ('EXTRAS', 'Add Extra directories to the compilation', '',
+ ExtraPathValidator)
)
nonsticky_opts.AddOptions(
@@ -613,6 +624,8 @@ base_env = env
for build_path in build_paths:
print "Building in", build_path
+ env['BUILDDIR'] = build_path
+
# build_dir is the tail component of build path, and is used to
# determine the build parameters (e.g., 'ALPHA_SE')
(build_root, build_dir) = os.path.split(build_path)