.IP TEXFLAGS
General options passed to the TeX formatter and typesetter.
+.IP TOOLS
+A list of the names of the Tool specifications
+that are part of this construction environment.
+
.IP WIN32_INSERT_DEF
When this is set to true,
a library build of a WIN32 shared library (.dll file)
env = Environment(tools = [ Tool('msvc') ])
.EE
+The object may be called with a construction
+environment as an argument,
+in which case the object will be
+add the necessary variables
+to the construction environment
+and the name of the tool will be added to the
+.B $TOOLS
+construction variable.
+
+.ES
+env = Environment()
+t = Tool('msvc')
+t(env) # adds 'msvc' to the TOOLS variable
+.EE
+
.TP
.RI Value( value )
Returns a Node object representing the specified Python value. Value
- Contribute the "Autoscons" code for Autoconf-like checking for
the existence of libraries, header files and the like.
+ - Have the Tool() function add the tool name to the $TOOLS
+ construction variable.
+
From Greg Spencer:
- Support the C preprocessor #import statement.
if not SCons.Util.is_List(progs):
progs = [ progs ]
return progs[0]
+ def Append(self, **kw):
+ self.dict.update(kw)
def __getitem__(self, key):
return self.dict[key]
def __setitem__(self, key, val):
assert (env['CXX'] == 'c++' or env['CXX'] == 'g++'), env['CXX']
assert env['CXXFLAGS'] == '$CCFLAGS', env['CXXFLAGS']
assert env['INCPREFIX'] == '-I', env['INCPREFIX']
+ assert env['TOOLS'] == ['g++'], env['TOOLS']
try:
SCons.Tool.Tool()
def __init__(self, name):
self.name = name
+ def __call__(self, env, *args, **kw):
+ env.Append(TOOLS = [ self.name ])
+ apply(self.generate, ( env, ) + args, kw)
+
def __str__(self):
return self.name
if file:
file.close()
spec = ToolSpec(name)
- spec.__call__ = sys.modules[full_name].generate
+ spec.generate = sys.modules[full_name].generate
spec.exists = sys.modules[full_name].exists
return spec