diff options
Diffstat (limited to 'src/SConscript')
-rw-r--r-- | src/SConscript | 20 |
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) |