diff options
author | Greg Noel <GregNoel@tigris.org> | 2010-05-26 16:17:09 (GMT) |
---|---|---|
committer | Greg Noel <GregNoel@tigris.org> | 2010-05-26 16:17:09 (GMT) |
commit | 545d2a0a389e9eacdb1d92fbf5f26f2d981029ad (patch) | |
tree | 23f5cda5c621bd7bb657ef9fd1d07e4578d4a934 /src/engine/SCons/Script/SConscript.py | |
parent | 5c2e07585593ee4994b8e7d79b3d181a56cd7f13 (diff) | |
download | SCons-545d2a0a389e9eacdb1d92fbf5f26f2d981029ad.zip SCons-545d2a0a389e9eacdb1d92fbf5f26f2d981029ad.tar.gz SCons-545d2a0a389e9eacdb1d92fbf5f26f2d981029ad.tar.bz2 |
Start the deprecation cycle for the BuildDir() method and the build_dir
keyword parameter.
Several existing tests were still using BuildDir() or build_dir; they were
converted to use VariantDir() and variant_dir.
New tests were added to validate that the --warn=deprecated-build-dir option
and the SetOption method did the right thing. This led to the discovery that
a commonly-used test pattern provided by the infrastructure gobbled up too
much, causing tests to succeed when they should have failed. Fixing the
pattern led to other tests needing to be fixed.
In the process, it was discovered that the SCONSFLAG environment variable was
not getting correctly reset to its original value. Fixing this also caused
additional tests to misbehave, requiring them to be updated.
And test/Sig.py, which tests the deprecated SCons.Sig module, was moved to
the test/Deprecated directory.
All in all, quite a lot of action for what was supposed to be a simple change.
Diffstat (limited to 'src/engine/SCons/Script/SConscript.py')
-rw-r--r-- | src/engine/SCons/Script/SConscript.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/engine/SCons/Script/SConscript.py b/src/engine/SCons/Script/SConscript.py index c3433ca..aa555da 100644 --- a/src/engine/SCons/Script/SConscript.py +++ b/src/engine/SCons/Script/SConscript.py @@ -378,7 +378,7 @@ class SConsEnvironment(SCons.Environment.Base): def _get_SConscript_filenames(self, ls, kw): """ - Convert the parameters passed to # SConscript() calls into a list + Convert the parameters passed to SConscript() calls into a list of files and export variables. If the parameters are invalid, throws SCons.Errors.UserError. Returns a tuple (l, e) where l is a list of SConscript filenames and e is a list of exports. @@ -523,6 +523,9 @@ class SConsEnvironment(SCons.Environment.Base): raise SCons.Errors.UserError("Import of non-existent variable '%s'"%x) def SConscript(self, *ls, **kw): + 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) def subst_element(x, subst=self.subst): if SCons.Util.is_List(x): x = list(map(subst, x)) |