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

Side by Side Diff: third_party/WebKit/Source/build/scripts/scripts.gni

Issue 2328773002: Remove more blink modules gypi code. (Closed)
Patch Set: Selling correction Created 4 years, 3 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
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/config.gni") 5 import("//third_party/WebKit/Source/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 = "//third_party/WebKit/Source/build/scripts" 9 _scripts_dir = "//third_party/WebKit/Source/build/scripts"
10 10
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 # script: script to run. 87 # script: script to run.
88 # in_files: ".in" files to pass to the script 88 # in_files: ".in" files to pass to the script
89 # other_inputs: (optional) other input files the script depends on 89 # other_inputs: (optional) other input files the script depends on
90 # defaults to "scripts_for_in_files" (if specified, we assume 90 # defaults to "scripts_for_in_files" (if specified, we assume
91 # that the contents of "scripts_for_in_files" are included in 91 # that the contents of "scripts_for_in_files" are included in
92 # this list specified since this is how these lists are filled 92 # this list specified since this is how these lists are filled
93 # from the GYP build. 93 # from the GYP build.
94 # outputs: expected results. Note that the directory of the 0th item in this 94 # outputs: expected results. Note that the directory of the 0th item in this
95 # list will be taken to be the output path. 95 # list will be taken to be the output path.
96 # other_args: (optional) other arguments to pass to the script. 96 # other_args: (optional) other arguments to pass to the script.
97 # deps [optional]: additional depenendencies 97 # deps [optional]:
98 # Depenendencies. If unspecified defaults to make_core_generated_deps.
98 template("process_in_files") { 99 template("process_in_files") {
99 action(target_name) { 100 action(target_name) {
100 script = invoker.script 101 script = invoker.script
101 102
102 inputs = invoker.in_files 103 inputs = invoker.in_files
103 if (defined(invoker.other_inputs)) { 104 if (defined(invoker.other_inputs)) {
104 inputs += invoker.other_inputs 105 inputs += invoker.other_inputs
105 } else { 106 } else {
106 inputs += scripts_for_in_files 107 inputs += scripts_for_in_files
107 } 108 }
108 outputs = invoker.outputs 109 outputs = invoker.outputs
109 110
110 # Extract the directory to write files to. 111 # Extract the directory to write files to.
111 output_dir = get_path_info(outputs[0], "dir") 112 output_dir = get_path_info(outputs[0], "dir")
112 113
113 args = rebase_path(invoker.in_files, root_build_dir) + [ 114 args = rebase_path(invoker.in_files, root_build_dir) + [
114 "--output_dir", 115 "--output_dir",
115 rebase_path(output_dir, root_build_dir), 116 rebase_path(output_dir, root_build_dir),
116 ] 117 ]
117 if (defined(invoker.other_args)) { 118 if (defined(invoker.other_args)) {
118 args += invoker.other_args 119 args += invoker.other_args
119 } 120 }
120 121
121 deps = make_core_generated_deps
122 if (defined(invoker.deps)) { 122 if (defined(invoker.deps)) {
123 deps += invoker.deps 123 deps = invoker.deps
124 } else {
125 deps = make_core_generated_deps
124 } 126 }
127 forward_variables_from(invoker, [ "visibility" ])
125 } 128 }
126 } 129 }
127 130
128 # Template for scripts using css_properties.py. This is a special case of 131 # Template for scripts using css_properties.py. This is a special case of
129 # process_in_files. 132 # process_in_files.
130 # outputs: expected results 133 # outputs: expected results
131 template("css_properties") { 134 template("css_properties") {
132 process_in_files(target_name) { 135 process_in_files(target_name) {
133 script = invoker.script 136 script = invoker.script
134 in_files = [ "css/CSSProperties.in" ] 137 in_files = [ "css/CSSProperties.in" ]
135 other_inputs = css_properties_files 138 other_inputs = css_properties_files
136 if (defined(invoker.other_inputs)) { 139 if (defined(invoker.other_inputs)) {
137 other_inputs += invoker.other_inputs 140 other_inputs += invoker.other_inputs
138 } 141 }
139 other_args = [ 142 other_args = [
140 "--gperf", 143 "--gperf",
141 gperf_exe, 144 gperf_exe,
142 ] 145 ]
143 outputs = invoker.outputs 146 outputs = invoker.outputs
144 } 147 }
145 } 148 }
146 149
147 # Template to run the make_names script. This is a special case of 150 # Template to run the make_names script. This is a special case of
148 # process_in_files. 151 # process_in_files.
149 # in_files: files to pass to the script 152 # in_files: files to pass to the script
150 # outputs: expected results 153 # outputs: expected results
151 # deps [optional]: additional dependencies 154 # deps [optional]:
155 # Dependencies. See process_in_files for definition.
152 template("make_names") { 156 template("make_names") {
153 process_in_files(target_name) { 157 process_in_files(target_name) {
154 script = "//third_party/WebKit/Source/build/scripts/make_names.py" 158 script = "//third_party/WebKit/Source/build/scripts/make_names.py"
155 in_files = invoker.in_files
156 other_inputs = make_names_files 159 other_inputs = make_names_files
157 outputs = invoker.outputs 160 forward_variables_from(invoker,
158 if (defined(invoker.deps)) { 161 [
159 deps = invoker.deps 162 "deps",
160 } 163 "in_files",
164 "outputs",
165 "public_deps",
166 "visibility",
167 ])
161 } 168 }
162 } 169 }
163 170
164 # Template to run the make_qualified_names script. This is a special case of 171 # Template to run the make_qualified_names script. This is a special case of
165 # process_in_files. 172 # process_in_files.
166 # in_files: list of ".in" files to process. 173 # in_files: list of ".in" files to process.
167 # outputs: list of output files 174 # outputs: list of output files
168 template("make_qualified_names") { 175 template("make_qualified_names") {
169 process_in_files(target_name) { 176 process_in_files(target_name) {
170 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py" 177 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py"
171 in_files = invoker.in_files 178 in_files = invoker.in_files
172 other_inputs = make_qualified_names_files 179 other_inputs = make_qualified_names_files
173 outputs = invoker.outputs 180 outputs = invoker.outputs
174 } 181 }
175 } 182 }
176 183
177 # Calls the make_event_factory script. This is a special case of 184 # Calls the make_event_factory script. This is a special case of
178 # process_in_files. 185 # process_in_files.
179 # in_files: list of ".in" files to process. 186 # in_files: list of ".in" files to process.
180 # outputs: list of output files 187 # outputs: list of output files
181 # deps [optional]: additional depenendencies 188 # deps [optional]
189 # Dependencies. See process_in_files for definition.
182 template("make_event_factory") { 190 template("make_event_factory") {
183 process_in_files(target_name) { 191 process_in_files(target_name) {
184 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py" 192 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py"
185 in_files = invoker.in_files
186 other_inputs = make_event_factory_files 193 other_inputs = make_event_factory_files
187 outputs = invoker.outputs 194 forward_variables_from(invoker,
188 if (defined(invoker.deps)) { 195 [
189 deps = invoker.deps 196 "deps",
190 } 197 "in_files",
198 "outputs",
199 "visibility",
200 ])
191 } 201 }
192 } 202 }
193 203
194 # Calls the make_token_matcher script. 204 # Calls the make_token_matcher script.
195 # input_file: The "*-in.cpp" file 205 # input_file: The "*-in.cpp" file
196 # output_file: The output file 206 # output_file: The output file
197 template("make_token_matcher") { 207 template("make_token_matcher") {
198 action(target_name) { 208 action(target_name) {
199 script = "//third_party/WebKit/Source/build/scripts/make_token_matcher.py" 209 script = "//third_party/WebKit/Source/build/scripts/make_token_matcher.py"
200 210
201 inputs = scripts_for_in_files + [ invoker.input_file ] 211 inputs = scripts_for_in_files + [ invoker.input_file ]
202 outputs = [ 212 outputs = [
203 invoker.output_file, 213 invoker.output_file,
204 ] 214 ]
205 215
206 args = [ 216 args = [
207 rebase_path(invoker.input_file, root_build_dir), 217 rebase_path(invoker.input_file, root_build_dir),
208 rebase_path(invoker.output_file, root_build_dir), 218 rebase_path(invoker.output_file, root_build_dir),
209 ] 219 ]
210 220
211 deps = make_core_generated_deps 221 deps = make_core_generated_deps
212 } 222 }
213 } 223 }
OLDNEW
« no previous file with comments | « third_party/WebKit/Source/bindings/modules/BUILD.gn ('k') | third_party/WebKit/Source/core/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698