summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-07-26 22:13:48 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-07-26 22:13:48 -0700
commitd4e69c006b1ee59c1b8bb5120252bc83d1838dc6 (patch)
tree64dd59926f290061f5512841d35f120726b9b619 /SConstruct
parentd1e533a1e243b75b3257e2f96deb385a3b10e09b (diff)
parent19c01e82b113db636bbac34f77a0f5f4a7525088 (diff)
downloadgem5-d4e69c006b1ee59c1b8bb5120252bc83d1838dc6.tar.xz
Merge with head.
--HG-- extra : convert_revision : e4be9d5f2ce8e3252958e2c5e03710b0bf9755c7
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct13
1 files changed, 12 insertions, 1 deletions
diff --git a/SConstruct b/SConstruct
index ec60964e4..1f3dfb5bb 100644
--- a/SConstruct
+++ b/SConstruct
@@ -435,6 +435,13 @@ all_isa_list.sort()
all_cpu_list.sort()
default_cpus.sort()
+def ExtraPathValidator(key, val, env):
+ 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 +468,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 +622,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)