diff options
author | Steven Knight <knight@baldmt.com> | 2003-04-10 05:35:38 (GMT) |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2003-04-10 05:35:38 (GMT) |
commit | 2f8be7360679ad5e0260f4965ea5dd9506c7b033 (patch) | |
tree | 1379c046e82985011c5ab2d7604adf055e3140b9 /doc | |
parent | 81e5793a07783b29a13004f834b7579a0e1605bb (diff) | |
download | SCons-2f8be7360679ad5e0260f4965ea5dd9506c7b033.zip SCons-2f8be7360679ad5e0260f4965ea5dd9506c7b033.tar.gz SCons-2f8be7360679ad5e0260f4965ea5dd9506c7b033.tar.bz2 |
Implement Tool refactoring. (Chad Austin + Steve Leblanc)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/man/scons.1 | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/doc/man/scons.1 b/doc/man/scons.1 index 75e83d1..a3f35af 100644 --- a/doc/man/scons.1 +++ b/doc/man/scons.1 @@ -844,12 +844,15 @@ will call the specified elements to update the new construction environment: .ES -def my_tool(env, platform): +def my_tool(env): env['XYZZY'] = 'xyzzy' env = Environment(tools = [my_tool]) .EE +The tool definition (i.e. my_tool()) can use the PLATFORM variable from +the environment it receives to customize the tool for different platforms. + If no tool list is specified, then SCons will auto-detect the installed tools using the PATH variable in the ENV construction variable and the platform name when the Environment is constructed. Changing the PATH @@ -2555,6 +2558,20 @@ The prefix used for PDF file names. .IP PDFSUFFIX The suffix used for PDF file names. +.IP PLATFORM +The name of the platform used to create the Environment. If no platform is +specified when the Environment is created, +.B SCons +autodetects the platform. + +.ES +env = Environment(tools = []) +if env['PLATFORM'] == 'cygwin': + Tool('mingw')(env) +else: + Tool('msvc')(env) +.EE + .IP PROGPREFIX The prefix used for executable file names. |