summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2018-07-29 14:12:42 (GMT)
committerMats Wichmann <mats@linux.com>2018-07-29 14:12:42 (GMT)
commit6166782fe90fc96a866424958fd6a632c76318f6 (patch)
treebece897501ae37a4c8112a8ca7f6d7d01ec73a6d /src/engine/SCons/Script
parent14daa07c0d95e1cd806e92911a74bde3ccf95b9f (diff)
downloadSCons-6166782fe90fc96a866424958fd6a632c76318f6.zip
SCons-6166782fe90fc96a866424958fd6a632c76318f6.tar.gz
SCons-6166782fe90fc96a866424958fd6a632c76318f6.tar.bz2
Add a docstring for SConscript()
Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine/SCons/Script')
-rw-r--r--src/engine/SCons/Script/SConscript.py26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py
index fb6ec0d..3b73010 100644
--- a/src/engine/SCons/Script/SConscript.py
+++ b/src/engine/SCons/Script/SConscript.py
@@ -543,6 +543,31 @@ class SConsEnvironment(SCons.Environment.Base):
raise SCons.Errors.UserError("Import of non-existent variable '%s'"%x)
def SConscript(self, *ls, **kw):
+ """Execute SCons configuration files.
+
+ Parameters:
+ *ls (str or list): configuration file(s) to execute.
+
+ Keyword arguments:
+ dirs (list): execute SConscript in each listed directory.
+ name (str): execute script 'name' (used with 'dirs').
+ exports (list or dict): locally export variables the script(s)
+ can import.
+ variant_dir (str): mirror sources needed for build to variant_dir
+ to allow building there.
+ duplicate (bool): pysically duplicate sources instead of just
+ adjusting paths of derived files (used only with 'variant_dir')
+ (default is True).
+ must_exist (bool): fail if a requested script is missing
+ (default is False, default is deprecated).
+
+ Returns:
+ variables returned by the called script
+
+ Raises:
+ UserError if a script is not found and such exceptions are enabled.
+ """
+
if 'build_dir' in kw:
msg = """The build_dir keyword has been deprecated; use the variant_dir keyword instead."""
SCons.Warnings.warn(SCons.Warnings.DeprecatedBuildDirWarning, msg)
@@ -568,7 +593,6 @@ class SConsEnvironment(SCons.Environment.Base):
files, exports = self._get_SConscript_filenames(ls, subst_kw)
subst_kw['exports'] = exports
-
return _SConscript(self.fs, *files, **subst_kw)
def SConscriptChdir(self, flag):