OLD | NEW |
1 # | 1 # |
2 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat
ion | 2 # Copyright (c) 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008 The SCons Foundat
ion |
3 # | 3 # |
4 # Permission is hereby granted, free of charge, to any person obtaining | 4 # Permission is hereby granted, free of charge, to any person obtaining |
5 # a copy of this software and associated documentation files (the | 5 # a copy of this software and associated documentation files (the |
6 # "Software"), to deal in the Software without restriction, including | 6 # "Software"), to deal in the Software without restriction, including |
7 # without limitation the rights to use, copy, modify, merge, publish, | 7 # without limitation the rights to use, copy, modify, merge, publish, |
8 # distribute, sublicense, and/or sell copies of the Software, and to | 8 # distribute, sublicense, and/or sell copies of the Software, and to |
9 # permit persons to whom the Software is furnished to do so, subject to | 9 # permit persons to whom the Software is furnished to do so, subject to |
10 # the following conditions: | 10 # the following conditions: |
11 # | 11 # |
12 # The above copyright notice and this permission notice shall be included | 12 # The above copyright notice and this permission notice shall be included |
13 # in all copies or substantial portions of the Software. | 13 # in all copies or substantial portions of the Software. |
14 # | 14 # |
15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY | 15 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY |
16 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE | 16 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE |
17 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND | 17 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND |
18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE | 18 # NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE |
19 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION | 19 # LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION |
20 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION | 20 # OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION |
21 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. | 21 # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
22 # | 22 # |
23 | 23 |
24 """SCons.Warnings | 24 """SCons.Warnings |
25 | 25 |
26 This file implements the warnings framework for SCons. | 26 This file implements the warnings framework for SCons. |
27 | 27 |
28 """ | 28 """ |
29 | 29 |
30 __revision__ = "src/engine/SCons/Warnings.py 3603 2008/10/10 05:46:45 scons" | 30 __revision__ = "src/engine/SCons/Warnings.py 3842 2008/12/20 22:59:52 scons" |
31 | 31 |
32 import string | 32 import string |
33 import sys | 33 import sys |
34 | 34 |
35 import SCons.Errors | 35 import SCons.Errors |
36 | 36 |
37 class Warning(SCons.Errors.UserError): | 37 class Warning(SCons.Errors.UserError): |
38 pass | 38 pass |
39 | 39 |
40 | 40 |
41 # NOTE: If you add a new warning class, add it to the man page, too! | 41 # NOTE: If you add a new warning class, add it to the man page, too! |
42 | 42 |
43 class CacheWriteErrorWarning(Warning): | 43 class CacheWriteErrorWarning(Warning): |
44 pass | 44 pass |
45 | 45 |
46 class CorruptSConsignWarning(Warning): | 46 class CorruptSConsignWarning(Warning): |
47 pass | 47 pass |
48 | 48 |
49 class DependencyWarning(Warning): | 49 class DependencyWarning(Warning): |
50 pass | 50 pass |
51 | 51 |
52 class DeprecatedWarning(Warning): | 52 class DeprecatedWarning(Warning): |
53 pass | 53 pass |
54 | 54 |
55 class DeprecatedCopyWarning(DeprecatedWarning): | 55 class DeprecatedCopyWarning(DeprecatedWarning): |
56 pass | 56 pass |
57 | 57 |
| 58 class DeprecatedOptionsWarning(DeprecatedWarning): |
| 59 pass |
| 60 |
58 class DeprecatedSourceSignaturesWarning(DeprecatedWarning): | 61 class DeprecatedSourceSignaturesWarning(DeprecatedWarning): |
59 pass | 62 pass |
60 | 63 |
61 class DeprecatedTargetSignaturesWarning(DeprecatedWarning): | 64 class DeprecatedTargetSignaturesWarning(DeprecatedWarning): |
62 pass | 65 pass |
63 | 66 |
64 class DuplicateEnvironmentWarning(Warning): | 67 class DuplicateEnvironmentWarning(Warning): |
65 pass | 68 pass |
66 | 69 |
| 70 class FutureReservedVariableWarning(Warning): |
| 71 pass |
| 72 |
67 class LinkWarning(Warning): | 73 class LinkWarning(Warning): |
68 pass | 74 pass |
69 | 75 |
70 class MisleadingKeywordsWarning(Warning): | 76 class MisleadingKeywordsWarning(Warning): |
71 pass | 77 pass |
72 | 78 |
73 class MissingSConscriptWarning(Warning): | 79 class MissingSConscriptWarning(Warning): |
74 pass | 80 pass |
75 | 81 |
76 class NoMD5ModuleWarning(Warning): | 82 class NoMD5ModuleWarning(Warning): |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 class_name = string.join(map(_capitalize, elems), '') + "Warning" | 184 class_name = string.join(map(_capitalize, elems), '') + "Warning" |
179 try: | 185 try: |
180 clazz = globals()[class_name] | 186 clazz = globals()[class_name] |
181 except KeyError: | 187 except KeyError: |
182 sys.stderr.write("No warning type: '%s'\n" % arg) | 188 sys.stderr.write("No warning type: '%s'\n" % arg) |
183 else: | 189 else: |
184 if enable: | 190 if enable: |
185 enableWarningClass(clazz) | 191 enableWarningClass(clazz) |
186 else: | 192 else: |
187 suppressWarningClass(clazz) | 193 suppressWarningClass(clazz) |
OLD | NEW |