| 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("//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 |
| 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 + [ |
| 27 "$_scripts_dir/css_properties.py", |
| 28 ] |
| 29 |
| 26 make_event_factory_files = scripts_for_in_files + [ | 30 make_event_factory_files = scripts_for_in_files + [ |
| 27 "$_scripts_dir/make_event_factory.py", | 31 "$_scripts_dir/make_event_factory.py", |
| 28 "$_scripts_dir/templates/EventFactory.cpp.tmpl", | 32 "$_scripts_dir/templates/EventFactory.cpp.tmpl", |
| 29 ] | 33 ] |
| 30 | 34 |
| 31 make_names_files = scripts_for_in_files + [ | 35 make_names_files = scripts_for_in_files + [ |
| 32 "$_scripts_dir/make_names.py", | 36 "$_scripts_dir/make_names.py", |
| 33 "$_scripts_dir/templates/MakeNames.cpp.tmpl", | 37 "$_scripts_dir/templates/MakeNames.cpp.tmpl", |
| 34 "$_scripts_dir/templates/MakeNames.h.tmpl", | 38 "$_scripts_dir/templates/MakeNames.h.tmpl", |
| 35 ] | 39 ] |
| (...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 "--output_dir", rebase_path(output_dir, root_build_dir), | 111 "--output_dir", rebase_path(output_dir, root_build_dir), |
| 108 ] | 112 ] |
| 109 if (defined(invoker.other_args)) { | 113 if (defined(invoker.other_args)) { |
| 110 args += invoker.other_args | 114 args += invoker.other_args |
| 111 } | 115 } |
| 112 | 116 |
| 113 deps = make_core_generated_deps | 117 deps = make_core_generated_deps |
| 114 } | 118 } |
| 115 } | 119 } |
| 116 | 120 |
| 121 # Template for scripts using css_properties.py. This is a special case of |
| 122 # process_in_files. |
| 123 # outputs: expected results |
| 124 template("css_properties") { |
| 125 process_in_files(target_name) { |
| 126 script = invoker.script |
| 127 in_files = ["css/CSSProperties.in"] |
| 128 other_inputs = css_properties_files |
| 129 if (defined(invoker.other_inputs)) { |
| 130 other_inputs += invoker.other_inputs |
| 131 } |
| 132 outputs = invoker.outputs |
| 133 } |
| 134 } |
| 135 |
| 117 # Template to run the make_names script. This is a special case of | 136 # Template to run the make_names script. This is a special case of |
| 118 # process_in_files. | 137 # process_in_files. |
| 119 # in_files: files to pass to the script | 138 # in_files: files to pass to the script |
| 120 # outputs: expected results | 139 # outputs: expected results |
| 121 template("make_names") { | 140 template("make_names") { |
| 122 process_in_files(target_name) { | 141 process_in_files(target_name) { |
| 123 script = "//third_party/WebKit/Source/build/scripts/make_names.py" | 142 script = "//third_party/WebKit/Source/build/scripts/make_names.py" |
| 124 in_files = invoker.in_files | 143 in_files = invoker.in_files |
| 125 other_inputs = make_names_files | 144 other_inputs = make_names_files |
| 126 outputs = invoker.outputs | 145 outputs = invoker.outputs |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 | 184 |
| 166 args = [ | 185 args = [ |
| 167 rebase_path(invoker.input_file, root_build_dir), | 186 rebase_path(invoker.input_file, root_build_dir), |
| 168 rebase_path(invoker.output_file, root_build_dir), | 187 rebase_path(invoker.output_file, root_build_dir), |
| 169 ] | 188 ] |
| 170 | 189 |
| 171 deps = make_core_generated_deps | 190 deps = make_core_generated_deps |
| 172 } | 191 } |
| 173 } | 192 } |
| 174 | 193 |
| OLD | NEW |