summaryrefslogtreecommitdiffstats
path: root/src/engine/SCons/Environment.py
diff options
context:
space:
mode:
authorSteven Knight <knight@baldmt.com>2003-02-22 16:17:24 (GMT)
committerSteven Knight <knight@baldmt.com>2003-02-22 16:17:24 (GMT)
commit97af32a2c590938ddb9967776c65caab1ad9a2dd (patch)
tree2659a65c21712cd69214ba365c50927a781df876 /src/engine/SCons/Environment.py
parent2a95aa36269ad195a3579382889489cc3b1bac0f (diff)
downloadSCons-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.py8
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():