Chromium Code Reviews| 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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 192 webcore_dir = os.path.join(current_dir, '..', '..', '..', | 192 webcore_dir = os.path.join(current_dir, '..', '..', '..', |
| 193 'third_party', 'WebCore') | 193 'third_party', 'WebCore') |
| 194 if not os.path.exists(webcore_dir): | 194 if not os.path.exists(webcore_dir): |
| 195 raise RuntimeError('directory not found: %s' % webcore_dir) | 195 raise RuntimeError('directory not found: %s' % webcore_dir) |
| 196 | 196 |
| 197 def visitor(arg, dir_name, names): | 197 def visitor(arg, dir_name, names): |
| 198 for name in names: | 198 for name in names: |
| 199 file_name = os.path.join(dir_name, name) | 199 file_name = os.path.join(dir_name, name) |
| 200 (interface, ext) = os.path.splitext(file_name) | 200 (interface, ext) = os.path.splitext(file_name) |
| 201 if ext == '.idl' and not name.startswith('._'): | 201 if ext == '.idl' and not name.startswith('._'): |
| 202 idl_files.add(file_name) | 202 idl_files.append(file_name) |
|
Anton Muhin
2012/04/17 11:05:58
thanks a lot and sorry
| |
| 203 | 203 |
| 204 for dir_name in webkit_dirs: | 204 for dir_name in webkit_dirs: |
| 205 dir_path = os.path.join(webcore_dir, dir_name) | 205 dir_path = os.path.join(webcore_dir, dir_name) |
| 206 os.path.walk(dir_path, visitor, None) | 206 os.path.walk(dir_path, visitor, None) |
| 207 | 207 |
| 208 database_dir = os.path.join(current_dir, '..', 'database') | 208 database_dir = os.path.join(current_dir, '..', 'database') |
| 209 return build_database(idl_files, database_dir) | 209 return build_database(idl_files, database_dir) |
| 210 | 210 |
| 211 if __name__ == '__main__': | 211 if __name__ == '__main__': |
| 212 sys.exit(main()) | 212 sys.exit(main()) |
| OLD | NEW |