| OLD | NEW |
| 1 """SCons.Variables.PathVariable | 1 """SCons.Variables.PathVariable |
| 2 | 2 |
| 3 This file defines an option type for SCons implementing path settings. | 3 This file defines an option type for SCons implementing path settings. |
| 4 | 4 |
| 5 To be used whenever a a user-specified path override should be allowed. | 5 To be used whenever a a user-specified path override should be allowed. |
| 6 | 6 |
| 7 Arguments to PathVariable are: | 7 Arguments to PathVariable are: |
| 8 option-name = name of this option on the command line (e.g. "prefix") | 8 option-name = name of this option on the command line (e.g. "prefix") |
| 9 option-help = help string for option | 9 option-help = help string for option |
| 10 option-dflt = default value for this option | 10 option-dflt = default value for this option |
| (...skipping 28 matching lines...) Expand all Loading... |
| 39 opts.Add(PathVariable('qt_includes', | 39 opts.Add(PathVariable('qt_includes', |
| 40 'where the Qt includes are installed', | 40 'where the Qt includes are installed', |
| 41 '$qtdir/includes', PathIsDirCreate)) | 41 '$qtdir/includes', PathIsDirCreate)) |
| 42 opts.Add(PathVariable('qt_libraries', | 42 opts.Add(PathVariable('qt_libraries', |
| 43 'where the Qt library is installed', | 43 'where the Qt library is installed', |
| 44 '$qtdir/lib')) | 44 '$qtdir/lib')) |
| 45 | 45 |
| 46 """ | 46 """ |
| 47 | 47 |
| 48 # | 48 # |
| 49 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat
ion | 49 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 The SCons F
oundation |
| 50 # | 50 # |
| 51 # Permission is hereby granted, free of charge, to any person obtaining | 51 # Permission is hereby granted, free of charge, to any person obtaining |
| 52 # a copy of this software and associated documentation files (the | 52 # a copy of this software and associated documentation files (the |
| 53 # "Software"), to deal in the Software without restriction, including | 53 # "Software"), to deal in the Software without restriction, including |
| 54 # without limitation the rights to use, copy, modify, merge, publish, | 54 # without limitation the rights to use, copy, modify, merge, publish, |
| 55 # distribute, sublicense, and/or sell copies of the Software, and to | 55 # distribute, sublicense, and/or sell copies of the Software, and to |
| 56 # permit persons to whom the Software is furnished to do so, subject to | 56 # permit persons to whom the Software is furnished to do so, subject to |
| 57 # the following conditions: | 57 # the following conditions: |
| 58 # | 58 # |
| 59 # The above copyright notice and this permission notice shall be included | 59 # The above copyright notice and this permission notice shall be included |
| 60 # in all copies or substantial portions of the Software. | 60 # in all copies or substantial portions of the Software. |
| 61 # | 61 # |
| 62 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | 62 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY |
| 63 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | 63 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
| 64 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | 64 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
| 65 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | 65 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
| 66 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | 66 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
| 67 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 67 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
| 68 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 68 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
| 69 # | 69 # |
| 70 | 70 |
| 71 __revision__ = "src/engine/SCons/Variables/PathVariable.py 3842 2008/12/20 22:59
:52 scons" | 71 __revision__ = "src/engine/SCons/Variables/PathVariable.py 3897 2009/01/13 06:45
:54 scons" |
| 72 | 72 |
| 73 __all__ = ['PathVariable',] | 73 __all__ = ['PathVariable',] |
| 74 | 74 |
| 75 import os | 75 import os |
| 76 import os.path | 76 import os.path |
| 77 | 77 |
| 78 import SCons.Errors | 78 import SCons.Errors |
| 79 | 79 |
| 80 class _PathVariableClass: | 80 class _PathVariableClass: |
| 81 | 81 |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 validator = self.PathExists | 132 validator = self.PathExists |
| 133 | 133 |
| 134 if SCons.Util.is_List(key) or SCons.Util.is_Tuple(key): | 134 if SCons.Util.is_List(key) or SCons.Util.is_Tuple(key): |
| 135 return (key, '%s ( /path/to/%s )' % (help, key[0]), default, | 135 return (key, '%s ( /path/to/%s )' % (help, key[0]), default, |
| 136 validator, None) | 136 validator, None) |
| 137 else: | 137 else: |
| 138 return (key, '%s ( /path/to/%s )' % (help, key), default, | 138 return (key, '%s ( /path/to/%s )' % (help, key), default, |
| 139 validator, None) | 139 validator, None) |
| 140 | 140 |
| 141 PathVariable = _PathVariableClass() | 141 PathVariable = _PathVariableClass() |
| OLD | NEW |