| OLD | NEW |
| 1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
| 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 2 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
| 4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
| 5 | 5 |
| 6 import collections | 6 import collections |
| 7 import fnmatch | 7 import fnmatch |
| 8 import optparse | 8 import optparse |
| 9 import os | 9 import os |
| 10 import sys | 10 import sys |
| 11 | 11 |
| 12 VALID_TOOLCHAINS = ['newlib', 'glibc', 'pnacl', 'win', 'linux', 'mac'] |
| 13 |
| 12 # 'KEY' : ( <TYPE>, [Accepted Values], <Required?>) | 14 # 'KEY' : ( <TYPE>, [Accepted Values], <Required?>) |
| 13 DSC_FORMAT = { | 15 DSC_FORMAT = { |
| 14 'DISABLE': (bool, [True, False], False), | 16 'DISABLE': (bool, [True, False], False), |
| 15 'DISABLE_PACKAGE': (bool, [True, False], False), | 17 'DISABLE_PACKAGE': (bool, [True, False], False), |
| 16 'TOOLS' : (list, ['newlib:arm', 'newlib:x64', 'newlib:x86', 'newlib', | 18 'TOOLS' : (list, VALID_TOOLCHAINS, True), |
| 17 'glibc', 'pnacl', 'win', 'linux'], True), | |
| 18 'CONFIGS' : (list, ['Debug', 'Release'], False), | 19 'CONFIGS' : (list, ['Debug', 'Release'], False), |
| 19 'PREREQ' : (list, '', False), | 20 'PREREQ' : (list, '', False), |
| 20 'TARGETS' : (list, { | 21 'TARGETS' : (list, { |
| 21 'NAME': (str, '', True), | 22 'NAME': (str, '', True), |
| 22 # main = nexe target | 23 # main = nexe target |
| 23 # lib = library target | 24 # lib = library target |
| 24 # so = shared object target, automatically added to NMF | 25 # so = shared object target, automatically added to NMF |
| 25 # so-standalone = shared object target, not put into NMF | 26 # so-standalone = shared object target, not put into NMF |
| 26 'TYPE': (str, ['main', 'lib', 'static-lib', 'so', 'so-standalone'], | 27 'TYPE': (str, ['main', 'lib', 'static-lib', 'so', 'so-standalone'], |
| 27 True), | 28 True), |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 except ValidationError as e: | 224 except ValidationError as e: |
| 224 sys.stderr.write(str(e) + '\n') | 225 sys.stderr.write(str(e) + '\n') |
| 225 return 1 | 226 return 1 |
| 226 | 227 |
| 227 PrintProjectTree(tree) | 228 PrintProjectTree(tree) |
| 228 return 0 | 229 return 0 |
| 229 | 230 |
| 230 | 231 |
| 231 if __name__ == '__main__': | 232 if __name__ == '__main__': |
| 232 sys.exit(main(sys.argv)) | 233 sys.exit(main(sys.argv)) |
| OLD | NEW |