| OLD | NEW |
| 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("//build/toolchain/toolchain.gni") | 5 import("//build/toolchain/toolchain.gni") |
| 6 import("//third_party/WebKit/Source/config.gni") | 6 import("//third_party/WebKit/Source/config.gni") |
| 7 | 7 |
| 8 # All paths in this file should be absolute so targets in any directory can use | 8 # All paths in this file should be absolute so targets in any directory can use |
| 9 # them without worrying about the current directory. | 9 # them without worrying about the current directory. |
| 10 _scripts_dir = "//third_party/WebKit/Source/build/scripts" | 10 _scripts_dir = "//third_party/WebKit/Source/build/scripts" |
| 11 | 11 |
| 12 scripts_for_in_files = [ | 12 scripts_for_in_files = [ |
| 13 # jinja2/__init__.py contains version string, so sufficient as | 13 # jinja2/__init__.py contains version string, so sufficient as |
| 14 # dependency for whole jinja2 package | 14 # dependency for whole jinja2 package |
| 15 "//third_party/jinja2/__init__.py", | 15 "//third_party/jinja2/__init__.py", |
| 16 "//third_party/markupsafe/__init__.py", # jinja2 dep | 16 "//third_party/markupsafe/__init__.py", # jinja2 dep |
| 17 "$_scripts_dir/hasher.py", | 17 "$_scripts_dir/hasher.py", |
| 18 "$_scripts_dir/in_file.py", | 18 "$_scripts_dir/in_file.py", |
| 19 "$_scripts_dir/in_generator.py", | 19 "$_scripts_dir/in_generator.py", |
| 20 "$_scripts_dir/license.py", | 20 "$_scripts_dir/license.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 = | 26 css_properties_files = |
| 27 scripts_for_in_files + [ "$_scripts_dir/css_properties.py" ] | 27 scripts_for_in_files + [ "$_scripts_dir/css_properties.py" ] |
| 28 | 28 |
| 29 make_css_property_api_files = [ |
| 30 "$_scripts_dir/templates/CSSPropertyAPIFiles.h.tmpl", |
| 31 "$_scripts_dir/templates/CSSPropertyDescriptor.cpp.tmpl", |
| 32 ] |
| 33 |
| 29 make_event_factory_files = scripts_for_in_files + [ | 34 make_event_factory_files = scripts_for_in_files + [ |
| 30 "$_scripts_dir/make_event_factory.py", | 35 "$_scripts_dir/make_event_factory.py", |
| 31 "$_scripts_dir/templates/EventFactory.cpp.tmpl", | 36 "$_scripts_dir/templates/EventFactory.cpp.tmpl", |
| 32 ] | 37 ] |
| 33 | 38 |
| 34 make_names_files = scripts_for_in_files + [ | 39 make_names_files = scripts_for_in_files + [ |
| 35 "$_scripts_dir/make_names.py", | 40 "$_scripts_dir/make_names.py", |
| 36 "$_scripts_dir/templates/MakeNames.cpp.tmpl", | 41 "$_scripts_dir/templates/MakeNames.cpp.tmpl", |
| 37 "$_scripts_dir/templates/MakeNames.h.tmpl", | 42 "$_scripts_dir/templates/MakeNames.h.tmpl", |
| 38 ] | 43 ] |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 176 # outputs: list of output files | 181 # outputs: list of output files |
| 177 template("make_qualified_names") { | 182 template("make_qualified_names") { |
| 178 process_in_files(target_name) { | 183 process_in_files(target_name) { |
| 179 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py" | 184 script = "//third_party/WebKit/Source/build/scripts/make_qualified_names.py" |
| 180 in_files = invoker.in_files | 185 in_files = invoker.in_files |
| 181 other_inputs = make_qualified_names_files | 186 other_inputs = make_qualified_names_files |
| 182 outputs = invoker.outputs | 187 outputs = invoker.outputs |
| 183 } | 188 } |
| 184 } | 189 } |
| 185 | 190 |
| 191 # Template to run the make_css_property_apis script. This is a special case of |
| 192 # process_in_files. |
| 193 # in_files: list of ".json5" files to process. |
| 194 # outputs: list of output files |
| 195 template("make_css_property_apis") { |
| 196 process_in_files(target_name) { |
| 197 script = |
| 198 "//third_party/WebKit/Source/build/scripts/make_css_property_apis.py" |
| 199 in_files = invoker.in_files |
| 200 other_inputs = make_css_property_api_files |
| 201 outputs = invoker.outputs |
| 202 } |
| 203 } |
| 204 |
| 186 # Calls the make_event_factory script. This is a special case of | 205 # Calls the make_event_factory script. This is a special case of |
| 187 # process_in_files. | 206 # process_in_files. |
| 188 # in_files: list of ".in" files to process. | 207 # in_files: list of ".in" files to process. |
| 189 # outputs: list of output files | 208 # outputs: list of output files |
| 190 # deps [optional] | 209 # deps [optional] |
| 191 # Dependencies. See process_in_files for definition. | 210 # Dependencies. See process_in_files for definition. |
| 192 template("make_event_factory") { | 211 template("make_event_factory") { |
| 193 process_in_files(target_name) { | 212 process_in_files(target_name) { |
| 194 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py" | 213 script = "//third_party/WebKit/Source/build/scripts/make_event_factory.py" |
| 195 other_inputs = make_event_factory_files | 214 other_inputs = make_event_factory_files |
| 196 forward_variables_from(invoker, | 215 forward_variables_from(invoker, |
| 197 [ | 216 [ |
| 198 "deps", | 217 "deps", |
| 199 "in_files", | 218 "in_files", |
| 200 "outputs", | 219 "outputs", |
| 201 "visibility", | 220 "visibility", |
| 202 ]) | 221 ]) |
| 203 } | 222 } |
| 204 } | 223 } |
| OLD | NEW |