summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-06-10 14:48:53 (GMT)
committerSteven Knight <knight@baldmt.com>2003-06-10 14:48:53 (GMT)
commit19a3c78db2cdd47cc38df41c014c30072c1ac461 (patch)
tree0062bbecd0c31906eff05c339458537df9ac7a29 /src/engine/SCons
parente2386c6ee94cca68e90eb9faee33b7f4d425b39f (diff)
downloadSCons-19a3c78db2cdd47cc38df41c014c30072c1ac461.zip
SCons-19a3c78db2cdd47cc38df41c014c30072c1ac461.tar.gz
SCons-19a3c78db2cdd47cc38df41c014c30072c1ac461.tar.bz2
Fix use of SConf with SConscriptChdir(). (David Snopek, Christoph Wiedemann)
Diffstat (limited to 'src/engine/SCons')
-rw-r--r--src/engine/SCons/SConf.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py
index 1546fb1..d01ce7e 100644
--- a/src/engine/SCons/SConf.py
+++ b/src/engine/SCons/SConf.py
@@ -163,6 +163,11 @@ class SConf:
sys.stdout = self.logstream
oldStderr = sys.stderr
sys.stderr = self.logstream
+
+ # the engine assumes the current path is the SConstruct directory ...
+ oldcwd = os.getcwd()
+ os.chdir(SConfFS.pathTop)
+
self._setCache( nodes )
ret = 1
@@ -190,6 +195,7 @@ class SConf:
# the node could not be built. we return 0 in this case
ret = 0
finally:
+ os.chdir(oldcwd)
if self.logstream != None:
# restore stdout / stderr
sys.stdout = oldStdout