summaryrefslogtreecommitdiff
path: root/src/SConscript
diff options
context:
space:
mode:
authorBrad Danofsky <bradley.danofsky@amd.com>2011-04-20 11:14:51 -0700
committerBrad Danofsky <bradley.danofsky@amd.com>2011-04-20 11:14:51 -0700
commitdd38b4b83e6c8bf7a9031dfeead13a5ef354f46c (patch)
treecc3c1616099e833f3c27bf70f010338908067d9b /src/SConscript
parent8c1563096c5aaf4123bf9ce5116aff3ce44dfd3b (diff)
downloadgem5-dd38b4b83e6c8bf7a9031dfeead13a5ef354f46c.tar.xz
scons: Allow the build directory live under an EXTRAS directory
Diffstat (limited to 'src/SConscript')
-rwxr-xr-xsrc/SConscript4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/SConscript b/src/SConscript
index 7982eaeb4..fcae475cf 100755
--- a/src/SConscript
+++ b/src/SConscript
@@ -320,6 +320,10 @@ for root, dirs, files in os.walk(base_dir, topdown=True):
for extra_dir in extras_dir_list:
prefix_len = len(dirname(extra_dir)) + 1
for root, dirs, files in os.walk(extra_dir, topdown=True):
+ # if build lives in the extras directory, don't walk down it
+ if 'build' in dirs:
+ dirs.remove('build')
+
if 'SConscript' in files:
build_dir = joinpath(env['BUILDDIR'], root[prefix_len:])
SConscript(joinpath(root, 'SConscript'), variant_dir=build_dir)