summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabe Black <gblack@eecs.umich.edu>2007-09-10 16:42:41 -0700
committerGabe Black <gblack@eecs.umich.edu>2007-09-10 16:42:41 -0700
commit87408d5ad27c7240d9169c0becd0cd01725c2a80 (patch)
tree029a198669ac8ef23eae25b10e53af718c509ca3
parent8f724a8b9679927503175a4a338ee77e285a0c5e (diff)
downloadgem5-87408d5ad27c7240d9169c0becd0cd01725c2a80.tar.xz
Fix for leaving EXTRAS blank
Apparently env['EXTRAS'] will return an empty string if not set. split will then split it into an empty string, and normalize will turn "" into ".". --HG-- extra : convert_revision : f79efebb129fdd65161fcf4d4582c2a8541aeacd
-rw-r--r--src/SConscript20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/SConscript b/src/SConscript
index a4bd55269..a2df88c06 100644
--- a/src/SConscript
+++ b/src/SConscript
@@ -163,15 +163,17 @@ for root, dirs, files in os.walk(srcdir, topdown=True):
base = root[len(srcdir) + 1:]
SConscript(joinpath(base, 'SConscript'))
-for extra in env['EXTRAS'].split(':'):
- extra = os.path.expanduser(extra)
- extra = os.path.normpath(extra)
- env.Append(CPPPATH=[Dir(extra)])
- for root, dirs, files in os.walk(extra, topdown=True):
- if 'SConscript' in files:
- subdir = root[len(os.path.dirname(extra))+1:]
- build_dir = joinpath(env['BUILDDIR'], subdir)
- SConscript(joinpath(root, 'SConscript'), build_dir=build_dir)
+extra_string = env['EXTRAS']
+if extra_string and extra_string != '' and not extra_string.isspace():
+ for extra in extra_string.split(':'):
+ extra = os.path.expanduser(extra)
+ extra = os.path.normpath(extra)
+ env.Append(CPPPATH=[Dir(extra)])
+ for root, dirs, files in os.walk(extra, topdown=True):
+ if 'SConscript' in files:
+ subdir = root[len(os.path.dirname(extra))+1:]
+ build_dir = joinpath(env['BUILDDIR'], subdir)
+ SConscript(joinpath(root, 'SConscript'), build_dir=build_dir)
for opt in env.ExportOptions:
env.ConfigFile(opt)