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

Unified Diff: third_party/WebKit/Source/bindings/scripts/scripts.gni

Issue 1406153017: gn format '.gni' files. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/bindings/scripts/scripts.gni
diff --git a/third_party/WebKit/Source/bindings/scripts/scripts.gni b/third_party/WebKit/Source/bindings/scripts/scripts.gni
index ab5b6127c7ca0a213735cd7c1e460f79332be3d6..7022af29b8bf8ae8709bf095150180fefebc3b82 100644
--- a/third_party/WebKit/Source/bindings/scripts/scripts.gni
+++ b/third_party/WebKit/Source/bindings/scripts/scripts.gni
@@ -10,12 +10,13 @@ bindings_scripts_dir = get_path_info(".", "abspath")
bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts"
# Replacing <(DEPTH) with "/" makes paths like "<(DEPTH)/foo" absolute.
-_gypi = exec_script(
- "//build/gypi_to_gn.py",
- [ rebase_path("scripts.gypi"),
- "--replace=<(DEPTH)=/" ],
- "scope",
- [ "scripts.gypi" ])
+_gypi = exec_script("//build/gypi_to_gn.py",
+ [
+ rebase_path("scripts.gypi"),
+ "--replace=<(DEPTH)=/",
+ ],
+ "scope",
+ [ "scripts.gypi" ])
jinja_module_files = get_path_info(_gypi.jinja_module_files, "abspath")
idl_lexer_parser_files = get_path_info(_gypi.idl_lexer_parser_files, "abspath")
@@ -47,9 +48,9 @@ template("compute_interfaces_info_individual") {
write_file(file_list, rebase_path(invoker.sources_static, root_build_dir))
inputs = [
- "$bindings_scripts_dir/utilities.py",
- file_list,
- ] + invoker.sources_static + invoker.sources_generated
+ "$bindings_scripts_dir/utilities.py",
+ file_list,
+ ] + invoker.sources_static + invoker.sources_generated
outputs = [
invoker.interfaces_info_file,
@@ -57,20 +58,19 @@ template("compute_interfaces_info_individual") {
]
args = [
- "--cache-directory",
- rebase_path(bindings_scripts_output_dir, root_build_dir),
- "--idl-files-list", rebase_path(file_list, root_build_dir),
- "--interfaces-info-file",
- rebase_path(invoker.interfaces_info_file, root_build_dir),
- "--component-info-file",
- rebase_path(invoker.component_info_file, root_build_dir),
- "--write-file-only-if-changed=1",
- "--",
- ] + rebase_path(invoker.sources_generated, root_build_dir)
-
- deps = [
- "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables",
- ] + invoker.deps
+ "--cache-directory",
+ rebase_path(bindings_scripts_output_dir, root_build_dir),
+ "--idl-files-list",
+ rebase_path(file_list, root_build_dir),
+ "--interfaces-info-file",
+ rebase_path(invoker.interfaces_info_file, root_build_dir),
+ "--component-info-file",
+ rebase_path(invoker.component_info_file, root_build_dir),
+ "--write-file-only-if-changed=1",
+ "--",
+ ] + rebase_path(invoker.sources_generated, root_build_dir)
+
+ deps = [ "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables" ] + invoker.deps
}
}
@@ -85,16 +85,17 @@ template("generate_event_interfaces") {
# Write the file list to a unique temp file to avoid blowing out the
# command line length limit.
idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
- write_file(idl_files_list,
- rebase_path(invoker.sources, root_build_dir))
+ write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
inputs = [
- "//third_party/WebKit/Source/bindings/scripts/utilities.py",
- idl_files_list,
- ] + invoker.sources
+ "//third_party/WebKit/Source/bindings/scripts/utilities.py",
+ idl_files_list,
+ ] + invoker.sources
output_file = "$root_gen_dir/blink/" + invoker.output_file
- outputs = [ output_file ]
+ outputs = [
+ output_file,
+ ]
script = "//third_party/WebKit/Source/bindings/scripts/generate_event_interfaces.py"
args = [
@@ -106,7 +107,10 @@ template("generate_event_interfaces") {
]
if (defined(invoker.suffix)) {
- args += [ "--suffix", invoker.suffix ]
+ args += [
+ "--suffix",
+ invoker.suffix,
+ ]
}
}
}
@@ -128,20 +132,20 @@ template("idl_compiler") {
# really expressible in GN now).
script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py"
- inputs =
- idl_lexer_parser_files + # to be explicit (covered by parsetab)
- idl_compiler_files
+ inputs = idl_lexer_parser_files + idl_compiler_files # to be explicit (covered by parsetab)
inputs += [
"$bindings_scripts_output_dir/lextab.py",
"$bindings_scripts_output_dir/parsetab.pickle",
"$bindings_scripts_output_dir/cached_jinja_templates.stamp",
"$bindings_dir/IDLExtendedAttributes.txt",
+
# If the dependency structure or public interface info (e.g.,
# [ImplementedAs]) changes, we rebuild all files, since we're not
# computing dependencies file-by-file in the build.
# This data is generally stable.
"$bindings_modules_output_dir/InterfacesInfoOverall.pickle",
]
+
# Further, if any dependency (partial interface or implemented
# interface) changes, rebuild everything, since every IDL potentially
# depends on them, because we're not computing dependencies
@@ -172,6 +176,7 @@ template("idl_compiler") {
public_deps = [
"//third_party/WebKit/Source/bindings/core:core_global_constructors_idls",
+
# FIXME: should be interfaces_info_core (w/o modules)
# http://crbug.com/358074
"//third_party/WebKit/Source/bindings/modules:interfaces_info",
@@ -200,9 +205,7 @@ template("idl_impl") {
idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
- inputs =
- idl_lexer_parser_files + # to be explicit (covered by parsetab)
- idl_compiler_files
+ inputs = idl_lexer_parser_files + idl_compiler_files # to be explicit (covered by parsetab)
inputs += [
"$bindings_scripts_output_dir/lextab.py",
"$bindings_scripts_output_dir/parsetab.pickle",
@@ -276,20 +279,22 @@ template("aggregate_generated_bindings") {
#
template("compute_global_objects") {
action(target_name) {
- script = "//third_party/WebKit/Source/bindings/scripts/compute_global_objects.py"
+ script =
+ "//third_party/WebKit/Source/bindings/scripts/compute_global_objects.py"
# Write the file list to a unique temp file to avoid blowing out the
# command line length limit.
idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
- write_file(idl_files_list,
- rebase_path(invoker.sources, root_build_dir))
+ write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
inputs = [
- "//third_party/WebKit/Source/bindings/scripts/utilities.py",
- idl_files_list,
- ] + invoker.sources_generated + invoker.sources
+ "//third_party/WebKit/Source/bindings/scripts/utilities.py",
+ idl_files_list,
+ ] + invoker.sources_generated + invoker.sources
- outputs = [ invoker.output_file ]
+ outputs = [
+ invoker.output_file,
+ ]
args = [
"--idl-files-list",
@@ -321,14 +326,13 @@ template("generate_global_constructors") {
# Write the file list to a unique temp file to avoid blowing out the
# command line length limit.
idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp"
- write_file(idl_files_list,
- rebase_path(invoker.sources, root_build_dir))
+ write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir))
inputs = [
- "//third_party/WebKit/Source/bindings/scripts/utilities.py",
- idl_files_list,
- invoker.global_objects_file,
- ] + invoker.sources
+ "//third_party/WebKit/Source/bindings/scripts/utilities.py",
+ idl_files_list,
+ invoker.global_objects_file,
+ ] + invoker.sources
args = [
"--idl-files-list",
@@ -350,13 +354,11 @@ template("generate_global_constructors") {
output_idl_file = "$output_dir/${interface}${component}Constructors.idl"
args += [ rebase_path(output_idl_file, root_build_dir) ]
output_idl_files += [ output_idl_file ]
- output_header_files += [
- "$output_dir/${interface}${component}Constructors.h"
- ]
+ output_header_files +=
+ [ "$output_dir/${interface}${component}Constructors.h" ]
}
outputs = output_idl_files + output_header_files
deps = invoker.deps
}
}
-
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/v8/v8.gni ('k') | third_party/WebKit/Source/bindings/templates/templates.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698