| OLD | NEW |
| 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 167 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 178 'workers', | 178 'workers', |
| 179 'xml', | 179 'xml', |
| 180 ] | 180 ] |
| 181 | 181 |
| 182 ignored_idls = [ | 182 ignored_idls = [ |
| 183 'AbstractView.idl', | 183 'AbstractView.idl', |
| 184 ] | 184 ] |
| 185 | 185 |
| 186 idl_files = [] | 186 idl_files = [] |
| 187 | 187 |
| 188 webcore_dir = os.path.join(current_dir, '..', '..', '..', '..', | 188 webcore_dir = os.path.join(current_dir, '..', '..', '..', 'third_party', |
| 189 'third_party', 'WebCore') | 189 'WebCore') |
| 190 if not os.path.exists(webcore_dir): | 190 if not os.path.exists(webcore_dir): |
| 191 raise RuntimeError('directory not found: %s' % webcore_dir) | 191 raise RuntimeError('directory not found: %s' % webcore_dir) |
| 192 | 192 |
| 193 def visitor(arg, dir_name, names): | 193 def visitor(arg, dir_name, names): |
| 194 for name in names: | 194 for name in names: |
| 195 file_name = os.path.join(dir_name, name) | 195 file_name = os.path.join(dir_name, name) |
| 196 (interface, ext) = os.path.splitext(file_name) | 196 (interface, ext) = os.path.splitext(file_name) |
| 197 if ext == '.idl' and name not in ignored_idls: | 197 if ext == '.idl' and name not in ignored_idls: |
| 198 idl_files.append(file_name) | 198 idl_files.append(file_name) |
| 199 | 199 |
| 200 for dir_name in webkit_dirs: | 200 for dir_name in webkit_dirs: |
| 201 dir_path = os.path.join(webcore_dir, dir_name) | 201 dir_path = os.path.join(webcore_dir, dir_name) |
| 202 os.path.walk(dir_path, visitor, None) | 202 os.path.walk(dir_path, visitor, None) |
| 203 | 203 |
| 204 database_dir = os.path.join(current_dir, '..', 'database') | 204 database_dir = os.path.join(current_dir, '..', 'database') |
| 205 return build_database(idl_files, database_dir, parallel=parallel) | 205 return build_database(idl_files, database_dir, parallel=parallel) |
| 206 | 206 |
| 207 if __name__ == '__main__': | 207 if __name__ == '__main__': |
| 208 sys.exit(main()) | 208 sys.exit(main()) |
| OLD | NEW |