Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(194)

Side by Side Diff: tools/dom/scripts/fremontcutbuilder.py

Issue 16325009: Remove error throw on bad DEFINES (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/python 1 #!/usr/bin/python
2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 2 # Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
3 # for details. All rights reserved. Use of this source code is governed by a 3 # for details. All rights reserved. Use of this source code is governed by a
4 # BSD-style license that can be found in the LICENSE file. 4 # BSD-style license that can be found in the LICENSE file.
5 5
6 import database 6 import database
7 import databasebuilder 7 import databasebuilder
8 import idlparser 8 import idlparser
9 import logging.config 9 import logging.config
10 import os.path 10 import os.path
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
95 95
96 conditionals_met = set( 96 conditionals_met = set(
97 'ENABLE_' + conditional for conditional in builder.conditionals_met) 97 'ENABLE_' + conditional for conditional in builder.conditionals_met)
98 known_conditionals = set(FEATURE_DEFINES + FEATURE_DISABLED) 98 known_conditionals = set(FEATURE_DEFINES + FEATURE_DISABLED)
99 99
100 unused_conditionals = known_conditionals - conditionals_met 100 unused_conditionals = known_conditionals - conditionals_met
101 if unused_conditionals: 101 if unused_conditionals:
102 _logger.warning('There are some unused conditionals %s' % 102 _logger.warning('There are some unused conditionals %s' %
103 sorted(unused_conditionals)) 103 sorted(unused_conditionals))
104 _logger.warning('Please update fremontcutbuilder.py') 104 _logger.warning('Please update fremontcutbuilder.py')
105 raise 'Halt'
106 105
107 unknown_conditionals = conditionals_met - known_conditionals 106 unknown_conditionals = conditionals_met - known_conditionals
108 if unknown_conditionals: 107 if unknown_conditionals:
109 _logger.warning('There are some unknown conditionals %s' % 108 _logger.warning('There are some unknown conditionals %s' %
110 sorted(unknown_conditionals)) 109 sorted(unknown_conditionals))
111 _logger.warning('Please update fremontcutbuilder.py') 110 _logger.warning('Please update fremontcutbuilder.py')
112 raise 'Halt'
113 111
114 db.Save() 112 db.Save()
115 return db 113 return db
116 114
117 def main(parallel=False): 115 def main(parallel=False):
118 current_dir = os.path.dirname(__file__) 116 current_dir = os.path.dirname(__file__)
119 117
120 idl_files = [] 118 idl_files = []
121 119
122 webcore_dir = os.path.join(current_dir, '..', '..', '..', 'third_party', 120 webcore_dir = os.path.join(current_dir, '..', '..', '..', 'third_party',
(...skipping 17 matching lines...) Expand all
140 if ext == '.idl': 138 if ext == '.idl':
141 idl_files.append(file_name) 139 idl_files.append(file_name)
142 140
143 os.path.walk(webcore_dir, visitor, webcore_dir) 141 os.path.walk(webcore_dir, visitor, webcore_dir)
144 142
145 database_dir = os.path.join(current_dir, '..', 'database') 143 database_dir = os.path.join(current_dir, '..', 'database')
146 return build_database(idl_files, database_dir, parallel=parallel) 144 return build_database(idl_files, database_dir, parallel=parallel)
147 145
148 if __name__ == '__main__': 146 if __name__ == '__main__':
149 sys.exit(main()) 147 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698