diff options
| author | Steven Knight <knight@baldmt.com> | 2003-02-22 16:17:24 (GMT) |
|---|---|---|
| committer | Steven Knight <knight@baldmt.com> | 2003-02-22 16:17:24 (GMT) |
| commit | 97af32a2c590938ddb9967776c65caab1ad9a2dd (patch) | |
| tree | 2659a65c21712cd69214ba365c50927a781df876 /src/engine/SCons/Environment.py | |
| parent | 2a95aa36269ad195a3579382889489cc3b1bac0f (diff) | |
| download | SCons-97af32a2c590938ddb9967776c65caab1ad9a2dd.zip SCons-97af32a2c590938ddb9967776c65caab1ad9a2dd.tar.gz SCons-97af32a2c590938ddb9967776c65caab1ad9a2dd.tar.bz2 | |
Warn when the user tries to set TARGET[S] or SOURCE[S] in an Environment.
Diffstat (limited to 'src/engine/SCons/Environment.py')
| -rw-r--r-- | src/engine/SCons/Environment.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/engine/SCons/Environment.py b/src/engine/SCons/Environment.py index 54c91bb..6857109 100644 --- a/src/engine/SCons/Environment.py +++ b/src/engine/SCons/Environment.py @@ -315,7 +315,13 @@ class Environment: return dlist def __setitem__(self, key, value): - if key == 'BUILDERS': + if key == 'TARGET' or \ + key == 'TARGETS' or \ + key == 'SOURCE' or \ + key == 'SOURCES': + SCons.Warnings.warn(SCons.Warnings.ReservedVariableWarning, + "Ignoring attempt to set reserved variable `%s'" % key) + elif key == 'BUILDERS': try: bd = self._dict[key] for k in bd.keys(): |
