summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-02-21 14:55:50 (GMT)
committerSteven Knight <knight@baldmt.com>2003-02-21 14:55:50 (GMT)
commitdbe12389b6253c305749d8e2d4e1558477a15787 (patch)
tree01b3f95492320b80b57f4c86d23ffe629d290a58 /src/engine/SCons/Script
parent6496b8580990a6efadaeeaf65c25ee7d5964c7a1 (diff)
downloadSCons-dbe12389b6253c305749d8e2d4e1558477a15787.zip
SCons-dbe12389b6253c305749d8e2d4e1558477a15787.tar.gz
SCons-dbe12389b6253c305749d8e2d4e1558477a15787.tar.bz2
Support fetching SConscript files from source code management systems.
Diffstat (limited to 'src/engine/SCons/Script')
-rw-r--r--src/engine/SCons/Script/SConscript.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index f2d07fd..4c54879 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -186,8 +186,21 @@ def SConscript(*ls, **kw):
f = fn
else:
f = SCons.Node.FS.default_fs.File(str(fn))
+ _file_ = None
if f.rexists():
_file_ = open(f.rstr(), "r")
+ elif f.has_builder():
+ # The SConscript file apparently exists in a source
+ # code management system. Build it, but then remove
+ # the builder so that it doesn't get built *again*
+ # during the actual build phase.
+ f.build()
+ f.builder_set(None)
+ s = str(f)
+ if os.path.exists(s):
+ _file_ = open(s, "r")
+
+ if _file_:
SCons.Node.FS.default_fs.chdir(f.dir)
if sconscript_chdir:
old_dir = os.getcwd()