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 17 matching lines...) Expand all Loading... | |
28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | 28 # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
29 # | 29 # |
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 'idl.gypi', |
Nils Barth (inactive)
2014/05/26 05:51:11
! All we care about is the list of IDL files !
| |
39 '../core/core.gypi', | |
40 '../modules/modules.gypi', | |
41 ], | 39 ], |
42 | 40 |
43 'variables': { | 41 'variables': { |
44 # IDL file lists; see: http://www.chromium.org/developers/web-idl-interfaces | |
45 # | |
46 # Interface IDL files / Dependency IDL files | |
47 # Interface IDL files: generate individual bindings (includes testing) | |
48 'interface_idl_files': [ | |
49 '<@(static_interface_idl_files)', | |
50 '<@(generated_interface_idl_files)', | |
51 ], | |
52 # Dependency IDL files: don't generate individual bindings, but do process | |
53 # in IDL dependency computation, and count as build dependencies | |
54 'dependency_idl_files': [ | |
55 '<@(static_dependency_idl_files)', | |
56 '<@(generated_dependency_idl_files)', | |
57 ], | |
58 # Main interface IDL files (excluding dependencies and testing) | |
59 # are included as properties on global objects, and in aggregate bindings | |
60 'main_interface_idl_files': [ | |
61 '<@(core_idl_files)', | |
62 '<@(modules_idl_files)', | |
63 ], | |
64 # Write lists of main IDL files to a file, so that the command lines don't | |
65 # exceed OS length limits. | |
66 'main_interface_idl_files_list': '<|(main_interface_idl_files_list.tmp <@(ma in_interface_idl_files))', | |
67 'core_idl_files_list': '<|(core_idl_files_list.tmp <@(core_idl_files))', | |
68 'modules_idl_files_list': '<|(modules_idl_files_list.tmp <@(modules_idl_file s))', | |
69 | |
70 # Static IDL files / Generated IDL files | |
71 # Paths need to be passed separately for static and generated files, as | |
72 # static files are listed in a temporary file (b/c too long for command | |
73 # line), but generated files must be passed at the command line, as their | |
74 # paths are not fixed at GYP time, when the temporary file is generated, | |
75 # because their paths depend on the build directory, which varies. | |
76 'static_idl_files': [ | |
77 '<@(static_interface_idl_files)', | |
78 '<@(static_dependency_idl_files)', | |
79 ], | |
80 'static_idl_files_list': '<|(static_idl_files_list.tmp <@(static_idl_files)) ', | |
81 'generated_idl_files': [ | |
82 '<@(generated_interface_idl_files)', | |
83 '<@(generated_dependency_idl_files)', | |
84 ], | |
85 | |
86 # Static IDL files | |
87 'static_interface_idl_files': [ | |
88 '<@(core_idl_files)', | |
89 '<@(webcore_testing_idl_files)', | |
90 '<@(modules_idl_files)', | |
91 ], | |
92 'static_dependency_idl_files': [ | |
93 '<@(core_dependency_idl_files)', | |
94 '<@(modules_dependency_idl_files)', | |
95 '<@(modules_testing_dependency_idl_files)', | |
96 ], | |
97 | |
98 # Generated IDL files | |
99 'generated_interface_idl_files': [ | |
100 '<@(generated_webcore_testing_idl_files)', # interfaces | |
101 ], | |
102 'generated_dependency_idl_files': [ | |
103 '<@(generated_global_constructors_idl_files)', # partial interfaces | |
104 ], | |
105 | |
106 'generated_global_constructors_idl_files': [ | |
107 '<(blink_output_dir)/WindowConstructors.idl', | |
108 '<(blink_output_dir)/SharedWorkerGlobalScopeConstructors.idl', | |
109 '<(blink_output_dir)/DedicatedWorkerGlobalScopeConstructors.idl', | |
110 '<(blink_output_dir)/ServiceWorkerGlobalScopeConstructors.idl', | |
111 ], | |
112 | |
113 'generated_global_constructors_header_files': [ | |
114 '<(blink_output_dir)/WindowConstructors.h', | |
115 '<(blink_output_dir)/SharedWorkerGlobalScopeConstructors.h', | |
116 '<(blink_output_dir)/DedicatedWorkerGlobalScopeConstructors.h', | |
117 '<(blink_output_dir)/ServiceWorkerGlobalScopeConstructors.h', | |
118 ], | |
119 | |
120 | |
121 # Python source | 42 # Python source |
122 'jinja_module_files': [ | 43 'jinja_module_files': [ |
123 # jinja2/__init__.py contains version string, so sufficient for package | 44 # jinja2/__init__.py contains version string, so sufficient for package |
124 '<(DEPTH)/third_party/jinja2/__init__.py', | 45 '<(DEPTH)/third_party/jinja2/__init__.py', |
125 '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep | 46 '<(DEPTH)/third_party/markupsafe/__init__.py', # jinja2 dep |
126 ], | 47 ], |
127 'idl_lexer_parser_files': [ | 48 'idl_lexer_parser_files': [ |
128 # PLY (Python Lex-Yacc) | 49 # PLY (Python Lex-Yacc) |
129 '<(DEPTH)/third_party/ply/lex.py', | 50 '<(DEPTH)/third_party/ply/lex.py', |
130 '<(DEPTH)/third_party/ply/yacc.py', | 51 '<(DEPTH)/third_party/ply/yacc.py', |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
162 'templates/interface_base.cpp', | 83 'templates/interface_base.cpp', |
163 'templates/interface.cpp', | 84 'templates/interface.cpp', |
164 'templates/interface.h', | 85 'templates/interface.h', |
165 'templates/methods.cpp', | 86 'templates/methods.cpp', |
166 ], | 87 ], |
167 }, | 88 }, |
168 | 89 |
169 'targets': [ | 90 'targets': [ |
170 ################################################################################ | 91 ################################################################################ |
171 { | 92 { |
93 # FIXME: Global constructors are used by bindings_core (e.g., V8Window.cpp) | |
94 # but depend on modules, which violates layering http://crbug.com/358074 | |
172 'target_name': 'global_constructors_idls', | 95 'target_name': 'global_constructors_idls', |
173 'type': 'none', | 96 'type': 'none', |
174 'actions': [{ | 97 'actions': [{ |
175 'action_name': 'generate_global_constructors_idls', | 98 'action_name': 'generate_global_constructors_idls', |
176 'inputs': [ | 99 'inputs': [ |
177 'scripts/generate_global_constructors.py', | 100 'scripts/generate_global_constructors.py', |
178 'scripts/utilities.py', | 101 'scripts/utilities.py', |
179 # Only includes main IDL files (exclude dependencies and testing, | 102 # Only includes main IDL files (exclude dependencies and testing, |
180 # which should not appear on global objects). | 103 # which should not appear on global objects). |
181 '<(main_interface_idl_files_list)', | 104 '<(main_interface_idl_files_list)', |
(...skipping 18 matching lines...) Expand all Loading... | |
200 'DedicatedWorkerGlobalScope', | 123 'DedicatedWorkerGlobalScope', |
201 '<(blink_output_dir)/DedicatedWorkerGlobalScopeConstructors.idl', | 124 '<(blink_output_dir)/DedicatedWorkerGlobalScopeConstructors.idl', |
202 'ServiceWorkerGlobalScope', | 125 'ServiceWorkerGlobalScope', |
203 '<(blink_output_dir)/ServiceWorkerGlobalScopeConstructors.idl', | 126 '<(blink_output_dir)/ServiceWorkerGlobalScopeConstructors.idl', |
204 ], | 127 ], |
205 'message': 'Generating IDL files for constructors on global objects', | 128 'message': 'Generating IDL files for constructors on global objects', |
206 }] | 129 }] |
207 }, | 130 }, |
208 ################################################################################ | 131 ################################################################################ |
209 { | 132 { |
133 # FIXME: interfaces_info is used by bindings_core, but depend on modules, | |
134 # which violates layering http://crbug.com/358074 | |
135 # Generate separate interfaces_info_core and interfaces_info_modules | |
210 'target_name': 'interfaces_info', | 136 'target_name': 'interfaces_info', |
211 'type': 'none', | 137 'type': 'none', |
212 'dependencies': [ | 138 'dependencies': [ |
213 # Generated IDLs | 139 # Generated IDLs |
214 'global_constructors_idls', | 140 'global_constructors_idls', |
215 '../core/core_generated.gyp:generated_testing_idls', | 141 '../core/core_generated.gyp:generated_testing_idls', |
216 ], | 142 ], |
217 'actions': [{ | 143 'actions': [{ |
218 'action_name': 'compute_interfaces_info', | 144 'action_name': 'compute_interfaces_info', |
219 'inputs': [ | 145 'inputs': [ |
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
351 '<(blink_output_dir)/InterfacesInfo.pickle', | 277 '<(blink_output_dir)/InterfacesInfo.pickle', |
352 '--write-file-only-if-changed', | 278 '--write-file-only-if-changed', |
353 '<(write_file_only_if_changed)', | 279 '<(write_file_only_if_changed)', |
354 '<(RULE_INPUT_PATH)', | 280 '<(RULE_INPUT_PATH)', |
355 ], | 281 ], |
356 'message': 'Generating binding from <(RULE_INPUT_PATH)', | 282 'message': 'Generating binding from <(RULE_INPUT_PATH)', |
357 }], | 283 }], |
358 }, | 284 }, |
359 ################################################################################ | 285 ################################################################################ |
360 { | 286 { |
361 'target_name': 'bindings_core_generated_aggregate', | 287 'target_name': 'bindings_generated', |
362 'type': 'none', | |
363 'actions': [{ | |
364 'action_name': 'generate_aggregate_bindings_core', | |
365 'inputs': [ | |
366 'scripts/aggregate_generated_bindings.py', | |
367 '<(core_idl_files_list)', | |
368 ], | |
369 'outputs': [ | |
370 '<@(bindings_core_generated_aggregate_files)', | |
371 ], | |
372 'action': [ | |
373 'python', | |
374 'scripts/aggregate_generated_bindings.py', | |
375 '<(core_idl_files_list)', | |
376 '--', | |
377 '<@(bindings_core_generated_aggregate_files)', | |
378 ], | |
379 'message': 'Generating aggregate generated core bindings files', | |
380 }], | |
381 }, | |
382 ################################################################################ | |
383 { | |
384 'target_name': 'bindings_modules_generated_aggregate', | |
385 'type': 'none', | |
386 'actions': [{ | |
387 'action_name': 'generate_aggregate_bindings_modules', | |
388 'inputs': [ | |
389 'scripts/aggregate_generated_bindings.py', | |
390 '<(modules_idl_files_list)', | |
391 ], | |
392 'outputs': [ | |
393 '<@(bindings_modules_generated_aggregate_files)', | |
394 ], | |
395 'action': [ | |
396 'python', | |
397 'scripts/aggregate_generated_bindings.py', | |
398 '<(modules_idl_files_list)', | |
399 '--', | |
400 '<@(bindings_modules_generated_aggregate_files)', | |
401 ], | |
402 'message': 'Generating aggregate generated modules bindings files', | |
403 }], | |
404 }, | |
405 ################################################################################ | |
406 { | |
407 'target_name': 'generated_bindings', | |
408 'type': 'none', | 288 'type': 'none', |
409 'dependencies': [ | 289 'dependencies': [ |
410 'bindings_core_generated_aggregate', | 290 # FIXME: split into core and modules http://crbug.com/358074 |
411 'bindings_modules_generated_aggregate', | |
412 'individual_generated_bindings', | 291 'individual_generated_bindings', |
413 ], | 292 ], |
414 }, | 293 }, |
415 ################################################################################ | 294 ################################################################################ |
416 ], # targets | 295 ], # targets |
417 } | 296 } |
OLD | NEW |