OLD | NEW |
1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 # Generate IDL bindings for modules, plus aggregate bindings files. | 5 # Generate IDL bindings for modules, plus aggregate bindings files. |
6 # | 6 # |
7 # Design doc: http://www.chromium.org/developers/design-documents/idl-build | 7 # Design doc: http://www.chromium.org/developers/design-documents/idl-build |
8 | 8 |
9 { | 9 { |
10 'includes': [ | 10 'includes': [ |
11 # ../../.. == Source | 11 # ../../.. == Source |
12 '../../../bindings/bindings.gypi', | 12 '../../../bindings/bindings.gypi', |
13 '../../../bindings/modules/idl.gypi', | 13 '../../../bindings/modules/idl.gypi', |
14 '../../../bindings/modules/modules.gypi', | 14 '../../../bindings/modules/modules.gypi', |
15 '../../../bindings/scripts/scripts.gypi', | 15 '../../../bindings/scripts/scripts.gypi', |
| 16 # Need to know core idl files list to generate parital interfaces |
| 17 # defined in modules. |
| 18 '../../../core/core.gypi', |
16 '../../../modules/modules.gypi', | 19 '../../../modules/modules.gypi', |
17 'generated.gypi', | 20 'generated.gypi', |
18 ], | 21 ], |
19 | 22 |
20 'targets': [ | 23 'targets': [ |
21 ################################################################################ | 24 ################################################################################ |
22 { | 25 { |
23 'target_name': 'bindings_modules_v8_generated_individual', | 26 'target_name': 'bindings_modules_v8_generated_individual', |
24 'type': 'none', | 27 'type': 'none', |
25 # The 'binding' rule generates .h files, so mark as hard_dependency, per: | 28 # The 'binding' rule generates .h files, so mark as hard_dependency, per: |
(...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 '--write-file-only-if-changed', | 151 '--write-file-only-if-changed', |
149 '<(write_file_only_if_changed)', | 152 '<(write_file_only_if_changed)', |
150 '--generate-dictionary-impl', | 153 '--generate-dictionary-impl', |
151 '<(modules_dictionary_idl_files_list)', | 154 '<(modules_dictionary_idl_files_list)', |
152 ], | 155 ], |
153 'message': 'Generating modules IDL dictionary impl classes', | 156 'message': 'Generating modules IDL dictionary impl classes', |
154 }], | 157 }], |
155 }, | 158 }, |
156 ################################################################################ | 159 ################################################################################ |
157 { | 160 { |
| 161 'target_name': 'bindings_modules_v8_generated_partial_individual', |
| 162 'type': 'none', |
| 163 # The 'partial_binding' rule generates .h files, so mark as hard_dependency,
per: |
| 164 # https://code.google.com/p/gyp/wiki/InputFormatReference#Linking_Dependenci
es |
| 165 'hard_dependency': 1, |
| 166 'dependencies': [ |
| 167 '../../core/generated.gyp:core_global_constructors_idls', |
| 168 '../generated.gyp:modules_global_constructors_idls', |
| 169 '../generated.gyp:interfaces_info', |
| 170 '<(bindings_scripts_dir)/scripts.gyp:cached_jinja_templates', |
| 171 '<(bindings_scripts_dir)/scripts.gyp:cached_lex_yacc_tables', |
| 172 ], |
| 173 # We need to generate partial interface code for normal modules and also for
testing. |
| 174 # i.e. parital interface Internals. |
| 175 'sources': [ |
| 176 '<@(core_idl_with_modules_dependency_files)', |
| 177 '<@(webcore_testing_idl_with_modules_dependency_files)', |
| 178 ], |
| 179 'rules': [{ |
| 180 'rule_name': 'partial_binding', |
| 181 'extension': 'idl', |
| 182 'msvs_external_rule': 1, |
| 183 'inputs': [ |
| 184 '<@(idl_lexer_parser_files)', # to be explicit (covered by parsetab) |
| 185 '<@(idl_compiler_files)', |
| 186 '<(bindings_scripts_output_dir)/lextab.py', |
| 187 '<(bindings_scripts_output_dir)/parsetab.pickle', |
| 188 '<(bindings_scripts_output_dir)/cached_jinja_templates.stamp', |
| 189 '<(bindings_dir)/IDLExtendedAttributes.txt', |
| 190 # If the dependency structure or public interface info (e.g., |
| 191 # [ImplementedAs]) changes, we rebuild all files, since we're not |
| 192 # computing dependencies file-by-file in the build. |
| 193 # This data is generally stable. |
| 194 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
| 195 # Further, if any dependency (partial interface or implemented |
| 196 # interface) changes, rebuild everything, since every IDL potentially |
| 197 # depends on them, because we're not computing dependencies |
| 198 # file-by-file. |
| 199 # FIXME: This is too conservative, and causes excess rebuilds: |
| 200 # compute this file-by-file. http://crbug.com/341748 |
| 201 '<@(all_dependency_idl_files)', |
| 202 '<@(webcore_testing_idl_files)', |
| 203 ], |
| 204 'outputs': [ |
| 205 '<(bindings_modules_v8_output_dir)/V8<(RULE_INPUT_ROOT)Partial.cpp', |
| 206 '<(bindings_modules_v8_output_dir)/V8<(RULE_INPUT_ROOT)Partial.h', |
| 207 ], |
| 208 # sanitize-win-build-log.sed uses a regex which matches this command |
| 209 # line (Python script + .idl file being processed). |
| 210 # Update that regex if command line changes (other than changing flags) |
| 211 'action': [ |
| 212 'python', |
| 213 '-S', # skip 'import site' to speed up startup |
| 214 '<(bindings_scripts_dir)/idl_compiler.py', |
| 215 '--cache-dir', |
| 216 '<(bindings_scripts_output_dir)', |
| 217 '--output-dir', |
| 218 '<(bindings_modules_v8_output_dir)', |
| 219 '--interfaces-info', |
| 220 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
| 221 '--write-file-only-if-changed', |
| 222 '<(write_file_only_if_changed)', |
| 223 '--target-component', |
| 224 'modules', |
| 225 '<(RULE_INPUT_PATH)', |
| 226 ], |
| 227 'message': 'Generating partial binding from <(RULE_INPUT_PATH)', |
| 228 }], |
| 229 }, |
| 230 ################################################################################ |
| 231 { |
| 232 'target_name': 'bindings_modules_v8_generated_partial_aggregate', |
| 233 'type': 'none', |
| 234 'actions': [{ |
| 235 'action_name': 'generate_aggregate_bindings_modules_v8_partial', |
| 236 'inputs': [ |
| 237 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', |
| 238 '<(core_idl_with_modules_dependency_files_list)', |
| 239 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
| 240 ], |
| 241 'outputs': [ |
| 242 '<@(bindings_modules_v8_generated_partial_aggregate_files)', |
| 243 ], |
| 244 'action': [ |
| 245 'python', |
| 246 '<(bindings_scripts_dir)/aggregate_generated_bindings.py', |
| 247 'modules', |
| 248 '<(core_idl_with_modules_dependency_files_list)', |
| 249 '--', |
| 250 '<@(bindings_modules_v8_generated_partial_aggregate_files)', |
| 251 ], |
| 252 'message': 'Generating aggregate generated modules V8 partial bindings fil
es', |
| 253 }], |
| 254 }, |
| 255 ################################################################################ |
| 256 { |
| 257 'target_name': 'bindings_modules_v8_generated_init_partial', |
| 258 'type': 'none', |
| 259 'actions': [{ |
| 260 'action_name': 'generate_bindings_modules_v8_init_partial', |
| 261 'inputs': [ |
| 262 '<(bindings_scripts_dir)/generate_init_partial_interfaces.py', |
| 263 '<(core_idl_with_modules_dependency_files_list)', |
| 264 '<(bindings_modules_output_dir)/InterfacesInfoModules.pickle', |
| 265 ], |
| 266 'outputs': [ |
| 267 '<(bindings_modules_v8_output_dir)/InitModulesForPartialInterfaces.cpp', |
| 268 ], |
| 269 'action': [ |
| 270 'python', |
| 271 '<(bindings_scripts_dir)/generate_init_partial_interfaces.py', |
| 272 '--idl-files-list', |
| 273 '<(core_idl_with_modules_dependency_files_list)', |
| 274 '--output', |
| 275 '<(bindings_modules_v8_output_dir)/InitModulesForPartialInterfaces.cpp', |
| 276 '--write-file-only-if-changed', |
| 277 '<(write_file_only_if_changed)', |
| 278 ], |
| 279 }], |
| 280 }, |
| 281 ################################################################################ |
| 282 { |
158 'target_name': 'bindings_modules_v8_generated', | 283 'target_name': 'bindings_modules_v8_generated', |
159 'type': 'none', | 284 'type': 'none', |
160 'dependencies': [ | 285 'dependencies': [ |
161 'bindings_modules_dictionary_impl_generated', | 286 'bindings_modules_dictionary_impl_generated', |
162 'bindings_modules_v8_generated_aggregate', | 287 'bindings_modules_v8_generated_aggregate', |
163 'bindings_modules_v8_generated_individual', | 288 'bindings_modules_v8_generated_individual', |
| 289 'bindings_modules_v8_generated_init_partial', |
| 290 'bindings_modules_v8_generated_partial_aggregate', |
| 291 'bindings_modules_v8_generated_partial_individual', |
164 ], | 292 ], |
165 }, | 293 }, |
166 ################################################################################ | 294 ################################################################################ |
167 ], # targets | 295 ], # targets |
168 } | 296 } |
OLD | NEW |