From: stevenknight Date: Wed, 6 Oct 2004 03:08:45 +0000 (+0000) Subject: Add a deprecated warning for the scanner keyword argument for Builder creation. ... X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=913e0b459d194f89d903fc8066bcf6c10a33b317;p=scons.git Add a deprecated warning for the scanner keyword argument for Builder creation. (Kevin Quick) git-svn-id: http://scons.tigris.org/svn/scons/trunk@1113 fdb21ef1-2011-0410-befe-b5e4ea1792b1 --- diff --git a/src/CHANGES.txt b/src/CHANGES.txt index dc9b733b..cf8a4e9d 100644 --- a/src/CHANGES.txt +++ b/src/CHANGES.txt @@ -183,6 +183,9 @@ RELEASE 0.97 - XXX Make comparisons of Scanner objects more robust. Add a name to an internal default ObjSourceScanner. + - Add a deprecated warning for use of the old "scanner" keyword argument + to Builder creation. + From Christoph Wiedemann: - Add an Environment.SetDefault() method that only sets values if diff --git a/src/engine/SCons/Builder.py b/src/engine/SCons/Builder.py index 8e46332d..e9d4e117 100644 --- a/src/engine/SCons/Builder.py +++ b/src/engine/SCons/Builder.py @@ -430,6 +430,11 @@ class BuilderBase: "\tspecify the items as keyword arguments to the Builder() call instead.") overrides.update(overrides['overrides']) del overrides['overrides'] + if overrides.has_key('scanner'): + SCons.Warnings.warn(SCons.Warnings.DeprecatedWarning, + "The \"scanner\" keyword to Builder() creation has been deprecated;\n" + "\tuse: source_scanner or target_scanner as appropriate.") + del overrides['scanner'] self.overrides = overrides self.set_src_suffix(src_suffix) diff --git a/src/engine/SCons/Tool/midl.py b/src/engine/SCons/Tool/midl.py index 843d31bf..6be91efd 100644 --- a/src/engine/SCons/Tool/midl.py +++ b/src/engine/SCons/Tool/midl.py @@ -57,7 +57,7 @@ midl_builder = SCons.Builder.Builder(action='$MIDLCOM', src_suffix = '.idl', suffix='.tlb', emitter = midl_emitter, - scanner = idl_scanner) + source_scanner = idl_scanner) def generate(env): """Add Builders and construction variables for midl to an Environment."""