summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemko Tronçon <git@el-tramo.be>2011-07-10 09:05:25 (GMT)
committerRemko Tronçon <git@el-tramo.be>2011-07-10 09:05:25 (GMT)
commitbdec51e576b5a3afcca5a0b62f4567e1dc17bbcf (patch)
tree611df186f85ed0f3ce9c3b23f1d63630a47a33f6 /BuildTools/SCons
parent72da8e8226545d77ede51f575deef84395ba392f (diff)
downloadswift-bdec51e576b5a3afcca5a0b62f4567e1dc17bbcf.zip
swift-bdec51e576b5a3afcca5a0b62f4567e1dc17bbcf.tar.bz2
Make SConscript files more robust against variant dirs.
Diffstat (limited to 'BuildTools/SCons')
-rw-r--r--BuildTools/SCons/SConstruct6
1 files changed, 4 insertions, 2 deletions
diff --git a/BuildTools/SCons/SConstruct b/BuildTools/SCons/SConstruct
index a5f9de4..debea3b 100644
--- a/BuildTools/SCons/SConstruct
+++ b/BuildTools/SCons/SConstruct
@@ -1,5 +1,7 @@
+root = Dir("../..").abspath
+
import sys, os, re, platform
-sys.path.append(Dir("BuildTools/SCons").abspath)
+sys.path.append(Dir("#/BuildTools/SCons").abspath)
import SCons.SConf
################################################################################
@@ -743,7 +745,7 @@ for dir in os.listdir(Dir("#").abspath) :
env["PROJECTS"] = [m for m in modules if m not in ["Documentation", "QA", "SwifTools"] and not m.startswith("3rdParty")]
for stage in ["flags", "build", "test"] :
env["SCONS_STAGE"] = stage
- SConscript(dirs = map(lambda x : "#/" + x, modules))
+ SConscript(dirs = map(lambda x : root + "/" + x, modules))
# SLOCCount
if ARGUMENTS.get("sloccount", False) :