It's apparently not widely known that our scons scripts allow you to
put the build directory wherever you want; not only does it not have
to be immediately under the root of your repo, it doesn't even have
to be underneath the root at all. (For example, sometimes it's useful
to build on a local disk if your repo is on a slow NFS mount.)
I point this out because this functionality has been broken for close
to two years but no one seems to have noticed yet. This patch fixes
an assumption that crept in in changeset
be0e1724eb39 (May 09 2014)
that the build dir would be immediately under the top level of the
repo, preventing builds anywhere else.
if 'all' in needed_envs:
needed_envs += target_types
-gem5_root = Dir('.').up().up().abspath
def makeEnvirons(target, source, env):
# cause any later Source() calls to be fatal, as a diagnostic.
Source.done()
# Set up the regression tests for each build.
for e in envList:
- SConscript(os.path.join(gem5_root, 'tests', 'SConscript'),
+ SConscript(os.path.join(env.root.abspath, 'tests', 'SConscript'),
variant_dir = variantd('tests', e.Label),
exports = { 'env' : e }, duplicate = False)