summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--doc/man/scons.xml21
-rw-r--r--doc/scons.mod3
-rw-r--r--doc/user/depends.xml178
-rwxr-xr-xsrc/CHANGES.txt1
-rw-r--r--src/engine/SCons/Environment.py59
-rw-r--r--src/engine/SCons/Environment.xml252
-rw-r--r--src/engine/SCons/EnvironmentTests.py91
-rw-r--r--src/engine/SCons/Script/__init__.py2
-rw-r--r--src/engine/SCons/Warnings.py6
-rw-r--r--test/Removed/CacheDir/Old/sconstest.skip0
-rw-r--r--test/Removed/CacheDir/Old/timestamp-content.py (renamed from test/Deprecated/CacheDir/timestamp-content.py)0
-rw-r--r--test/Removed/CacheDir/Old/timestamp-timestamp.py (renamed from test/Deprecated/CacheDir/timestamp-timestamp.py)0
-rw-r--r--test/Removed/CacheDir/README.md4
-rw-r--r--test/Removed/SourceSignatures/Old/basic.py (renamed from test/Deprecated/SourceSignatures/basic.py)0
-rw-r--r--test/Removed/SourceSignatures/Old/env.py (renamed from test/Deprecated/SourceSignatures/env.py)1
-rw-r--r--test/Removed/SourceSignatures/Old/implicit-cache.py (renamed from test/Deprecated/SourceSignatures/implicit-cache.py)0
-rw-r--r--test/Removed/SourceSignatures/Old/no-csigs.py (renamed from test/Deprecated/SourceSignatures/no-csigs.py)2
-rw-r--r--test/Removed/SourceSignatures/Old/overrides.py (renamed from test/Deprecated/SourceSignatures/overrides.py)0
-rw-r--r--test/Removed/SourceSignatures/Old/sconstest.skip0
-rw-r--r--test/Removed/SourceSignatures/Old/switch-rebuild.py (renamed from test/Deprecated/SourceSignatures/switch-rebuild.py)0
-rw-r--r--test/Removed/SourceSignatures/README.md6
-rw-r--r--test/Removed/SourceSignatures/SConstruct.method1
-rw-r--r--test/Removed/SourceSignatures/SConstruct.setopt1
-rw-r--r--test/Removed/SourceSignatures/SourceSignatures.py57
-rw-r--r--test/Removed/TargetSignatures/Old/build-content.py (renamed from test/Deprecated/TargetSignatures/build-content.py)0
-rw-r--r--test/Removed/TargetSignatures/Old/content.py (renamed from test/Deprecated/TargetSignatures/content.py)0
-rw-r--r--test/Removed/TargetSignatures/Old/overrides.py (renamed from test/Deprecated/TargetSignatures/overrides.py)0
-rw-r--r--test/Removed/TargetSignatures/Old/sconstest.skip0
-rw-r--r--test/Removed/TargetSignatures/README.md6
-rw-r--r--test/Removed/TargetSignatures/SConstruct.method1
-rw-r--r--test/Removed/TargetSignatures/SConstruct.setopt1
-rw-r--r--test/Removed/TargetSignatures/TargetSignatures.py57
-rw-r--r--test/implicit-cache/basic.py7
-rw-r--r--test/sconsign/script/Signatures.py3
-rw-r--r--test/srcchange.py5
-rw-r--r--test/subdivide.py5
36 files changed, 148 insertions, 622 deletions
diff --git a/doc/man/scons.xml b/doc/man/scons.xml
index 95278e6..a9e0dd7 100644
--- a/doc/man/scons.xml
+++ b/doc/man/scons.xml
@@ -1827,27 +1827,6 @@ method.</para>
</listitem>
</varlistentry>
- <varlistentry>
- <term>--warn=deprecated-source-signatures, --warn=no-deprecated-source-signatures</term>
- <listitem>
-<para>Enables or disables warnings about use of the deprecated
-<emphasis role="bold">SourceSignatures()</emphasis>
-function or
-<emphasis role="bold">env.SourceSignatures()</emphasis>
-method.</para>
-
- </listitem>
- </varlistentry>
- <varlistentry>
- <term>--warn=deprecated-target-signatures, --warn=no-deprecated-target-signatures</term>
- <listitem>
-<para>Enables or disables warnings about use of the deprecated
-<emphasis role="bold">TargetSignatures()</emphasis>
-function or
-<emphasis role="bold">env.TargetSignatures()</emphasis>
-method.</para>
- </listitem>
- </varlistentry>
</variablelist>
</blockquote>
diff --git a/doc/scons.mod b/doc/scons.mod
index 71e996d..3e843a0 100644
--- a/doc/scons.mod
+++ b/doc/scons.mod
@@ -260,11 +260,8 @@
<!ENTITY SetDefault "<function xmlns='http://www.scons.org/dbxsd/v1.0'>SetDefault</function>">
<!ENTITY SetOption "<function xmlns='http://www.scons.org/dbxsd/v1.0'>SetOption</function>">
<!ENTITY SideEffect "<function xmlns='http://www.scons.org/dbxsd/v1.0'>SideEffect</function>">
-<!ENTITY SourceSignature "<function xmlns='http://www.scons.org/dbxsd/v1.0'>SourceSignature</function>">
-<!ENTITY SourceSignatures "<function xmlns='http://www.scons.org/dbxsd/v1.0'>SourceSignatures</function>">
<!ENTITY Split "<function xmlns='http://www.scons.org/dbxsd/v1.0'>Split</function>">
<!ENTITY Tag "<function xmlns='http://www.scons.org/dbxsd/v1.0'>Tag</function>">
-<!ENTITY TargetSignatures "<function xmlns='http://www.scons.org/dbxsd/v1.0'>TargetSignatures</function>">
<!ENTITY Task "<function xmlns='http://www.scons.org/dbxsd/v1.0'>Task</function>">
<!ENTITY Touch "<function xmlns='http://www.scons.org/dbxsd/v1.0'>Touch</function>">
<!ENTITY UnknownOptions "<function xmlns='http://www.scons.org/dbxsd/v1.0'>UnknownOptions</function>">
diff --git a/doc/user/depends.xml b/doc/user/depends.xml
index 7947900..5a78eb5 100644
--- a/doc/user/depends.xml
+++ b/doc/user/depends.xml
@@ -765,184 +765,6 @@ int main() { printf("Hello, world!\n"); }
</para>
- <section>
- <title>The &SourceSignatures; Function</title>
-
- <para>
-
- The &SourceSignatures; function is fairly straightforward,
- and supports two different argument values
- to configure whether source file changes should be decided
- using MD5 signatures:
-
- </para>
-
- <sconstruct>
-Program('hello.c')
-SourceSignatures('MD5')
- </sconstruct>
-
- <para>
-
- Or using time stamps:
-
- </para>
-
- <sconstruct>
-Program('hello.c')
-SourceSignatures('timestamp')
- </sconstruct>
-
- <para>
-
- These are roughly equivalent to specifying
- <function>Decider('MD5')</function>
- or
- <function>Decider('timestamp-match')</function>,
- respectively,
- although it only affects how SCons makes
- decisions about dependencies on
- <emphasis>source</emphasis> files--that is,
- files that are not built from any other files.
-
- </para>
-
- </section>
-
- <section>
- <title>The &TargetSignatures; Function</title>
-
- <para>
-
- The &TargetSignatures; function
- specifies how &SCons; decides
- when a target file has changed
- <emphasis>when it is used as a
- dependency of (input to) another target</emphasis>--that is,
- the &TargetSignatures; function configures
- how the signatures of "intermediate" target files
- are used when deciding if a "downstream" target file
- must be rebuilt.
- <footnote><para>
- This easily-overlooked distinction between
- how &SCons; decides if the target itself must be rebuilt
- and how the target is then used to decide if a different
- target must be rebuilt is one of the confusing
- things that has led to the &TargetSignatures;
- and &SourceSignatures; functions being
- replaced by the simpler &Decider; function.
- </para></footnote>
-
- </para>
-
- <para>
-
- The &TargetSignatures; function supports the same
- <literal>'MD5'</literal> and <literal>'timestamp'</literal>
- argument values that are supported by the &SourceSignatures;,
- with the same meanings, but applied to target files.
- That is, in the example:
-
- </para>
-
- <sconstruct>
-Program('hello.c')
-TargetSignatures('MD5')
- </sconstruct>
-
- <para>
-
- The MD5 checksum of the &hello_o; target file
- will be used to decide if it has changed since the last
- time the "downstream" &hello; target file was built.
- And in the example:
-
- </para>
-
- <sconstruct>
-Program('hello.c')
-TargetSignatures('timestamp')
- </sconstruct>
-
- <para>
-
- The modification time of the &hello_o; target file
- will be used to decide if it has changed since the last
- time the "downstream" &hello; target file was built.
-
- </para>
-
- <para>
-
- The &TargetSignatures; function supports
- two additional argument values:
- <literal>'source'</literal> and <literal>'build'</literal>.
- The <literal>'source'</literal> argument
- specifies that decisions involving
- whether target files have changed
- since a previous build
- should use the same behavior
- for the decisions configured for source files
- (using the &SourceSignatures; function).
- So in the example:
-
- </para>
-
- <sconstruct>
-Program('hello.c')
-TargetSignatures('source')
-SourceSignatures('timestamp')
- </sconstruct>
-
- <para>
-
- All files, both targets and sources,
- will use modification times
- when deciding if an input file
- has changed since the last
- time a target was built.
-
- </para>
-
- <para>
-
- Lastly, the <literal>'build'</literal> argument
- specifies that &SCons; should examine
- the build status of a target file
- and always rebuild a "downstream" target
- if the target file was itself rebuilt,
- without re-examining the contents or timestamp
- of the newly-built target file.
- If the target file was not rebuilt during
- this &scons; invocation,
- then the target file will be examined
- the same way as configured by
- the &SourceSignature; call
- to decide if it has changed.
-
- </para>
-
- <para>
-
- This mimics the behavior of
- <literal>build signatures</literal>
- in earlier versions of &SCons;.
- A &buildsignature; re-combined
- signatures of all the input files
- that went into making the target file,
- so that the target file itself
- did not need to have its contents read
- to compute an MD5 signature.
- This can improve performance for some configurations,
- but is generally not as effective as using
- <literal>Decider('MD5-timestamp')</literal>.
-
- </para>
-
- </section>
-
- </section>
-
<section>
<title>Implicit Dependencies: The &cv-CPPPATH; Construction Variable</title>
diff --git a/src/CHANGES.txt b/src/CHANGES.txt
index df8fb0d..af448d5 100755
--- a/src/CHANGES.txt
+++ b/src/CHANGES.txt
@@ -24,6 +24,7 @@ RELEASE VERSION/DATE TO BE FILLED IN LATER
a file; integrates with existing memoizing of such vars.
On vs2019 saves 5+ seconds per SCons invocation, which really
helps test suite runs.
+ - Remove deprecated SourceSignatures, TargetSignatures
From Jacek Kuczera:
- Fix CheckFunc detection code for Visual 2019. Some functions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py
index 08104c5..0e1102e 100644
--- a/src/engine/SCons/Environment.py
+++ b/src/engine/SCons/Environment.py
@@ -46,7 +46,7 @@ import SCons.Builder
import SCons.Debug
from SCons.Debug import logInstanceCreation
import SCons.Defaults
-import SCons.Errors
+from SCons.Errors import UserError, BuildError
import SCons.Memoize
import SCons.Node
import SCons.Node.Alias
@@ -75,11 +75,6 @@ CalculatorArgs = {}
semi_deepcopy = SCons.Util.semi_deepcopy
semi_deepcopy_dict = SCons.Util.semi_deepcopy_dict
-# Pull UserError into the global name space for the benefit of
-# Environment().SourceSignatures(), which has some import statements
-# which seem to mess up its ability to reference SCons directly.
-UserError = SCons.Errors.UserError
-
def alias_builder(env, target, source):
pass
@@ -154,7 +149,7 @@ def _set_BUILDERS(env, key, value):
env._dict[key] = bd
for k, v in value.items():
if not SCons.Builder.is_a_Builder(v):
- raise SCons.Errors.UserError('%s is not a Builder.' % repr(v))
+ raise UserError('%s is not a Builder.' % repr(v))
bd.update(value)
def _del_SCANNERS(env, key):
@@ -431,7 +426,7 @@ class SubstitutionEnvironment(object):
# efficient than calling another function or a method.
if key not in self._dict \
and not _is_valid_var.match(key):
- raise SCons.Errors.UserError("Illegal construction variable `%s'" % key)
+ raise UserError("Illegal construction variable `%s'" % key)
self._dict[key] = value
def get(self, key, default=None):
@@ -1621,7 +1616,7 @@ class Base(SubstitutionEnvironment):
for td in tdlist:
targets.extend(td[0])
if len(targets) > 1:
- raise SCons.Errors.UserError(
+ raise UserError(
"More than one dependency target found in `%s': %s"
% (filename, targets))
for target, depends in tdlist:
@@ -2060,7 +2055,7 @@ class Base(SubstitutionEnvironment):
"""
action = self.Action(action, *args, **kw)
result = action([], [], self)
- if isinstance(result, SCons.Errors.BuildError):
+ if isinstance(result, BuildError):
errstr = result.errstr
if result.filename:
errstr = result.filename + ': ' + errstr
@@ -2180,7 +2175,7 @@ class Base(SubstitutionEnvironment):
for side_effect in side_effects:
if side_effect.multiple_side_effect_has_builder():
- raise SCons.Errors.UserError("Multiple ways to build the same target were specified for: %s" % str(side_effect))
+ raise UserError("Multiple ways to build the same target were specified for: %s" % str(side_effect))
side_effect.add_source(targets)
side_effect.side_effect = 1
self.Precious(side_effect)
@@ -2198,24 +2193,6 @@ class Base(SubstitutionEnvironment):
entry.set_src_builder(builder)
return entries
- def SourceSignatures(self, type):
- global _warn_source_signatures_deprecated
- if _warn_source_signatures_deprecated:
- msg = "The env.SourceSignatures() method is deprecated;\n" + \
- "\tconvert your build to use the env.Decider() method instead."
- SCons.Warnings.warn(SCons.Warnings.DeprecatedSourceSignaturesWarning, msg)
- _warn_source_signatures_deprecated = False
- type = self.subst(type)
- self.src_sig_type = type
- if type == 'MD5':
- if not SCons.Util.md5:
- raise UserError("MD5 signatures are not available in this version of Python.")
- self.decide_source = self._changed_content
- elif type == 'timestamp':
- self.decide_source = self._changed_timestamp_match
- else:
- raise UserError("Unknown source signature type '%s'" % type)
-
def Split(self, arg):
"""This function converts a string or list into a list of strings
or Nodes. This makes things easier for users by allowing files to
@@ -2237,28 +2214,6 @@ class Base(SubstitutionEnvironment):
else:
return [self.subst(arg)]
- def TargetSignatures(self, type):
- global _warn_target_signatures_deprecated
- if _warn_target_signatures_deprecated:
- msg = "The env.TargetSignatures() method is deprecated;\n" + \
- "\tconvert your build to use the env.Decider() method instead."
- SCons.Warnings.warn(SCons.Warnings.DeprecatedTargetSignaturesWarning, msg)
- _warn_target_signatures_deprecated = False
- type = self.subst(type)
- self.tgt_sig_type = type
- if type in ('MD5', 'content'):
- if not SCons.Util.md5:
- raise UserError("MD5 signatures are not available in this version of Python.")
- self.decide_target = self._changed_content
- elif type == 'timestamp':
- self.decide_target = self._changed_timestamp_match
- elif type == 'build':
- self.decide_target = self._changed_build
- elif type == 'source':
- self.decide_target = self._changed_source
- else:
- raise UserError("Unknown target signature type '%s'"%type)
-
def Value(self, value, built_value=None):
"""
"""
@@ -2355,7 +2310,7 @@ class OverrideEnvironment(Base):
return self.__dict__['__subject'].__getitem__(key)
def __setitem__(self, key, value):
if not is_valid_construction_var(key):
- raise SCons.Errors.UserError("Illegal construction variable `%s'" % key)
+ raise UserError("Illegal construction variable `%s'" % key)
self.__dict__['overrides'][key] = value
def __delitem__(self, key):
try:
diff --git a/src/engine/SCons/Environment.xml b/src/engine/SCons/Environment.xml
index a635108..829bf12 100644
--- a/src/engine/SCons/Environment.xml
+++ b/src/engine/SCons/Environment.xml
@@ -2987,105 +2987,6 @@ env.SourceCode('no_source.c', None)
</summary>
</scons_function>
-<scons_function name="SourceSignatures">
-<arguments>
-(type)
-</arguments>
-<summary>
-<para>
-Note: Although it is not yet officially deprecated,
-use of this function is discouraged.
-See the
-&f-link-Decider;
-function for a more flexible and straightforward way
-to configure SCons' decision-making.
-</para>
-
-<para>
-The
-&f-SourceSignatures;
-function tells
-&scons;
-how to decide if a source file
-(a file that is not built from any other files)
-has changed since the last time it
-was used to build a particular target file.
-Legal values are
-<literal>MD5</literal>
-or
-<literal>timestamp</literal>.
-</para>
-
-<para>
-If the environment method is used,
-the specified type of source signature
-is only used when deciding whether targets
-built with that environment are up-to-date or must be rebuilt.
-If the global function is used,
-the specified type of source signature becomes the default
-used for all decisions
-about whether targets are up-to-date.
-</para>
-
-<para>
-<literal>MD5</literal>
-means
-&scons;
-decides that a source file has changed
-if the MD5 checksum of its contents has changed since
-the last time it was used to rebuild a particular target file.
-</para>
-
-<para>
-<literal>timestamp</literal>
-means
-&scons;
-decides that a source file has changed
-if its timestamp (modification time) has changed since
-the last time it was used to rebuild a particular target file.
-(Note that although this is similar to the behavior of Make,
-by default it will also rebuild if the dependency is
-<emphasis>older</emphasis>
-than the last time it was used to rebuild the target file.)
-</para>
-
-<para>
-There is no different between the two behaviors
-for Python
-&f-Value;
-node objects.
-</para>
-
-<para>
-<literal>MD5</literal>
-signatures take longer to compute,
-but are more accurate than
-<literal>timestamp</literal>
-signatures.
-The default value is
-<literal>MD5</literal>.
-</para>
-
-<para>
-Note that the default
-&f-link-TargetSignatures;
-setting (see below)
-is to use this
-&f-SourceSignatures;
-setting for any target files that are used
-to build other target files.
-Consequently, changing the value of
-&f-SourceSignatures;
-will, by default,
-affect the up-to-date decision for all files in the build
-(or all files built with a specific construction environment
-when
-&f-env-SourceSignatures;
-is used).
-</para>
-</summary>
-</scons_function>
-
<scons_function name="Split">
<arguments>
(arg)
@@ -3229,159 +3130,6 @@ source_nodes = env.subst('$EXPAND_TO_NODELIST',
</summary>
</scons_function>
-<scons_function name="TargetSignatures">
-<arguments>
-(type)
-</arguments>
-<summary>
-<para>
-Note: Although it is not yet officially deprecated,
-use of this function is discouraged.
-See the
-&f-link-Decider;
-function for a more flexible and straightforward way
-to configure SCons' decision-making.
-</para>
-
-<para>
-The
-&f-TargetSignatures;
-function tells
-&scons;
-how to decide if a target file
-(a file that
-<emphasis>is</emphasis>
-built from any other files)
-has changed since the last time it
-was used to build some other target file.
-Legal values are
-<literal>"build"</literal>;
-<literal>"content"</literal>
-(or its synonym
-<literal>"MD5"</literal>);
-<literal>"timestamp"</literal>;
-or
-<literal>"source"</literal>.
-</para>
-
-<para>
-If the environment method is used,
-the specified type of target signature is only used
-for targets built with that environment.
-If the global function is used,
-the specified type of signature becomes the default
-used for all target files that
-don't have an explicit target signature type
-specified for their environments.
-</para>
-
-<para>
-<literal>"content"</literal>
-(or its synonym
-<literal>"MD5"</literal>)
-means
-&scons;
-decides that a target file has changed
-if the MD5 checksum of its contents has changed since
-the last time it was used to rebuild some other target file.
-This means
-&scons;
-will open up
-MD5 sum the contents
-of target files after they're built,
-and may decide that it does not need to rebuild
-"downstream" target files if a file was
-rebuilt with exactly the same contents as the last time.
-</para>
-
-<para>
-<literal>"timestamp"</literal>
-means
-&scons;
-decides that a target file has changed
-if its timestamp (modification time) has changed since
-the last time it was used to rebuild some other target file.
-(Note that although this is similar to the behavior of Make,
-by default it will also rebuild if the dependency is
-<emphasis>older</emphasis>
-than the last time it was used to rebuild the target file.)
-</para>
-
-<para>
-<literal>"source"</literal>
-means
-&scons;
-decides that a target file has changed
-as specified by the corresponding
-&f-SourceSignatures;
-setting
-(<literal>"MD5"</literal>
-or
-<literal>"timestamp"</literal>).
-This means that
-&scons;
-will treat all input files to a target the same way,
-regardless of whether they are source files
-or have been built from other files.
-</para>
-
-<para>
-<literal>"build"</literal>
-means
-&scons;
-decides that a target file has changed
-if it has been rebuilt in this invocation
-or if its content or timestamp have changed
-as specified by the corresponding
-&f-SourceSignatures;
-setting.
-This "propagates" the status of a rebuilt file
-so that other "downstream" target files
-will always be rebuilt,
-even if the contents or the timestamp
-have not changed.
-</para>
-
-<para>
-<literal>"build"</literal>
-signatures are fastest because
-<literal>"content"</literal>
-(or
-<literal>"MD5"</literal>)
-signatures take longer to compute,
-but are more accurate than
-<literal>"timestamp"</literal>
-signatures,
-and can prevent unnecessary "downstream" rebuilds
-when a target file is rebuilt to the exact same contents
-as the previous build.
-The
-<literal>"source"</literal>
-setting provides the most consistent behavior
-when other target files may be rebuilt from
-both source and target input files.
-The default value is
-<literal>"source"</literal>.
-</para>
-
-<para>
-Because the default setting is
-<literal>"source"</literal>,
-using
-&f-SourceSignatures;
-is generally preferable to
-&f-TargetSignatures;,
-so that the up-to-date decision
-will be consistent for all files
-(or all files built with a specific construction environment).
-Use of
-&f-TargetSignatures;
-provides specific control for how built target files
-affect their "downstream" dependencies.
-</para>
-</summary>
-</scons_function>
-
<scons_function name="Tool">
<arguments>
(string, [toolpath, **kw])
diff --git a/src/engine/SCons/EnvironmentTests.py b/src/engine/SCons/EnvironmentTests.py
index 70e1a37..f016f22 100644
--- a/src/engine/SCons/EnvironmentTests.py
+++ b/src/engine/SCons/EnvironmentTests.py
@@ -3284,44 +3284,6 @@ def generate(env):
s = e.src_builder()
assert s is None, s
- def test_SourceSignatures(self):
- """Test the SourceSignatures() method"""
- import SCons.Errors
-
- env = self.TestEnvironment(M = 'MD5', T = 'timestamp')
-
- exc_caught = None
- try:
- env.SourceSignatures('invalid_type')
- except SCons.Errors.UserError:
- exc_caught = 1
- assert exc_caught, "did not catch expected UserError"
-
- env.SourceSignatures('MD5')
- assert env.src_sig_type == 'MD5', env.src_sig_type
-
- env.SourceSignatures('$M')
- assert env.src_sig_type == 'MD5', env.src_sig_type
-
- env.SourceSignatures('timestamp')
- assert env.src_sig_type == 'timestamp', env.src_sig_type
-
- env.SourceSignatures('$T')
- assert env.src_sig_type == 'timestamp', env.src_sig_type
-
- try:
- import SCons.Util
- save_md5 = SCons.Util.md5
- SCons.Util.md5 = None
- try:
- env.SourceSignatures('MD5')
- except SCons.Errors.UserError:
- pass
- else:
- self.fail('Did not catch expected UserError')
- finally:
- SCons.Util.md5 = save_md5
-
def test_Split(self):
"""Test the Split() method"""
env = self.TestEnvironment(FOO = 'fff', BAR = 'bbb')
@@ -3338,56 +3300,6 @@ def generate(env):
s = env.Split("$FOO$BAR")
assert s == ["fffbbb"], s
- def test_TargetSignatures(self):
- """Test the TargetSignatures() method"""
- import SCons.Errors
-
- env = self.TestEnvironment(B='build', C='content')
-
- exc_caught = None
- try:
- env.TargetSignatures('invalid_type')
- except SCons.Errors.UserError:
- exc_caught = 1
- assert exc_caught, "did not catch expected UserError"
- assert not hasattr(env, '_build_signature')
-
- env.TargetSignatures('build')
- assert env.tgt_sig_type == 'build', env.tgt_sig_type
-
- env.TargetSignatures('$B')
- assert env.tgt_sig_type == 'build', env.tgt_sig_type
-
- env.TargetSignatures('content')
- assert env.tgt_sig_type == 'content', env.tgt_sig_type
-
- env.TargetSignatures('$C')
- assert env.tgt_sig_type == 'content', env.tgt_sig_type
-
- env.TargetSignatures('MD5')
- assert env.tgt_sig_type == 'MD5', env.tgt_sig_type
-
- env.TargetSignatures('timestamp')
- assert env.tgt_sig_type == 'timestamp', env.tgt_sig_type
-
- try:
- import SCons.Util
- save_md5 = SCons.Util.md5
- SCons.Util.md5 = None
- try:
- env.TargetSignatures('MD5')
- except SCons.Errors.UserError:
- pass
- else:
- self.fail('Did not catch expected UserError')
- try:
- env.TargetSignatures('content')
- except SCons.Errors.UserError:
- pass
- else:
- self.fail('Did not catch expected UserError')
- finally:
- SCons.Util.md5 = save_md5
def test_Value(self):
"""Test creating a Value() object
@@ -3408,7 +3320,6 @@ def generate(env):
assert v3.value == 'c', v3.value
-
def test_Environment_global_variable(self):
"""Test setting Environment variable to an Environment.Base subclass"""
class MyEnv(SCons.Environment.Base):
@@ -3750,8 +3661,6 @@ class OverrideEnvironmentTestCase(unittest.TestCase,TestEnvironmentFixture):
# Environment()
# FindFile()
# Scanner()
- # SourceSignatures()
- # TargetSignatures()
# It's unlikely Clone() will ever be called this way, so let the
# other methods test that handling overridden values works.
diff --git a/src/engine/SCons/Script/__init__.py b/src/engine/SCons/Script/__init__.py
index 007eb0d..24af73e 100644
--- a/src/engine/SCons/Script/__init__.py
+++ b/src/engine/SCons/Script/__init__.py
@@ -346,10 +346,8 @@ GlobalDefaultEnvironmentFunctions = [
'SConsignFile',
'SideEffect',
'SourceCode',
- 'SourceSignatures',
'Split',
'Tag',
- 'TargetSignatures',
'Value',
'VariantDir',
]
diff --git a/src/engine/SCons/Warnings.py b/src/engine/SCons/Warnings.py
index a5b257b..718b3d5 100644
--- a/src/engine/SCons/Warnings.py
+++ b/src/engine/SCons/Warnings.py
@@ -132,12 +132,6 @@ class DeprecatedCopyWarning(MandatoryDeprecatedWarning):
class DeprecatedOptionsWarning(MandatoryDeprecatedWarning):
pass
-class DeprecatedSourceSignaturesWarning(MandatoryDeprecatedWarning):
- pass
-
-class DeprecatedTargetSignaturesWarning(MandatoryDeprecatedWarning):
- pass
-
class DeprecatedDebugOptionsWarning(MandatoryDeprecatedWarning):
pass
diff --git a/test/Removed/CacheDir/Old/sconstest.skip b/test/Removed/CacheDir/Old/sconstest.skip
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/Removed/CacheDir/Old/sconstest.skip
diff --git a/test/Deprecated/CacheDir/timestamp-content.py b/test/Removed/CacheDir/Old/timestamp-content.py
index 860d0f3..860d0f3 100644
--- a/test/Deprecated/CacheDir/timestamp-content.py
+++ b/test/Removed/CacheDir/Old/timestamp-content.py
diff --git a/test/Deprecated/CacheDir/timestamp-timestamp.py b/test/Removed/CacheDir/Old/timestamp-timestamp.py
index eec70b5..eec70b5 100644
--- a/test/Deprecated/CacheDir/timestamp-timestamp.py
+++ b/test/Removed/CacheDir/Old/timestamp-timestamp.py
diff --git a/test/Removed/CacheDir/README.md b/test/Removed/CacheDir/README.md
new file mode 100644
index 0000000..c5b75bf
--- /dev/null
+++ b/test/Removed/CacheDir/README.md
@@ -0,0 +1,4 @@
+CacheDir/Old contains old tests of CacheDir which used the now removed
+SourceSignatures and TargetSignatures methods, preserved here for
+reference; the presence of an scontest.skip file means they are never
+executed.
diff --git a/test/Deprecated/SourceSignatures/basic.py b/test/Removed/SourceSignatures/Old/basic.py
index 7951dbd..7951dbd 100644
--- a/test/Deprecated/SourceSignatures/basic.py
+++ b/test/Removed/SourceSignatures/Old/basic.py
diff --git a/test/Deprecated/SourceSignatures/env.py b/test/Removed/SourceSignatures/Old/env.py
index c63b176..bf86d4d 100644
--- a/test/Deprecated/SourceSignatures/env.py
+++ b/test/Removed/SourceSignatures/Old/env.py
@@ -29,7 +29,6 @@ Test that use of env.SourceSignatures() correctly overrides the
default behavior.
"""
-import os
import re
import TestSCons
diff --git a/test/Deprecated/SourceSignatures/implicit-cache.py b/test/Removed/SourceSignatures/Old/implicit-cache.py
index a4bdc78..a4bdc78 100644
--- a/test/Deprecated/SourceSignatures/implicit-cache.py
+++ b/test/Removed/SourceSignatures/Old/implicit-cache.py
diff --git a/test/Deprecated/SourceSignatures/no-csigs.py b/test/Removed/SourceSignatures/Old/no-csigs.py
index c4f2a78..60c0460 100644
--- a/test/Deprecated/SourceSignatures/no-csigs.py
+++ b/test/Removed/SourceSignatures/Old/no-csigs.py
@@ -25,8 +25,6 @@
__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
-import os
-
import TestSCons
import TestSConsign
diff --git a/test/Deprecated/SourceSignatures/overrides.py b/test/Removed/SourceSignatures/Old/overrides.py
index 4303c0e..4303c0e 100644
--- a/test/Deprecated/SourceSignatures/overrides.py
+++ b/test/Removed/SourceSignatures/Old/overrides.py
diff --git a/test/Removed/SourceSignatures/Old/sconstest.skip b/test/Removed/SourceSignatures/Old/sconstest.skip
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/Removed/SourceSignatures/Old/sconstest.skip
diff --git a/test/Deprecated/SourceSignatures/switch-rebuild.py b/test/Removed/SourceSignatures/Old/switch-rebuild.py
index b9cc3d5..b9cc3d5 100644
--- a/test/Deprecated/SourceSignatures/switch-rebuild.py
+++ b/test/Removed/SourceSignatures/Old/switch-rebuild.py
diff --git a/test/Removed/SourceSignatures/README.md b/test/Removed/SourceSignatures/README.md
new file mode 100644
index 0000000..05d8d05
--- /dev/null
+++ b/test/Removed/SourceSignatures/README.md
@@ -0,0 +1,6 @@
+SourceSignatures.py is the "new" test, only makes sure scons actually
+fails in the presence of the method or setoption call.
+
+The Old directory is the former tests from the deprecated state,
+preserved here for reference; the presence of an scontest.skip file
+means they are never executed.
diff --git a/test/Removed/SourceSignatures/SConstruct.method b/test/Removed/SourceSignatures/SConstruct.method
new file mode 100644
index 0000000..e68d6bf
--- /dev/null
+++ b/test/Removed/SourceSignatures/SConstruct.method
@@ -0,0 +1 @@
+SourceSignatures('MD5')
diff --git a/test/Removed/SourceSignatures/SConstruct.setopt b/test/Removed/SourceSignatures/SConstruct.setopt
new file mode 100644
index 0000000..6e1161f
--- /dev/null
+++ b/test/Removed/SourceSignatures/SConstruct.setopt
@@ -0,0 +1 @@
+SetOption('warn', 'deprecated-source-signatures')
diff --git a/test/Removed/SourceSignatures/SourceSignatures.py b/test/Removed/SourceSignatures/SourceSignatures.py
new file mode 100644
index 0000000..014c163
--- /dev/null
+++ b/test/Removed/SourceSignatures/SourceSignatures.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that SourceSignatures and its associated warning flag
+are definitely gone.
+"""
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+test.file_fixture('SConstruct.method', 'SConstruct')
+expect = """\
+NameError: name 'SourceSignatures' is not defined:
+ File "{}", line 1:
+ SourceSignatures('MD5')
+""".format(test.workpath('SConstruct'))
+test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect)
+
+test.file_fixture('SConstruct.setopt', 'SConstruct')
+test.run(arguments='-Q -s', status=0, stdout=None,
+ stderr="""\
+No warning type: 'deprecated-source-signatures'
+No warning type: 'deprecated-source-signatures'
+""")
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/Deprecated/TargetSignatures/build-content.py b/test/Removed/TargetSignatures/Old/build-content.py
index efdaaee..efdaaee 100644
--- a/test/Deprecated/TargetSignatures/build-content.py
+++ b/test/Removed/TargetSignatures/Old/build-content.py
diff --git a/test/Deprecated/TargetSignatures/content.py b/test/Removed/TargetSignatures/Old/content.py
index aca63f3..aca63f3 100644
--- a/test/Deprecated/TargetSignatures/content.py
+++ b/test/Removed/TargetSignatures/Old/content.py
diff --git a/test/Deprecated/TargetSignatures/overrides.py b/test/Removed/TargetSignatures/Old/overrides.py
index 54a66d4..54a66d4 100644
--- a/test/Deprecated/TargetSignatures/overrides.py
+++ b/test/Removed/TargetSignatures/Old/overrides.py
diff --git a/test/Removed/TargetSignatures/Old/sconstest.skip b/test/Removed/TargetSignatures/Old/sconstest.skip
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/test/Removed/TargetSignatures/Old/sconstest.skip
diff --git a/test/Removed/TargetSignatures/README.md b/test/Removed/TargetSignatures/README.md
new file mode 100644
index 0000000..00a8b6b
--- /dev/null
+++ b/test/Removed/TargetSignatures/README.md
@@ -0,0 +1,6 @@
+TargetSignatures.py is the "new" test, only makes sure scons actually
+fails in the presence of the method or setoption call.
+
+The Old directory is the former tests from the deprecated state,
+preserved here for reference; the presence of an scontest.skip file
+means they are never executed.
diff --git a/test/Removed/TargetSignatures/SConstruct.method b/test/Removed/TargetSignatures/SConstruct.method
new file mode 100644
index 0000000..5e974b6
--- /dev/null
+++ b/test/Removed/TargetSignatures/SConstruct.method
@@ -0,0 +1 @@
+TargetSignatures('MD5')
diff --git a/test/Removed/TargetSignatures/SConstruct.setopt b/test/Removed/TargetSignatures/SConstruct.setopt
new file mode 100644
index 0000000..c887ce4
--- /dev/null
+++ b/test/Removed/TargetSignatures/SConstruct.setopt
@@ -0,0 +1 @@
+SetOption('warn', 'deprecated-target-signatures')
diff --git a/test/Removed/TargetSignatures/TargetSignatures.py b/test/Removed/TargetSignatures/TargetSignatures.py
new file mode 100644
index 0000000..889f992
--- /dev/null
+++ b/test/Removed/TargetSignatures/TargetSignatures.py
@@ -0,0 +1,57 @@
+#!/usr/bin/env python
+#
+# __COPYRIGHT__
+#
+# Permission is hereby granted, free of charge, to any person obtaining
+# a copy of this software and associated documentation files (the
+# "Software"), to deal in the Software without restriction, including
+# without limitation the rights to use, copy, modify, merge, publish,
+# distribute, sublicense, and/or sell copies of the Software, and to
+# permit persons to whom the Software is furnished to do so, subject to
+# the following conditions:
+#
+# The above copyright notice and this permission notice shall be included
+# in all copies or substantial portions of the Software.
+#
+# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
+# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
+# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+#
+
+__revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
+
+"""
+Test that TargetSignatures and its associated warning flag
+are definitely gone.
+"""
+
+import TestSCons
+
+test = TestSCons.TestSCons()
+
+test.file_fixture('SConstruct.method', 'SConstruct')
+expect = """\
+NameError: name 'TargetSignatures' is not defined:
+ File "{}", line 1:
+ TargetSignatures('MD5')
+""".format(test.workpath('SConstruct'))
+test.run(arguments='-Q -s', status=2, stdout=None, stderr=expect)
+
+test.file_fixture('SConstruct.setopt', 'SConstruct')
+test.run(arguments="-Q -s", status=0, stdout=None,
+ stderr="""\
+No warning type: 'deprecated-target-signatures'
+No warning type: 'deprecated-target-signatures'
+""")
+
+test.pass_test()
+
+# Local Variables:
+# tab-width:4
+# indent-tabs-mode:nil
+# End:
+# vim: set expandtab tabstop=4 shiftwidth=4:
diff --git a/test/implicit-cache/basic.py b/test/implicit-cache/basic.py
index c03a320..7eece88 100644
--- a/test/implicit-cache/basic.py
+++ b/test/implicit-cache/basic.py
@@ -27,11 +27,8 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
"""
Verify basic interactions of the --implicit-cache-* options.
-This test used to set TargetSignatures('build') because we were
-relying on the old behavior of non-essential changes in .h files
-propagate to cause a rebuilt executable. We now just rely on
-the default Decider('content') behavior and only check for the
-rebuild of the object file itself when necessary.
+We rely on the default Decider('content') behavior and only
+check for the rebuild of the object file itself when necessary.
"""
import os.path
diff --git a/test/sconsign/script/Signatures.py b/test/sconsign/script/Signatures.py
index 24ffaf7..34737d5 100644
--- a/test/sconsign/script/Signatures.py
+++ b/test/sconsign/script/Signatures.py
@@ -28,9 +28,6 @@ __revision__ = "__FILE__ __REVISION__ __DATE__ __DEVELOPER__"
Verify that the sconsign script works when using a .sconsign file in
each subdirectory (SConsignFile(None)) written with the non-default
value of Decider('timestamp-newer').
-
-This used to test the non-default combination of
-SourceSignatures('timestamp') with TargetSignatures('content').
"""
import TestSCons
diff --git a/test/srcchange.py b/test/srcchange.py
index f1f67c1..c2356b6 100644
--- a/test/srcchange.py
+++ b/test/srcchange.py
@@ -29,9 +29,8 @@ Test changing the C source files based on an always-executed revision
extraction and substitution.
This makes sure we evaluate the content of intermediate files as
-expected. We used to configure this explicitly using
-TargetSignatures('content') but we now rely on the default behavior
-being the equivalent of Decider('content').
+expected. This relies on the default behavior being the equivalent
+of Decider('content').
"""
import os.path
diff --git a/test/subdivide.py b/test/subdivide.py
index a4a128e..9461d4b 100644
--- a/test/subdivide.py
+++ b/test/subdivide.py
@@ -29,9 +29,8 @@ Verify that rebuilds do not occur when SConsignFile(None) is used to
put a .sconsign file in each directory and we subdvide the dependency
tree with subsidiary *SConstruct* files in various subdirectories.
-This depends on using content signatures for evaluation of intermediate
-Nodes. We used to configure this explicitly using
-TargetSignatures('content'), but we now rely on the default behavior
+This depends on using content signatures for evaluation of
+intermediate Nodes. This relies on the default behavior
being the equivalent of Decider('content').
"""