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 """This is the entry point to create Dart APIs from the IDL database.""" | 6 """This is the entry point to create Dart APIs from the IDL database.""" |
7 | 7 |
8 import dartgenerator | 8 import dartgenerator |
9 import database | 9 import database |
10 import fremontcutbuilder | 10 import fremontcutbuilder |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 default=False, | 193 default=False, |
194 help='''Update the metadata list of DOM APIs''') | 194 help='''Update the metadata list of DOM APIs''') |
195 (options, args) = parser.parse_args() | 195 (options, args) = parser.parse_args() |
196 | 196 |
197 current_dir = os.path.dirname(__file__) | 197 current_dir = os.path.dirname(__file__) |
198 database_dir = os.path.join(current_dir, '..', 'database') | 198 database_dir = os.path.join(current_dir, '..', 'database') |
199 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf')) | 199 logging.config.fileConfig(os.path.join(current_dir, 'logging.conf')) |
200 systems = options.systems.split(',') | 200 systems = options.systems.split(',') |
201 | 201 |
202 output_dir = options.output_dir or os.path.join( | 202 output_dir = options.output_dir or os.path.join( |
203 current_dir, '..', '..', utils.GetBuildDir(utils.GuessOS(), None), | 203 current_dir, '..', '..', utils.GetBuildDir(utils.GuessOS()), |
204 'generated') | 204 'generated') |
205 | 205 |
206 dart2js_output_dir = None | 206 dart2js_output_dir = None |
207 if 'htmldart2js' in systems: | 207 if 'htmldart2js' in systems: |
208 dart2js_output_dir = os.path.join(output_dir, 'dart2js') | 208 dart2js_output_dir = os.path.join(output_dir, 'dart2js') |
209 dartium_output_dir = None | 209 dartium_output_dir = None |
210 if 'htmldartium' in systems: | 210 if 'htmldartium' in systems: |
211 dartium_output_dir = os.path.join(output_dir, 'dartium') | 211 dartium_output_dir = os.path.join(output_dir, 'dartium') |
212 | 212 |
213 if options.rebuild: | 213 if options.rebuild: |
(...skipping 16 matching lines...) Expand all Loading... |
230 for library_name in HTML_LIBRARY_NAMES: | 230 for library_name in HTML_LIBRARY_NAMES: |
231 GenerateSingleFile( | 231 GenerateSingleFile( |
232 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), | 232 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), |
233 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) | 233 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) |
234 GenerateSingleFile( | 234 GenerateSingleFile( |
235 os.path.join(dartium_output_dir, '_blink_dartium.dart'), | 235 os.path.join(dartium_output_dir, '_blink_dartium.dart'), |
236 os.path.join('..', '..', '..', 'sdk', 'lib', '_blink', 'dartium')) | 236 os.path.join('..', '..', '..', 'sdk', 'lib', '_blink', 'dartium')) |
237 | 237 |
238 if __name__ == '__main__': | 238 if __name__ == '__main__': |
239 sys.exit(main()) | 239 sys.exit(main()) |
OLD | NEW |