summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Script/SConscript.xml
diff options
context:
space:
mode:
authorMats Wichmann <mats@linux.com>2018-07-28 16:04:35 (GMT)
committerMats Wichmann <mats@linux.com>2018-07-28 16:04:35 (GMT)
commit14daa07c0d95e1cd806e92911a74bde3ccf95b9f (patch)
treea6717d6a95ba4add454c78327f01e8204620f9fa /src/engine/SCons/Script/SConscript.xml
parent9ec0b9861951cc72de39c742c1162a84696ce91f (diff)
downloadSCons-14daa07c0d95e1cd806e92911a74bde3ccf95b9f.zip
SCons-14daa07c0d95e1cd806e92911a74bde3ccf95b9f.tar.gz
SCons-14daa07c0d95e1cd806e92911a74bde3ccf95b9f.tar.bz2
Add tests for SConscript(must_warn) option
Testcases added to confirm the behavior of: first attempt to call a non-existent script gives a deprecation warning, additional ones give plain warning; True/False values for must_warn behave as expected; if scons default is changed to exception the call fails but if must_warn=False it still works. Tweaked the logic to actually get that last bit to work. Also minor doc update. Signed-off-by: Mats Wichmann <mats@linux.com>
Diffstat (limited to 'src/engine/SCons/Script/SConscript.xml')
-rw-r--r--src/engine/SCons/Script/SConscript.xml13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/engine/SCons/Script/SConscript.xml b/src/engine/SCons/Script/SConscript.xml
index 29a89c2..a6258c4 100644
--- a/src/engine/SCons/Script/SConscript.xml
+++ b/src/engine/SCons/Script/SConscript.xml
@@ -357,12 +357,12 @@ Return('val1 val2')
<scons_function name="SConscript">
<arguments>
-(scripts, [exports, variant_dir, duplicate, must_exist=flag])
-<!-- (scripts, [exports, variant_dir, src_dir, duplicate, must_exist=flag]) -->
+(scripts, [exports, variant_dir, duplicate, must_exist])
+<!-- (scripts, [exports, variant_dir, src_dir, duplicate, must_exist]) -->
</arguments>
<arguments>
-(dirs=subdirs, [name=script, exports, variant_dir, duplicate, must_exist=flag])
-<!-- (dirs=subdirs, [name=script, exports, variant_dir, src_dir, duplicate, must_exist=flag]) -->
+(dirs=subdirs, [name=script, exports, variant_dir, duplicate, must_exist])
+<!-- (dirs=subdirs, [name=script, exports, variant_dir, src_dir, duplicate, must_exist]) -->
</arguments>
<summary>
<para>
@@ -562,12 +562,13 @@ and what about this alternative?
TODO??? SConscript('build/SConscript', src_dir='src')
-->
</para>
+
<para>
The optional
<varname>must_exist</varname>
argument, if true, causes an exception to be raised if a requested
-&SConscript; file is not found. The default is false,
-which only prints a warning, but this behavior is deprecated.
+&SConscript; file is not found. The current default is false,
+causing only a warning to be omitted, but this behavior is deprecated.
For scripts which truly intend to be optional, transition to
explicty supplying
<literal>must_exist=False</literal> to the call.