| OLD | NEW |
| 1 """SCons.Tool | 1 """SCons.Tool |
| 2 | 2 |
| 3 SCons tool selection. | 3 SCons tool selection. |
| 4 | 4 |
| 5 This looks for modules that define a callable object that can modify | 5 This looks for modules that define a callable object that can modify |
| 6 a construction environment as appropriate for a given tool (or tool | 6 a construction environment as appropriate for a given tool (or tool |
| 7 chain). | 7 chain). |
| 8 | 8 |
| 9 Note that because this subsystem just *selects* a callable that can | 9 Note that because this subsystem just *selects* a callable that can |
| 10 modify a construction environment, it's possible for people to define | 10 modify a construction environment, it's possible for people to define |
| 11 their own "tool specification" in an arbitrary callable function. No | 11 their own "tool specification" in an arbitrary callable function. No |
| 12 one needs to use or tie in to this subsystem in order to roll their own | 12 one needs to use or tie in to this subsystem in order to roll their own |
| 13 tool definition. | 13 tool definition. |
| 14 """ | 14 """ |
| 15 | 15 |
| 16 # | 16 # |
| 17 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat
ion | 17 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons F
oundation |
| 18 # | 18 # |
| 19 # Permission is hereby granted, free of charge, to any person obtaining | 19 # Permission is hereby granted, free of charge, to any person obtaining |
| 20 # a copy of this software and associated documentation files (the | 20 # a copy of this software and associated documentation files (the |
| 21 # "Software"), to deal in the Software without restriction, including | 21 # "Software"), to deal in the Software without restriction, including |
| 22 # without limitation the rights to use, copy, modify, merge, publish, | 22 # without limitation the rights to use, copy, modify, merge, publish, |
| 23 # distribute, sublicense, and/or sell copies of the Software, and to | 23 # distribute, sublicense, and/or sell copies of the Software, and to |
| 24 # permit persons to whom the Software is furnished to do so, subject to | 24 # permit persons to whom the Software is furnished to do so, subject to |
| 25 # the following conditions: | 25 # the following conditions: |
| 26 # | 26 # |
| 27 # The above copyright notice and this permission notice shall be included | 27 # The above copyright notice and this permission notice shall be included |
| 28 # in all copies or substantial portions of the Software. | 28 # in all copies or substantial portions of the Software. |
| 29 # | 29 # |
| 30 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | 30 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY |
| 31 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | 31 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
| 32 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | 32 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 33 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | 33 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| 34 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | 34 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 35 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 35 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 36 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 36 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 37 # | 37 # |
| 38 | 38 |
| 39 __revision__ = "src/engine/SCons/Tool/__init__.py 3842 2008/12/20 22:59:52 scons
" | 39 __revision__ = "src/engine/SCons/Tool/__init__.py 3897 2009/01/13 06:45:54 scons
" |
| 40 | 40 |
| 41 import imp | 41 import imp |
| 42 import sys | 42 import sys |
| 43 | 43 |
| 44 import SCons.Builder | 44 import SCons.Builder |
| 45 import SCons.Errors | 45 import SCons.Errors |
| 46 import SCons.Node.FS | 46 import SCons.Node.FS |
| 47 import SCons.Scanner | 47 import SCons.Scanner |
| 48 import SCons.Scanner.C | 48 import SCons.Scanner.C |
| 49 import SCons.Scanner.D | 49 import SCons.Scanner.D |
| (...skipping 215 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 If it is already there, we return the existing one. | 265 If it is already there, we return the existing one. |
| 266 """ | 266 """ |
| 267 | 267 |
| 268 try: | 268 try: |
| 269 ld_module = env['BUILDERS']['LoadableModule'] | 269 ld_module = env['BUILDERS']['LoadableModule'] |
| 270 except KeyError: | 270 except KeyError: |
| 271 import SCons.Defaults | 271 import SCons.Defaults |
| 272 action_list = [ SCons.Defaults.SharedCheck, | 272 action_list = [ SCons.Defaults.SharedCheck, |
| 273 SCons.Defaults.LdModuleLinkAction ] | 273 SCons.Defaults.LdModuleLinkAction ] |
| 274 ld_module = SCons.Builder.Builder(action = action_list, | 274 ld_module = SCons.Builder.Builder(action = action_list, |
| 275 emitter = "$SHLIBEMITTER", | 275 emitter = "$LDMODULEEMITTER", |
| 276 prefix = '$LDMODULEPREFIX', | 276 prefix = '$LDMODULEPREFIX', |
| 277 suffix = '$LDMODULESUFFIX', | 277 suffix = '$LDMODULESUFFIX', |
| 278 target_scanner = ProgramScanner, | 278 target_scanner = ProgramScanner, |
| 279 src_suffix = '$SHOBJSUFFIX', | 279 src_suffix = '$SHOBJSUFFIX', |
| 280 src_builder = 'SharedObject') | 280 src_builder = 'SharedObject') |
| 281 env['BUILDERS']['LoadableModule'] = ld_module | 281 env['BUILDERS']['LoadableModule'] = ld_module |
| 282 | 282 |
| 283 return ld_module | 283 return ld_module |
| 284 | 284 |
| 285 def createObjBuilders(env): | 285 def createObjBuilders(env): |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 658 'swig', | 658 'swig', |
| 659 'tar', 'tex', | 659 'tar', 'tex', |
| 660 'yacc', 'zip', 'rpm', 'wix'], | 660 'yacc', 'zip', 'rpm', 'wix'], |
| 661 env) | 661 env) |
| 662 | 662 |
| 663 tools = ([linker, c_compiler, cxx_compiler, | 663 tools = ([linker, c_compiler, cxx_compiler, |
| 664 fortran_compiler, assembler, ar] | 664 fortran_compiler, assembler, ar] |
| 665 + other_tools) | 665 + other_tools) |
| 666 | 666 |
| 667 return filter(lambda x: x, tools) | 667 return filter(lambda x: x, tools) |
| OLD | NEW |