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

Side by Side Diff: Source/bindings/scripts/scripts.gni

Issue 633913002: Update bindings gn files for binding modularization. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Patch for landing Created 6 years, 2 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 | « Source/bindings/modules/modules.gni ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") 5 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni")
6 import("//third_party/WebKit/Source/bindings/modules/idl.gni") 6 import("//third_party/WebKit/Source/bindings/modules/idl.gni")
7 import("//third_party/WebKit/Source/bindings/modules/modules.gni") 7 import("//third_party/WebKit/Source/bindings/modules/modules.gni")
8 8
9 bindings_scripts_dir = get_path_info(".", "abspath") 9 bindings_scripts_dir = get_path_info(".", "abspath")
10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" 10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts"
(...skipping 10 matching lines...) Expand all
21 idl_lexer_parser_files = get_path_info(_gypi.idl_lexer_parser_files, "abspath") 21 idl_lexer_parser_files = get_path_info(_gypi.idl_lexer_parser_files, "abspath")
22 idl_compiler_files = get_path_info(_gypi.idl_compiler_files, "abspath") 22 idl_compiler_files = get_path_info(_gypi.idl_compiler_files, "abspath")
23 23
24 # Calls the compute_interfaces_info_individual script. 24 # Calls the compute_interfaces_info_individual script.
25 # 25 #
26 # Parameters: 26 # Parameters:
27 # sources_static = list of IDL files to pass as inputs 27 # sources_static = list of IDL files to pass as inputs
28 # sources_generated = list of generated IDL files to pass as inputs 28 # sources_generated = list of generated IDL files to pass as inputs
29 # component_dir = name if subdirectory (one word, no slashes) of component. 29 # component_dir = name if subdirectory (one word, no slashes) of component.
30 # output_file = pickle file to write 30 # output_file = pickle file to write
31 # deps = dependencies
31 # 32 #
32 # FIXME: Note the static/generated split is for consistency with GYP. This 33 # FIXME: Note the static/generated split is for consistency with GYP. This
33 # split is not necessary in the GN build and could be combined into a single 34 # split is not necessary in the GN build and could be combined into a single
34 # "sources". 35 # "sources".
35 template("compute_interfaces_info_individual") { 36 template("compute_interfaces_info_individual") {
36 action(target_name) { 37 action(target_name) {
37 script = "$bindings_scripts_dir/compute_interfaces_info_individual.py" 38 script = "$bindings_scripts_dir/compute_interfaces_info_individual.py"
38 if (defined(invoker.visibility)) { 39 if (defined(invoker.visibility)) {
39 visibility = invoker.visibility 40 visibility = invoker.visibility
40 } 41 }
(...skipping 13 matching lines...) Expand all
54 ] 55 ]
55 56
56 args = [ 57 args = [
57 "--idl-files-list", rebase_path(file_list, root_build_dir), 58 "--idl-files-list", rebase_path(file_list, root_build_dir),
58 "--interfaces-info-file", 59 "--interfaces-info-file",
59 rebase_path(invoker.output_file, root_build_dir), 60 rebase_path(invoker.output_file, root_build_dir),
60 "--write-file-only-if-changed=1", 61 "--write-file-only-if-changed=1",
61 "--", 62 "--",
62 ] + rebase_path(invoker.sources_generated, root_build_dir) 63 ] + rebase_path(invoker.sources_generated, root_build_dir)
63 64
64 deps = [ 65 deps = invoker.deps
65 # FIXME: should be {modules|core}_generated_idls
66 # http://crbug.com/358074
67 "//third_party/WebKit/Source/bindings:generated_idls",
68 ]
69 } 66 }
70 } 67 }
71 68
72 # Calls generate_event_interfaces 69 # Calls generate_event_interfaces
73 # 70 #
74 # Parameters: 71 # Parameters:
75 # sources = A list of IDL files to process. 72 # sources = A list of IDL files to process.
76 # output_file = The .in file to write, relative to the blink_gen_dir. 73 # output_file = The .in file to write, relative to the blink_gen_dir.
77 # suffix = (Optional) String to be passed to script via --suffix 74 # suffix = (Optional) String to be passed to script via --suffix
78 template("generate_event_interfaces") { 75 template("generate_event_interfaces") {
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
231 outputs = invoker.outputs 228 outputs = invoker.outputs
232 229
233 args = [ 230 args = [
234 invoker.component_dir, 231 invoker.component_dir,
235 rebase_path(idl_files_list, root_build_dir), 232 rebase_path(idl_files_list, root_build_dir),
236 "--", 233 "--",
237 ] 234 ]
238 args += rebase_path(invoker.outputs, root_build_dir) 235 args += rebase_path(invoker.outputs, root_build_dir)
239 } 236 }
240 } 237 }
238
239 # Calls the compute_global_objects script.
240 #
241 # Parameters:
242 # sources = a list of source IDL files.
243 # sources_generated = a list of generated pickle sources.
244 # output_file = a pickle file to write to (need to specify directory)
245 #
246 template("compute_global_objects") {
247 action(target_name) {
248 script = "//third_party/WebKit/Source/bindings/scripts/compute_global_object s.py"
249
250 # Write the file list to a unique temp file to avoid blowing out the
251 # command line length limit.
252 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
253 write_file(idl_files_list,
254 rebase_path(invoker.sources, root_build_dir))
255
256 inputs = [
257 "//third_party/WebKit/Source/bindings/scripts/utilities.py",
258 idl_files_list,
259 ] + invoker.sources_generated + invoker.sources
260
261 outputs = [ invoker.output_file ]
262
263 args = [
264 "--idl-files-list",
265 rebase_path(idl_files_list, root_build_dir),
266 "--write-file-only-if-changed=1", # Always true for Ninja.
267 "--",
268 ]
269 args += rebase_path(invoker.sources_generated, root_build_dir)
270 args += [ rebase_path(invoker.output_file, root_build_dir) ]
271
272 deps = invoker.deps
273 }
274 }
275
276 # Calls the generate_global_constructors script.
277 #
278 # Parameters:
279 # sources = a list of source IDL files.
280 # global_objects_file = a global objects file generated by compute_global_obje cts
281 # interfaces = interfaces to generate global constructors for.
282 # component = component to generate global constructors for.
283 # output_dir = output directory to generate idl files and header files.
284 # deps = dependencies
285 #
286 template("generate_global_constructors") {
287 action(target_name) {
288 script = "//third_party/WebKit/Source/bindings/scripts/generate_global_const ructors.py"
289
290 # Write the file list to a unique temp file to avoid blowing out the
291 # command line length limit.
292 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
293 write_file(idl_files_list,
294 rebase_path(invoker.sources, root_build_dir))
295
296 inputs = [
297 "//third_party/WebKit/Source/bindings/scripts/utilities.py",
298 idl_files_list,
299 invoker.global_objects_file,
300 ] + invoker.sources
301
302 args = [
303 "--idl-files-list",
304 rebase_path(idl_files_list, root_build_dir),
305 "--global-objects-file",
306 rebase_path(invoker.global_objects_file, root_build_dir),
307 "--write-file-only-if-changed=1", # Always true for Ninja.
308 "--",
309 ]
310
311 output_dir = invoker.output_dir
312 component = invoker.component
313
314 # generate outputs from invoker.interfaces.
315 output_idl_files = []
316 output_header_files = []
317 foreach(interface, invoker.interfaces) {
318 args += [ interface ]
319 output_idl_file = "$output_dir/${interface}${component}Constructors.idl"
320 args += [ rebase_path(output_idl_file, root_build_dir) ]
321 output_idl_files += [ output_idl_file ]
322 output_header_files += [
323 "$output_dir/${interface}${component}Constructors.h"
324 ]
325 }
326
327 outputs = output_idl_files + output_header_files
328 deps = invoker.deps
329 }
330 }
331
OLDNEW
« no previous file with comments | « Source/bindings/modules/modules.gni ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698