Chromium Code Reviews| 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 import("//third_party/WebKit/Source/core/core_idl_files.gni") | 5 import("//third_party/WebKit/Source/core/core_idl_files.gni") |
| 6 import("//third_party/WebKit/Source/modules/modules_idl_files.gni") | 6 import("//third_party/WebKit/Source/modules/modules_idl_files.gni") |
| 7 | 7 |
| 8 bindings_scripts_dir = get_path_info(".", "abspath") | 8 bindings_scripts_dir = get_path_info(".", "abspath") |
| 9 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" | 9 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" |
| 10 | 10 |
| (...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 427 args += [ rebase_path(output_idl_file, root_build_dir) ] | 427 args += [ rebase_path(output_idl_file, root_build_dir) ] |
| 428 output_idl_files += [ output_idl_file ] | 428 output_idl_files += [ output_idl_file ] |
| 429 output_header_files += | 429 output_header_files += |
| 430 [ "$output_dir/${interface}${component}Constructors.h" ] | 430 [ "$output_dir/${interface}${component}Constructors.h" ] |
| 431 } | 431 } |
| 432 | 432 |
| 433 outputs = output_idl_files + output_header_files | 433 outputs = output_idl_files + output_header_files |
| 434 deps = invoker.deps | 434 deps = invoker.deps |
| 435 } | 435 } |
| 436 } | 436 } |
| 437 | |
| 438 # Calls the generate_conditional_features script. | |
| 439 # | |
| 440 # Parameters: | |
| 441 # sources = a list of source IDL files. | |
| 442 # component = component to generate conditional feature bindings for ("Core" o r "Modules") | |
|
Yuki
2017/07/15 12:09:19
nit: 80 columns?
iclelland
2017/07/16 04:23:06
Sure. I didn't see anything in the GN style guide
| |
| 443 # output_dir = output directory to generate cpp file and header file. | |
| 444 # deps = dependencies | |
| 445 # | |
| 446 template("generate_conditional_features") { | |
| 447 action(target_name) { | |
| 448 script = "//third_party/WebKit/Source/bindings/scripts/generate_conditional_ features.py" | |
| 449 | |
| 450 # Write the file list to a unique temp file to avoid blowing out the | |
| 451 # command line length limit. | |
| 452 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" | |
| 453 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) | |
| 454 | |
| 455 inputs = [ | |
| 456 "//third_party/WebKit/Source/bindings/scripts/utilities.py", | |
| 457 "//third_party/WebKit/Source/bindings/templates/ConditionalFeatur esFor${invoker.component}.cpp.tmpl", | |
| 458 "//third_party/WebKit/Source/bindings/templates/ConditionalFeatur esFor${invoker.component}.h.tmpl", | |
| 459 idl_files_list, | |
| 460 ] + invoker.sources | |
| 461 | |
| 462 args = [ | |
| 463 "--output-directory", | |
| 464 rebase_path(invoker.output_dir, root_build_dir), | |
| 465 "--info-dir", | |
| 466 "gen/blink/bindings", | |
| 467 "--cache-dir", | |
| 468 rebase_path(bindings_scripts_output_dir, root_build_dir), | |
| 469 "--target-component", | |
| 470 invoker.component, | |
| 471 "--idl-files-list", | |
| 472 rebase_path(idl_files_list, root_build_dir), | |
| 473 ] | |
| 474 | |
| 475 outputs = [ | |
| 476 "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.cpp", | |
| 477 "${invoker.output_dir}/ConditionalFeaturesFor${invoker.component}.h", | |
| 478 ] | |
| 479 | |
| 480 # TODO: This should not always require modules; For core features, this | |
| 481 # should be interfaces_info_core (w/o modules). This is the same issue as | |
| 482 # above in the idl_compiler template. | |
| 483 # http://crbug.com/358074 | |
| 484 deps = invoker.deps + | |
| 485 [ "//third_party/WebKit/Source/bindings/modules:interfaces_info" ] | |
| 486 } | |
| 487 } | |
| OLD | NEW |