summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/SConf.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2005-01-08 20:20:03 (GMT)
committerSteven Knight <knight@baldmt.com>2005-01-08 20:20:03 (GMT)
commit3c23f9969cea7931a8dea998a33b15ab51fe1a5f (patch)
treee473a43695378989d20058ce69b0c0b7d855a712 /src/engine/SCons/SConf.py
parenta30529bf7d9361a44490126666d0cc71d98410aa (diff)
downloadSCons-3c23f9969cea7931a8dea998a33b15ab51fe1a5f.zip
SCons-3c23f9969cea7931a8dea998a33b15ab51fe1a5f.tar.gz
SCons-3c23f9969cea7931a8dea998a33b15ab51fe1a5f.tar.bz2
Remove build engine dependencies on SCons.Script. Fix a misspelled variable name.
Diffstat (limited to 'src/engine/SCons/SConf.py')
-rw-r--r--src/engine/SCons/SConf.py12
1 files changed, 3 insertions, 9 deletions
diff --git a/src/engine/SCons/SConf.py b/src/engine/SCons/SConf.py
index 76df30a..6b96384 100644
--- a/src/engine/SCons/SConf.py
+++ b/src/engine/SCons/SConf.py
@@ -326,17 +326,13 @@ class SConf:
"""
def __init__(self, env, custom_tests = {}, conf_dir='#/.sconf_temp',
- log_file='#/config.log', config_h = None,
- called_from_env_method = 0):
+ log_file='#/config.log', config_h = None, _depth = 0):
"""Constructor. Pass additional tests in the custom_tests-dictinary,
e.g. custom_tests={'CheckPrivate':MyPrivateTest}, where MyPrivateTest
defines a custom test.
Note also the conf_dir and log_file arguments (you may want to
build tests in the BuildDir, not in the SourceDir)
"""
- import SCons.Script.SConscript
- if not SCons.Script.SConscript.sconscript_reading:
- raise SCons.Errors.UserError, "Calling Configure from Builders is not supported."
global SConfFS
if not SConfFS:
SConfFS = SCons.Node.FS.FS(SCons.Node.FS.default_fs.pathTop)
@@ -350,7 +346,7 @@ class SConf:
self.logfile = None
self.logstream = None
self.lastTarget = None
- self.called_from_env_method = called_from_env_method
+ self.depth = _depth
self.cached = 0 # will be set, if all test results are cached
# add default tests
@@ -603,7 +599,7 @@ class SConf:
# existing file with the same name in the source directory
self.logfile.dir.add_ignore( [self.logfile] )
- tb = traceback.extract_stack()[-3-self.called_from_env_method]
+ tb = traceback.extract_stack()[-3-self.depth]
old_fs_dir = SConfFS.getcwd()
SConfFS.chdir(SConfFS.Top, change_os_dir=0)
self.logstream.write('file %s,line %d:\n\tConfigure(confdir = %s)\n' %
@@ -870,5 +866,3 @@ def CheckLibWithHeader(context, libs, header, language,
call = call, language = language, autoadd = autoadd)
context.did_show_result = 1
return not res
-
-