提交 e55c96e9 编写于 作者: C Colin Blundell

Run gn format on all gni files (gn version 307087)

Change generated by running the following command:

for x in `git ls-files *.gni`; do gn format --in-place $x; done

This came up as an issue in https://codereview.chromium.org/801523002/, but I
didn't want to add noise to that CL.

R=qsr@chromium.org, qsr

Review URL: https://codereview.chromium.org/794413003
上级 7fb63ba1
......@@ -8,23 +8,24 @@
# core/v8/custom/custom.gypi ---------------------------------------------------
# These paths are relative to v8/custom.
_core_v8_custom_gypi = exec_script(
"//build/gypi_to_gn.py",
_core_v8_custom_gypi =
exec_script("//build/gypi_to_gn.py",
[ rebase_path("core/v8/custom/custom.gypi") ],
"scope",
[ "core/v8/custom/custom.gypi" ])
bindings_core_v8_custom_dir = get_path_info("core/v8/custom", "abspath")
bindings_core_v8_custom_files = get_path_info(
rebase_path(_core_v8_custom_gypi.bindings_core_v8_custom_files, ".",
bindings_core_v8_custom_files =
get_path_info(
rebase_path(_core_v8_custom_gypi.bindings_core_v8_custom_files,
".",
bindings_core_v8_custom_dir),
"abspath")
# core/v8/v8.gypi --------------------------------------------------------------
# These paths are relative to v8.
_core_v8_gypi = exec_script(
"//build/gypi_to_gn.py",
_core_v8_gypi = exec_script("//build/gypi_to_gn.py",
[ rebase_path("core/v8/v8.gypi") ],
"scope",
[ "core/v8/v8.gypi" ])
......@@ -35,8 +36,8 @@ bindings_core_v8_dir = get_path_info("core/v8", "abspath")
# expand that.
_rel_bindings_core_v8_files = _core_v8_gypi.bindings_core_v8_files
_rel_bindings_core_v8_files -= [ "<@(bindings_core_v8_custom_files)" ]
bindings_core_v8_files = get_path_info(
rebase_path(_rel_bindings_core_v8_files, ".", "core/v8"),
bindings_core_v8_files =
get_path_info(rebase_path(_rel_bindings_core_v8_files, ".", "core/v8"),
"abspath")
bindings_core_v8_files += bindings_core_v8_custom_files
......
......@@ -7,15 +7,12 @@ import("//sky/engine/core/core.gni")
# IDL file lists; see: http://www.chromium.org/developers/web-idl-interfaces
# Interface IDL files: generate individual bindings (includes testing)
core_interface_idl_files =
core_idl_files
core_interface_idl_files = core_idl_files
# Static IDL files
core_static_interface_idl_files =
core_idl_files
core_static_interface_idl_files = core_idl_files
core_static_dependency_idl_files =
core_dependency_idl_files
core_static_dependency_idl_files = core_dependency_idl_files
# Generated IDL files
core_generated_dependency_idl_files =
......@@ -35,15 +32,12 @@ core_generated_dependency_idl_files =
# is still supported, we match its behavior for easier maintenance but this can
# be simplified.
core_static_idl_files =
core_static_interface_idl_files +
core_static_dependency_idl_files
core_generated_idl_files =
core_generated_dependency_idl_files
core_static_interface_idl_files + core_static_dependency_idl_files
core_generated_idl_files = core_generated_dependency_idl_files
# Dependency IDL files: don't generate individual bindings, but do process
# in IDL dependency computation, and count as build dependencies
# 'core_dependency_idl_files' is already used in engine/core, so avoid
# collision
core_all_dependency_idl_files =
core_static_dependency_idl_files +
core_generated_dependency_idl_files
core_static_dependency_idl_files + core_generated_dependency_idl_files
......@@ -7,9 +7,8 @@ import("//sky/engine/bindings/bindings.gni")
bindings_core_v8_output_dir = "$bindings_output_dir/core/v8"
if (is_win && is_official_build) {
bindings_core_generated_aggregate_files = [
"$bindings_core_v8_output_dir/V8GeneratedCoreBindings.cpp",
]
bindings_core_generated_aggregate_files =
[ "$bindings_core_v8_output_dir/V8GeneratedCoreBindings.cpp" ]
} else {
bindings_core_generated_aggregate_files = [
"$bindings_core_v8_output_dir/V8GeneratedCoreBindings01.cpp",
......
......@@ -6,10 +6,8 @@ import("//sky/engine/bindings/bindings.gni")
# Global constructors
# FIXME: Split into core vs. modules http://crbug.com/358074
generated_global_constructors_idl_files = [
"$sky_output_dir/WindowConstructors.idl",
]
generated_global_constructors_idl_files =
[ "$sky_output_dir/WindowConstructors.idl" ]
generated_global_constructors_header_files = [
"$sky_output_dir/WindowConstructors.h",
]
generated_global_constructors_header_files =
[ "$sky_output_dir/WindowConstructors.h" ]
......@@ -10,10 +10,11 @@ bindings_scripts_dir = get_path_info(".", "abspath")
bindings_scripts_output_dir = "$root_gen_dir/sky/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)=/" ],
_gypi = exec_script("//build/gypi_to_gn.py",
[
rebase_path("scripts.gypi"),
"--replace=<(DEPTH)=/",
],
"scope",
[ "scripts.gypi" ])
......@@ -44,18 +45,19 @@ template("compute_interfaces_info_individual") {
file_list = "$target_gen_dir/${target_name}_file_list.txt"
write_file(file_list, rebase_path(invoker.sources_static, root_build_dir))
inputs = [
"$bindings_scripts_dir/utilities.py",
] + invoker.sources_static + invoker.sources_generated
inputs = [ "$bindings_scripts_dir/utilities.py" ] + invoker.sources_static +
invoker.sources_generated
outputs = [
file_list,
invoker.output_file
invoker.output_file,
]
args = [
"--component-dir", invoker.component_dir,
"--idl-files-list", rebase_path(file_list, root_build_dir),
"--component-dir",
invoker.component_dir,
"--idl-files-list",
rebase_path(file_list, root_build_dir),
"--interfaces-info-file",
rebase_path(invoker.output_file, root_build_dir),
"--write-file-only-if-changed=1",
......@@ -81,8 +83,7 @@ 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 = [
"//sky/engine/bindings/scripts/utilities.py",
......@@ -90,7 +91,9 @@ template("generate_event_interfaces") {
] + invoker.sources
output_file = "$root_gen_dir/sky/" + invoker.output_file
outputs = [ output_file ]
outputs = [
output_file,
]
script = "//sky/engine/bindings/scripts/generate_event_interfaces.py"
args = [
......@@ -102,7 +105,10 @@ template("generate_event_interfaces") {
]
if (defined(invoker.suffix)) {
args += [ "--suffix", invoker.suffix ]
args += [
"--suffix",
invoker.suffix,
]
}
}
}
......@@ -121,20 +127,20 @@ template("idl_compiler") {
# really expressible in GN now).
script = "//sky/engine/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_core_output_dir/InterfacesInfoAll.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
......
......@@ -3,9 +3,7 @@
# found in the LICENSE file.
# Paths should be absolute so this file can be imported from anywhere.
code_generator_template_files =
get_path_info(
[
code_generator_template_files = get_path_info([
"attributes.cpp",
"callback_interface.cpp",
"callback_interface.h",
......
......@@ -23,39 +23,41 @@ scripts_for_in_files = [
"$_scripts_dir/templates/macros.tmpl",
]
css_properties_files = scripts_for_in_files + [
"$_scripts_dir/css_properties.py",
]
css_properties_files =
scripts_for_in_files + [ "$_scripts_dir/css_properties.py" ]
make_event_factory_files = scripts_for_in_files + [
"$_scripts_dir/make_event_factory.py",
"$_scripts_dir/templates/EventFactory.cpp.tmpl",
]
]
make_names_files = scripts_for_in_files + [
"$_scripts_dir/make_names.py",
"$_scripts_dir/templates/MakeNames.cpp.tmpl",
"$_scripts_dir/templates/MakeNames.h.tmpl",
]
]
make_qualified_names_files = scripts_for_in_files + [
make_qualified_names_files =
scripts_for_in_files + [
"$_scripts_dir/make_qualified_names.py",
"$_scripts_dir/templates/MakeQualifiedNames.cpp.tmpl",
"$_scripts_dir/templates/MakeQualifiedNames.h.tmpl",
]
]
make_element_factory_files = make_qualified_names_files + [
make_element_factory_files =
make_qualified_names_files + [
"$_scripts_dir/make_element_factory.py",
"$_scripts_dir/templates/ElementFactory.cpp.tmpl",
"$_scripts_dir/templates/ElementFactory.h.tmpl",
"$_scripts_dir/templates/ElementWrapperFactory.cpp.tmpl",
"$_scripts_dir/templates/ElementWrapperFactory.h.tmpl",
]
]
make_element_type_helpers_files = make_qualified_names_files + [
make_element_type_helpers_files =
make_qualified_names_files + [
"$_scripts_dir/make_element_type_helpers.py",
"$_scripts_dir/templates/ElementTypeHelpers.h.tmpl",
]
]
# The executables are relative to the build directory. Don't rebase it because
# on Posix we want to run the system one on the path.
......@@ -110,7 +112,8 @@ template("process_in_files") {
output_dir = get_path_info(outputs[0], "dir")
args = rebase_path(invoker.in_files, root_build_dir) + [
"--output_dir", rebase_path(output_dir, root_build_dir),
"--output_dir",
rebase_path(output_dir, root_build_dir),
]
if (defined(invoker.other_args)) {
args += invoker.other_args
......@@ -125,7 +128,7 @@ template("process_in_files") {
configs += [
"//build/config/compiler:wexit_time_destructors",
"//sky/engine:inside_blink",
"//sky/engine:config"
"//sky/engine:config",
]
deps = [
......@@ -143,13 +146,14 @@ template("process_in_files") {
template("css_properties") {
process_in_files(target_name) {
script = invoker.script
in_files = ["css/CSSProperties.in"]
in_files = [ "css/CSSProperties.in" ]
other_inputs = css_properties_files
if (defined(invoker.other_inputs)) {
other_inputs += invoker.other_inputs
}
other_args = [
"--gperf", gperf_exe,
"--gperf",
gperf_exe,
]
outputs = invoker.outputs
......@@ -234,7 +238,9 @@ template("make_token_matcher") {
script = "//sky/engine/build/scripts/make_token_matcher.py"
inputs = scripts_for_in_files + [ invoker.input_file ]
outputs = [ invoker.output_file ]
outputs = [
invoker.output_file,
]
args = [
rebase_path(invoker.input_file, root_build_dir),
......@@ -244,4 +250,3 @@ template("make_token_matcher") {
deps = make_core_generated_deps
}
}
......@@ -60,7 +60,7 @@ if (sky_enable_compostior) {
# Convert the list to a space-separated string for passing to scripts.
# This would be the equivalent of passing '<(feature_defines)' in GYP.
feature_defines_string = exec_script(
"build/gn_list_to_space_separated_string.py",
feature_defines_string =
exec_script("build/gn_list_to_space_separated_string.py",
feature_defines_list,
"trim string")
......@@ -1390,12 +1390,14 @@ core_idl_files = get_path_info([
"html/VoidCallback.idl",
"inspector/JavaScriptCallFrame.idl",
"inspector/InjectedScriptHost.idl",
], "abspath")
],
"abspath")
# Files for which bindings (.cpp and .h files) will be generated
# 'partial interface', target (right side of) 'implements', and
# interfaces with static bindings (in bindings/core/v8/)
core_dependency_idl_files = get_path_info([
core_dependency_idl_files =
get_path_info([
"animation/DocumentAnimation.idl",
"animation/ElementAnimation.idl",
"css/DocumentFontFaceSet.idl",
......@@ -1411,7 +1413,8 @@ core_dependency_idl_files = get_path_info([
"html/canvas/DataView.idl",
"html/canvas/MouseEventHitRegion.idl",
"html/canvas/WebGLRenderingContextBase.idl",
], "abspath")
],
"abspath")
# interfaces that inherit from Event, including Event itself
core_event_idl_files = get_path_info([
......@@ -1437,4 +1440,5 @@ core_event_idl_files = get_path_info([
"events/AnimationEvent.idl",
"events/WheelEvent.idl",
"html/canvas/WebGLContextEvent.idl",
], "abspath")
],
"abspath")
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册