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

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

Issue 2328033002: Revert of Remove more blink modules gypi code. (Closed)
Patch Set: 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]: 97 # deps [optional]: additional depenendencies
98 # Depenendencies. If unspecified defaults to make_core_generated_deps.
99 template("process_in_files") { 98 template("process_in_files") {
100 action(target_name) { 99 action(target_name) {
101 script = invoker.script 100 script = invoker.script
102 101
103 inputs = invoker.in_files 102 inputs = invoker.in_files
104 if (defined(invoker.other_inputs)) { 103 if (defined(invoker.other_inputs)) {
105 inputs += invoker.other_inputs 104 inputs += invoker.other_inputs
106 } else { 105 } else {
107 inputs += scripts_for_in_files 106 inputs += scripts_for_in_files
108 } 107 }
109 outputs = invoker.outputs 108 outputs = invoker.outputs
110 109
111 # Extract the directory to write files to. 110 # Extract the directory to write files to.
112 output_dir = get_path_info(outputs[0], "dir") 111 output_dir = get_path_info(outputs[0], "dir")
113 112
114 args = rebase_path(invoker.in_files, root_build_dir) + [ 113 args = rebase_path(invoker.in_files, root_build_dir) + [
115 "--output_dir", 114 "--output_dir",
116 rebase_path(output_dir, root_build_dir), 115 rebase_path(output_dir, root_build_dir),
117 ] 116 ]
118 if (defined(invoker.other_args)) { 117 if (defined(invoker.other_args)) {
119 args += invoker.other_args 118 args += invoker.other_args
120 } 119 }
121 120
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
126 } 124 }
127 forward_variables_from(invoker, [ "visibility" ])
128 } 125 }
129 } 126 }
130 127
131 # Template for scripts using css_properties.py. This is a special case of 128 # Template for scripts using css_properties.py. This is a special case of
132 # process_in_files. 129 # process_in_files.
133 # outputs: expected results 130 # outputs: expected results
134 template("css_properties") { 131 template("css_properties") {
135 process_in_files(target_name) { 132 process_in_files(target_name) {
136 script = invoker.script 133 script = invoker.script
137 in_files = [ "css/CSSProperties.in" ] 134 in_files = [ "css/CSSProperties.in" ]
138 other_inputs = css_properties_files 135 other_inputs = css_properties_files
139 if (defined(invoker.other_inputs)) { 136 if (defined(invoker.other_inputs)) {
140 other_inputs += invoker.other_inputs 137 other_inputs += invoker.other_inputs
141 } 138 }
142 other_args = [ 139 other_args = [
143 "--gperf", 140 "--gperf",
144 gperf_exe, 141 gperf_exe,
145 ] 142 ]
146 outputs = invoker.outputs 143 outputs = invoker.outputs
147 } 144 }
148 } 145 }
149 146
150 # Template to run the make_names script. This is a special case of 147 # Template to run the make_names script. This is a special case of
151 # process_in_files. 148 # process_in_files.
152 # in_files: files to pass to the script 149 # in_files: files to pass to the script
153 # outputs: expected results 150 # outputs: expected results
154 # deps [optional]: 151 # deps [optional]: additional dependencies
155 # Dependencies. See process_in_files for definition.
156 template("make_names") { 152 template("make_names") {
157 process_in_files(target_name) { 153 process_in_files(target_name) {
158 script = "//third_party/WebKit/Source/build/scripts/make_names.py" 154 script = "//third_party/WebKit/Source/build/scripts/make_names.py"
155 in_files = invoker.in_files
159 other_inputs = make_names_files 156 other_inputs = make_names_files
160 forward_variables_from(invoker, 157 outputs = invoker.outputs
161 [ 158 if (defined(invoker.deps)) {
162 "deps", 159 deps = invoker.deps
163 "in_files", 160 }
164 "outputs",
165 "public_deps",
166 "visibility",
167 ])
168 } 161 }
169 } 162 }
170 163
171 # Template to run the make_qualified_names script. This is a special case of 164 # Template to run the make_qualified_names script. This is a special case of
172 # process_in_files. 165 # process_in_files.
173 # in_files: list of ".in" files to process. 166 # in_files: list of ".in" files to process.
174 # outputs: list of output files 167 # outputs: list of output files
175 template("make_qualified_names") { 168 template("make_qualified_names") {
176 process_in_files(target_name) { 169 process_in_files(target_name) {
177 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py" 170 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py"
178 in_files = invoker.in_files 171 in_files = invoker.in_files
179 other_inputs = make_qualified_names_files 172 other_inputs = make_qualified_names_files
180 outputs = invoker.outputs 173 outputs = invoker.outputs
181 } 174 }
182 } 175 }
183 176
184 # Calls the make_event_factory script. This is a special case of 177 # Calls the make_event_factory script. This is a special case of
185 # process_in_files. 178 # process_in_files.
186 # in_files: list of ".in" files to process. 179 # in_files: list of ".in" files to process.
187 # outputs: list of output files 180 # outputs: list of output files
188 # deps [optional] 181 # deps [optional]: additional depenendencies
189 # Dependencies. See process_in_files for definition.
190 template("make_event_factory") { 182 template("make_event_factory") {
191 process_in_files(target_name) { 183 process_in_files(target_name) {
192 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py" 184 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py"
185 in_files = invoker.in_files
193 other_inputs = make_event_factory_files 186 other_inputs = make_event_factory_files
194 forward_variables_from(invoker, 187 outputs = invoker.outputs
195 [ 188 if (defined(invoker.deps)) {
196 "deps", 189 deps = invoker.deps
197 "in_files", 190 }
198 "outputs",
199 "visibility",
200 ])
201 } 191 }
202 } 192 }
203 193
204 # Calls the make_token_matcher script. 194 # Calls the make_token_matcher script.
205 # input_file: The "*-in.cpp" file 195 # input_file: The "*-in.cpp" file
206 # output_file: The output file 196 # output_file: The output file
207 template("make_token_matcher") { 197 template("make_token_matcher") {
208 action(target_name) { 198 action(target_name) {
209 script = "//third_party/WebKit/Source/build/scripts/make_token_matcher.py" 199 script = "//third_party/WebKit/Source/build/scripts/make_token_matcher.py"
210 200
211 inputs = scripts_for_in_files + [ invoker.input_file ] 201 inputs = scripts_for_in_files + [ invoker.input_file ]
212 outputs = [ 202 outputs = [
213 invoker.output_file, 203 invoker.output_file,
214 ] 204 ]
215 205
216 args = [ 206 args = [
217 rebase_path(invoker.input_file, root_build_dir), 207 rebase_path(invoker.input_file, root_build_dir),
218 rebase_path(invoker.output_file, root_build_dir), 208 rebase_path(invoker.output_file, root_build_dir),
219 ] 209 ]
220 210
221 deps = make_core_generated_deps 211 deps = make_core_generated_deps
222 } 212 }
223 } 213 }
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