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

Side by Side Diff: sky/engine/build/scripts/scripts.gni

Issue 794413003: Run gn format on all gni files (gn version 307087) (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 6 years 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
« no previous file with comments | « sky/engine/bindings/templates/templates.gni ('k') | sky/engine/config.gni » ('j') | 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("//sky/engine/config.gni") 5 import("//sky/engine/config.gni")
6 6
7 # All paths in this file should be absolute so targets in any directory can use 7 # All paths in this file should be absolute so targets in any directory can use
8 # them without worrying about the current directory. 8 # them without worrying about the current directory.
9 _scripts_dir = "//sky/engine/build/scripts" 9 _scripts_dir = "//sky/engine/build/scripts"
10 10
11 scripts_for_in_files = [ 11 scripts_for_in_files = [
12 # jinja2/__init__.py contains version string, so sufficient as 12 # jinja2/__init__.py contains version string, so sufficient as
13 # dependency for whole jinja2 package 13 # dependency for whole jinja2 package
14 "//third_party/jinja2/__init__.py", 14 "//third_party/jinja2/__init__.py",
15 "//third_party/markupsafe/__init__.py", # jinja2 dep 15 "//third_party/markupsafe/__init__.py", # jinja2 dep
16 "$_scripts_dir/hasher.py", 16 "$_scripts_dir/hasher.py",
17 "$_scripts_dir/in_file.py", 17 "$_scripts_dir/in_file.py",
18 "$_scripts_dir/in_generator.py", 18 "$_scripts_dir/in_generator.py",
19 "$_scripts_dir/license.py", 19 "$_scripts_dir/license.py",
20 "$_scripts_dir/name_macros.py", 20 "$_scripts_dir/name_macros.py",
21 "$_scripts_dir/name_utilities.py", 21 "$_scripts_dir/name_utilities.py",
22 "$_scripts_dir/template_expander.py", 22 "$_scripts_dir/template_expander.py",
23 "$_scripts_dir/templates/macros.tmpl", 23 "$_scripts_dir/templates/macros.tmpl",
24 ] 24 ]
25 25
26 css_properties_files = scripts_for_in_files + [ 26 css_properties_files =
27 "$_scripts_dir/css_properties.py", 27 scripts_for_in_files + [ "$_scripts_dir/css_properties.py" ]
28 ]
29 28
30 make_event_factory_files = scripts_for_in_files + [ 29 make_event_factory_files = scripts_for_in_files + [
31 "$_scripts_dir/make_event_factory.py", 30 "$_scripts_dir/make_event_factory.py",
32 "$_scripts_dir/templates/EventFactory.cpp.tmpl", 31 "$_scripts_dir/templates/EventFactory.cpp.tmpl",
33 ] 32 ]
34 33
35 make_names_files = scripts_for_in_files + [ 34 make_names_files = scripts_for_in_files + [
36 "$_scripts_dir/make_names.py", 35 "$_scripts_dir/make_names.py",
37 "$_scripts_dir/templates/MakeNames.cpp.tmpl", 36 "$_scripts_dir/templates/MakeNames.cpp.tmpl",
38 "$_scripts_dir/templates/MakeNames.h.tmpl", 37 "$_scripts_dir/templates/MakeNames.h.tmpl",
39 ] 38 ]
40 39
41 make_qualified_names_files = scripts_for_in_files + [ 40 make_qualified_names_files =
42 "$_scripts_dir/make_qualified_names.py", 41 scripts_for_in_files + [
43 "$_scripts_dir/templates/MakeQualifiedNames.cpp.tmpl", 42 "$_scripts_dir/make_qualified_names.py",
44 "$_scripts_dir/templates/MakeQualifiedNames.h.tmpl", 43 "$_scripts_dir/templates/MakeQualifiedNames.cpp.tmpl",
45 ] 44 "$_scripts_dir/templates/MakeQualifiedNames.h.tmpl",
45 ]
46 46
47 make_element_factory_files = make_qualified_names_files + [ 47 make_element_factory_files =
48 "$_scripts_dir/make_element_factory.py", 48 make_qualified_names_files + [
49 "$_scripts_dir/templates/ElementFactory.cpp.tmpl", 49 "$_scripts_dir/make_element_factory.py",
50 "$_scripts_dir/templates/ElementFactory.h.tmpl", 50 "$_scripts_dir/templates/ElementFactory.cpp.tmpl",
51 "$_scripts_dir/templates/ElementWrapperFactory.cpp.tmpl", 51 "$_scripts_dir/templates/ElementFactory.h.tmpl",
52 "$_scripts_dir/templates/ElementWrapperFactory.h.tmpl", 52 "$_scripts_dir/templates/ElementWrapperFactory.cpp.tmpl",
53 ] 53 "$_scripts_dir/templates/ElementWrapperFactory.h.tmpl",
54 ]
54 55
55 make_element_type_helpers_files = make_qualified_names_files + [ 56 make_element_type_helpers_files =
56 "$_scripts_dir/make_element_type_helpers.py", 57 make_qualified_names_files + [
57 "$_scripts_dir/templates/ElementTypeHelpers.h.tmpl", 58 "$_scripts_dir/make_element_type_helpers.py",
58 ] 59 "$_scripts_dir/templates/ElementTypeHelpers.h.tmpl",
60 ]
59 61
60 # The executables are relative to the build directory. Don't rebase it because 62 # The executables are relative to the build directory. Don't rebase it because
61 # on Posix we want to run the system one on the path. 63 # on Posix we want to run the system one on the path.
62 if (is_win) { 64 if (is_win) {
63 gperf_exe = rebase_path("//third_party/gperf/bin/gperf.exe", root_build_dir) 65 gperf_exe = rebase_path("//third_party/gperf/bin/gperf.exe", root_build_dir)
64 bison_exe = rebase_path("//third_party/bison/bin/bison.exe", root_build_dir) 66 bison_exe = rebase_path("//third_party/bison/bin/bison.exe", root_build_dir)
65 } else { 67 } else {
66 gperf_exe = "gperf" 68 gperf_exe = "gperf"
67 bison_exe = "bison" 69 bison_exe = "bison"
68 } 70 }
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
103 inputs += invoker.other_inputs 105 inputs += invoker.other_inputs
104 } else { 106 } else {
105 inputs += scripts_for_in_files 107 inputs += scripts_for_in_files
106 } 108 }
107 outputs = invoker.outputs 109 outputs = invoker.outputs
108 110
109 # Extract the directory to write files to. 111 # Extract the directory to write files to.
110 output_dir = get_path_info(outputs[0], "dir") 112 output_dir = get_path_info(outputs[0], "dir")
111 113
112 args = rebase_path(invoker.in_files, root_build_dir) + [ 114 args = rebase_path(invoker.in_files, root_build_dir) + [
113 "--output_dir", rebase_path(output_dir, root_build_dir), 115 "--output_dir",
114 ] 116 rebase_path(output_dir, root_build_dir),
117 ]
115 if (defined(invoker.other_args)) { 118 if (defined(invoker.other_args)) {
116 args += invoker.other_args 119 args += invoker.other_args
117 } 120 }
118 121
119 deps = make_core_generated_deps 122 deps = make_core_generated_deps
120 } 123 }
121 124
122 source_set(target_name) { 125 source_set(target_name) {
123 sources = invoker.outputs 126 sources = invoker.outputs
124 127
125 configs += [ 128 configs += [
126 "//build/config/compiler:wexit_time_destructors", 129 "//build/config/compiler:wexit_time_destructors",
127 "//sky/engine:inside_blink", 130 "//sky/engine:inside_blink",
128 "//sky/engine:config" 131 "//sky/engine:config",
129 ] 132 ]
130 133
131 deps = [ 134 deps = [
132 ":$generator_target_name", 135 ":$generator_target_name",
133 ] 136 ]
134 if (defined(invoker.deps)) { 137 if (defined(invoker.deps)) {
135 deps += invoker.deps 138 deps += invoker.deps
136 } 139 }
137 } 140 }
138 } 141 }
139 142
140 # Template for scripts using css_properties.py. This is a special case of 143 # Template for scripts using css_properties.py. This is a special case of
141 # process_in_files. 144 # process_in_files.
142 # outputs: expected results 145 # outputs: expected results
143 template("css_properties") { 146 template("css_properties") {
144 process_in_files(target_name) { 147 process_in_files(target_name) {
145 script = invoker.script 148 script = invoker.script
146 in_files = ["css/CSSProperties.in"] 149 in_files = [ "css/CSSProperties.in" ]
147 other_inputs = css_properties_files 150 other_inputs = css_properties_files
148 if (defined(invoker.other_inputs)) { 151 if (defined(invoker.other_inputs)) {
149 other_inputs += invoker.other_inputs 152 other_inputs += invoker.other_inputs
150 } 153 }
151 other_args = [ 154 other_args = [
152 "--gperf", gperf_exe, 155 "--gperf",
156 gperf_exe,
153 ] 157 ]
154 outputs = invoker.outputs 158 outputs = invoker.outputs
155 159
156 deps = [ 160 deps = [
157 "//sky/engine/wtf", 161 "//sky/engine/wtf",
158 ] 162 ]
159 163
160 if (defined(invoker.deps)) { 164 if (defined(invoker.deps)) {
161 deps += invoker.deps 165 deps += invoker.deps
162 } 166 }
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
227 } 231 }
228 232
229 # Calls the make_token_matcher script. 233 # Calls the make_token_matcher script.
230 # input_file: The "*-in.cpp" file 234 # input_file: The "*-in.cpp" file
231 # output_file: The output file 235 # output_file: The output file
232 template("make_token_matcher") { 236 template("make_token_matcher") {
233 action(target_name) { 237 action(target_name) {
234 script = "//sky/engine/build/scripts/make_token_matcher.py" 238 script = "//sky/engine/build/scripts/make_token_matcher.py"
235 239
236 inputs = scripts_for_in_files + [ invoker.input_file ] 240 inputs = scripts_for_in_files + [ invoker.input_file ]
237 outputs = [ invoker.output_file ] 241 outputs = [
242 invoker.output_file,
243 ]
238 244
239 args = [ 245 args = [
240 rebase_path(invoker.input_file, root_build_dir), 246 rebase_path(invoker.input_file, root_build_dir),
241 rebase_path(invoker.output_file, root_build_dir), 247 rebase_path(invoker.output_file, root_build_dir),
242 ] 248 ]
243 249
244 deps = make_core_generated_deps 250 deps = make_core_generated_deps
245 } 251 }
246 } 252 }
247
OLDNEW
« no previous file with comments | « sky/engine/bindings/templates/templates.gni ('k') | sky/engine/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698