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
This commit is contained in:
Gabe Black 2007-09-10 16:42:41 -07:00
parent 8f724a8b96
commit 87408d5ad2

View file

@ -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)