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

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

Issue 13932010: Blacklist directories to be skipped while searching for IDLs. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 141
142 # Cleanup: 142 # Cleanup:
143 builder.normalize_annotations(['WebKit', 'Dart']) 143 builder.normalize_annotations(['WebKit', 'Dart'])
144 144
145 db.Save() 145 db.Save()
146 return db 146 return db
147 147
148 def main(parallel=False): 148 def main(parallel=False):
149 current_dir = os.path.dirname(__file__) 149 current_dir = os.path.dirname(__file__)
150 150
151 webkit_dirs = [
152 'css',
153 'dom',
154 'fileapi',
155 'html',
156 'html/canvas',
157 'inspector',
158 'loader',
159 'loader/appcache',
160 'Modules/battery',
161 'Modules/filesystem',
162 'Modules/gamepad',
163 'Modules/geolocation',
164 'Modules/indexeddb',
165 'Modules/mediasource',
166 'Modules/mediastream',
167 'Modules/notifications',
168 'Modules/quota',
169 'Modules/speech',
170 'Modules/webaudio',
171 'Modules/webdatabase',
172 'Modules/websockets',
173 'page',
174 'plugins',
175 'storage',
176 'svg',
177 'workers',
178 'xml',
179 ]
180
181 ignored_idls = [ 151 ignored_idls = [
182 'AbstractView.idl', 152 'AbstractView.idl',
183 ] 153 ]
184 154
185 idl_files = [] 155 idl_files = []
186 156
187 webcore_dir = os.path.join(current_dir, '..', '..', '..', 'third_party', 157 webcore_dir = os.path.join(current_dir, '..', '..', '..', 'third_party',
188 'WebCore') 158 'WebCore')
189 if not os.path.exists(webcore_dir): 159 if not os.path.exists(webcore_dir):
190 raise RuntimeError('directory not found: %s' % webcore_dir) 160 raise RuntimeError('directory not found: %s' % webcore_dir)
191 161
192 def visitor(arg, dir_name, names): 162 def visitor(arg, dir_name, names):
163 if os.path.basename(dir_name) in ['bindings', 'testing']:
164 names[:] = [] # Do not go underneath
193 for name in names: 165 for name in names:
194 file_name = os.path.join(dir_name, name) 166 file_name = os.path.join(dir_name, name)
195 (interface, ext) = os.path.splitext(file_name) 167 (interface, ext) = os.path.splitext(file_name)
196 if ext == '.idl' and name not in ignored_idls: 168 if ext == '.idl' and name not in ignored_idls:
197 idl_files.append(file_name) 169 idl_files.append(file_name)
198 170
199 for dir_name in webkit_dirs: 171 os.path.walk(webcore_dir, visitor, webcore_dir)
200 dir_path = os.path.join(webcore_dir, dir_name)
201 os.path.walk(dir_path, visitor, None)
202 172
203 database_dir = os.path.join(current_dir, '..', 'database') 173 database_dir = os.path.join(current_dir, '..', 'database')
204 return build_database(idl_files, database_dir, parallel=parallel) 174 return build_database(idl_files, database_dir, parallel=parallel)
205 175
206 if __name__ == '__main__': 176 if __name__ == '__main__':
207 sys.exit(main()) 177 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