| OLD | NEW |
| 1 # | 1 # |
| 2 # Copyright (C) 2013 Google Inc. All rights reserved. | 2 # Copyright (C) 2013 Google Inc. All rights reserved. |
| 3 # | 3 # |
| 4 # Redistribution and use in source and binary forms, with or without | 4 # Redistribution and use in source and binary forms, with or without |
| 5 # modification, are permitted provided that the following conditions are | 5 # modification, are permitted provided that the following conditions are |
| 6 # met: | 6 # met: |
| 7 # | 7 # |
| 8 # * Redistributions of source code must retain the above copyright | 8 # * Redistributions of source code must retain the above copyright |
| 9 # notice, this list of conditions and the following disclaimer. | 9 # notice, this list of conditions and the following disclaimer. |
| 10 # * Redistributions in binary form must reproduce the above | 10 # * Redistributions in binary form must reproduce the above |
| (...skipping 19 matching lines...) Expand all Loading... |
| 30 | 30 |
| 31 # Generate IDL bindings, together with auxiliary files | 31 # Generate IDL bindings, together with auxiliary files |
| 32 # (constructors on global objects, aggregate bindings files). | 32 # (constructors on global objects, aggregate bindings files). |
| 33 # | 33 # |
| 34 # Design doc: http://www.chromium.org/developers/design-documents/idl-build | 34 # Design doc: http://www.chromium.org/developers/design-documents/idl-build |
| 35 | 35 |
| 36 { | 36 { |
| 37 'includes': [ | 37 'includes': [ |
| 38 'bindings.gypi', | 38 'bindings.gypi', |
| 39 'idl.gypi', | 39 'idl.gypi', |
| 40 'scripts/scripts.gypi', |
| 41 'templates/templates.gypi', |
| 40 ], | 42 ], |
| 41 | 43 |
| 42 'variables': { | |
| 43 # Python source | |
| 44 'jinja_module_files': [ | |
| 45 # jinja2/__init__.py contains version string, so sufficient for package | |
| 46 '<(DEPTH)/third_party/jinja2/__init__.py', | |
| 47 '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep | |
| 48 ], | |
| 49 'idl_lexer_parser_files': [ | |
| 50 # PLY (Python Lex-Yacc) | |
| 51 '<(DEPTH)/third_party/ply/lex.py', | |
| 52 '<(DEPTH)/third_party/ply/yacc.py', | |
| 53 # Web IDL lexer/parser (base parser) | |
| 54 '<(DEPTH)/tools/idl_parser/idl_lexer.py', | |
| 55 '<(DEPTH)/tools/idl_parser/idl_node.py', | |
| 56 '<(DEPTH)/tools/idl_parser/idl_parser.py', | |
| 57 # Blink IDL lexer/parser/constructor | |
| 58 'scripts/blink_idl_lexer.py', | |
| 59 'scripts/blink_idl_parser.py', | |
| 60 ], | |
| 61 'idl_compiler_files': [ | |
| 62 'scripts/idl_compiler.py', | |
| 63 # Blink IDL front end (ex-lexer/parser) | |
| 64 'scripts/idl_definitions.py', | |
| 65 'scripts/idl_reader.py', | |
| 66 'scripts/idl_validator.py', | |
| 67 'scripts/interface_dependency_resolver.py', | |
| 68 # V8 code generator | |
| 69 'scripts/code_generator_v8.py', | |
| 70 'scripts/v8_attributes.py', | |
| 71 'scripts/v8_callback_interface.py', | |
| 72 'scripts/v8_globals.py', | |
| 73 'scripts/v8_interface.py', | |
| 74 'scripts/v8_methods.py', | |
| 75 'scripts/v8_types.py', | |
| 76 'scripts/v8_utilities.py', | |
| 77 ], | |
| 78 | |
| 79 # Jinja templates | |
| 80 'code_generator_template_files': [ | |
| 81 'templates/attributes.cpp', | |
| 82 'templates/callback_interface.cpp', | |
| 83 'templates/callback_interface.h', | |
| 84 'templates/interface_base.cpp', | |
| 85 'templates/interface.cpp', | |
| 86 'templates/interface.h', | |
| 87 'templates/methods.cpp', | |
| 88 ], | |
| 89 }, | |
| 90 | |
| 91 'targets': [ | 44 'targets': [ |
| 92 ################################################################################ | 45 ################################################################################ |
| 93 { | 46 { |
| 94 # FIXME: Global constructors are used by bindings_core (e.g., V8Window.cpp) | 47 # FIXME: Global constructors are used by bindings_core (e.g., V8Window.cpp) |
| 95 # but depend on modules, which violates layering http://crbug.com/358074 | 48 # but depend on modules, which violates layering http://crbug.com/358074 |
| 96 'target_name': 'global_constructors_idls', | 49 'target_name': 'global_constructors_idls', |
| 97 'type': 'none', | 50 'type': 'none', |
| 98 'actions': [{ | 51 'actions': [{ |
| 99 'action_name': 'generate_global_constructors_idls', | 52 'action_name': 'generate_global_constructors_idls', |
| 100 'inputs': [ | 53 'inputs': [ |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 164 '<(write_file_only_if_changed)', | 117 '<(write_file_only_if_changed)', |
| 165 '--', | 118 '--', |
| 166 # Generated files must be passed at command line | 119 # Generated files must be passed at command line |
| 167 '<@(generated_idl_files)', | 120 '<@(generated_idl_files)', |
| 168 ], | 121 ], |
| 169 'message': 'Computing global information about IDL files', | 122 'message': 'Computing global information about IDL files', |
| 170 }] | 123 }] |
| 171 }, | 124 }, |
| 172 ################################################################################ | 125 ################################################################################ |
| 173 { | 126 { |
| 174 # A separate pre-caching step is *not required* to use lex/parse table | |
| 175 # caching in PLY, as the caches are concurrency-safe. | |
| 176 # However, pre-caching ensures that all compiler processes use the cached | |
| 177 # files (hence maximizing speed), instead of early processes building the | |
| 178 # tables themselves (as they've not yet been written when they start). | |
| 179 'target_name': 'cached_lex_yacc_tables', | |
| 180 'type': 'none', | |
| 181 'actions': [{ | |
| 182 'action_name': 'cache_lex_yacc_tables', | |
| 183 'inputs': [ | |
| 184 '<@(idl_lexer_parser_files)', | |
| 185 ], | |
| 186 'outputs': [ | |
| 187 '<(bindings_output_dir)/lextab.py', | |
| 188 '<(bindings_output_dir)/parsetab.pickle', | |
| 189 ], | |
| 190 'action': [ | |
| 191 'python', | |
| 192 'scripts/blink_idl_parser.py', | |
| 193 '<(bindings_output_dir)', | |
| 194 ], | |
| 195 'message': 'Caching PLY lex & yacc lex/parse tables', | |
| 196 }], | |
| 197 }, | |
| 198 ################################################################################ | |
| 199 { | |
| 200 # A separate pre-caching step is *required* to use bytecode caching in | |
| 201 # Jinja (which improves speed significantly), as the bytecode cache is | |
| 202 # not concurrency-safe on write; details in code_generator_v8.py. | |
| 203 'target_name': 'cached_jinja_templates', | |
| 204 'type': 'none', | |
| 205 'actions': [{ | |
| 206 'action_name': 'cache_jinja_templates', | |
| 207 'inputs': [ | |
| 208 '<@(jinja_module_files)', | |
| 209 'scripts/code_generator_v8.py', | |
| 210 '<@(code_generator_template_files)', | |
| 211 ], | |
| 212 'outputs': [ | |
| 213 '<(bindings_output_dir)/cached_jinja_templates.stamp', # Dummy to track
dependency | |
| 214 ], | |
| 215 'action': [ | |
| 216 'python', | |
| 217 'scripts/code_generator_v8.py', | |
| 218 '<(bindings_output_dir)', | |
| 219 '<(bindings_output_dir)/cached_jinja_templates.stamp', | |
| 220 ], | |
| 221 'message': 'Caching bytecode of Jinja templates', | |
| 222 }], | |
| 223 }, | |
| 224 ################################################################################ | |
| 225 { | |
| 226 'target_name': 'individual_generated_bindings', | 127 'target_name': 'individual_generated_bindings', |
| 227 'type': 'none', | 128 'type': 'none', |
| 228 # The 'binding' rule generates .h files, so mark as hard_dependency, per: | 129 # The 'binding' rule generates .h files, so mark as hard_dependency, per: |
| 229 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependenci
es | 130 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependenci
es |
| 230 'hard_dependency': 1, | 131 'hard_dependency': 1, |
| 231 'dependencies': [ | 132 'dependencies': [ |
| 232 'interfaces_info', | 133 'interfaces_info', |
| 233 'cached_lex_yacc_tables', | 134 'scripts/scripts.gyp:cached_lex_yacc_tables', |
| 234 'cached_jinja_templates', | 135 'scripts/scripts.gyp:cached_jinja_templates', |
| 235 '../core/core_generated.gyp:generated_testing_idls', | 136 '../core/core_generated.gyp:generated_testing_idls', |
| 236 ], | 137 ], |
| 237 'sources': [ | 138 'sources': [ |
| 238 '<@(interface_idl_files)', | 139 '<@(interface_idl_files)', |
| 239 ], | 140 ], |
| 240 'rules': [{ | 141 'rules': [{ |
| 241 'rule_name': 'binding', | 142 'rule_name': 'binding', |
| 242 'extension': 'idl', | 143 'extension': 'idl', |
| 243 'msvs_external_rule': 1, | 144 'msvs_external_rule': 1, |
| 244 'inputs': [ | 145 'inputs': [ |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 288 'target_name': 'bindings_generated', | 189 'target_name': 'bindings_generated', |
| 289 'type': 'none', | 190 'type': 'none', |
| 290 'dependencies': [ | 191 'dependencies': [ |
| 291 # FIXME: split into core and modules http://crbug.com/358074 | 192 # FIXME: split into core and modules http://crbug.com/358074 |
| 292 'individual_generated_bindings', | 193 'individual_generated_bindings', |
| 293 ], | 194 ], |
| 294 }, | 195 }, |
| 295 ################################################################################ | 196 ################################################################################ |
| 296 ], # targets | 197 ], # targets |
| 297 } | 198 } |
| OLD | NEW |