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

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

Issue 14251017: Distinguish between common and dart2js specific monitored. (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 | tools/dom/scripts/generator.py » ('j') | 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 """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 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 template_loader, backend_factory) 125 template_loader, backend_factory)
126 cpp_library_emitter.EmitDerivedSources( 126 cpp_library_emitter.EmitDerivedSources(
127 template_loader.Load('cpp_derived_sources.template'), 127 template_loader.Load('cpp_derived_sources.template'),
128 dartium_output_dir) 128 dartium_output_dir)
129 cpp_library_emitter.EmitResolver( 129 cpp_library_emitter.EmitResolver(
130 template_loader.Load('cpp_resolver.template'), dartium_output_dir) 130 template_loader.Load('cpp_resolver.template'), dartium_output_dir)
131 131
132 _logger.info('Flush...') 132 _logger.info('Flush...')
133 emitters.Flush() 133 emitters.Flush()
134 134
135 monitored.FinishMonitoring() 135 monitored.FinishMonitoring(dart2js_output_dir)
136 136
137 def GenerateSingleFile(library_path, output_dir, generated_output_dir=None): 137 def GenerateSingleFile(library_path, output_dir, generated_output_dir=None):
138 library_dir = os.path.dirname(library_path) 138 library_dir = os.path.dirname(library_path)
139 library_filename = os.path.basename(library_path) 139 library_filename = os.path.basename(library_path)
140 copy_dart_script = os.path.relpath('../../copy_dart.py', 140 copy_dart_script = os.path.relpath('../../copy_dart.py',
141 library_dir) 141 library_dir)
142 output_dir = os.path.relpath(output_dir, library_dir) 142 output_dir = os.path.relpath(output_dir, library_dir)
143 command = ' '.join(['cd', library_dir, ';', 143 command = ' '.join(['cd', library_dir, ';',
144 copy_dart_script, output_dir, library_filename]) 144 copy_dart_script, output_dir, library_filename])
145 subprocess.call([command], shell=True) 145 subprocess.call([command], shell=True)
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
199 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js')) 199 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dart2js'))
200 if 'htmldartium' in systems: 200 if 'htmldartium' in systems:
201 _logger.info('Generating dartium single files.') 201 _logger.info('Generating dartium single files.')
202 for library_name in HTML_LIBRARY_NAMES: 202 for library_name in HTML_LIBRARY_NAMES:
203 GenerateSingleFile( 203 GenerateSingleFile(
204 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name), 204 os.path.join(dartium_output_dir, '%s_dartium.dart' % library_name),
205 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium')) 205 os.path.join('..', '..', '..', 'sdk', 'lib', library_name, 'dartium'))
206 206
207 if __name__ == '__main__': 207 if __name__ == '__main__':
208 sys.exit(main()) 208 sys.exit(main())
OLDNEW
« no previous file with comments | « no previous file | tools/dom/scripts/generator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698