summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/SCons/Platform/__init__.py13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/engine/SCons/Platform/__init__.py b/src/engine/SCons/Platform/__init__.py
index e1066f0..81a49e7 100644
--- a/src/engine/SCons/Platform/__init__.py
+++ b/src/engine/SCons/Platform/__init__.py
@@ -120,14 +120,18 @@ def DefaultToolList(platform, env):
"""
return SCons.Tool.tool_list(platform, env)
-class PlatformSpec:
- def __init__(self, name):
+class PlatformSpec(object):
+ def __init__(self, name, generate):
self.name = name
+ self.generate = generate
+
+ def __call__(self, *args, **kw):
+ return self.generate(*args, **kw)
def __str__(self):
return self.name
-class TempFileMunge:
+class TempFileMunge(object):
"""A callable class. You can set an Environment variable to this,
then call it with a string argument, then it will perform temporary
file substitution on it. This is used to circumvent the long command
@@ -227,8 +231,7 @@ def Platform(name = platform_default()):
"""Select a canned Platform specification.
"""
module = platform_module(name)
- spec = PlatformSpec(name)
- spec.__call__ = module.generate
+ spec = PlatformSpec(name, module.generate)
return spec
# Local Variables: