| 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/bindings/core/v8/generated.gni") | 5 import("//third_party/WebKit/Source/bindings/core/v8/generated.gni") |
| 6 import("//third_party/WebKit/Source/bindings/modules/idl.gni") | 6 import("//third_party/WebKit/Source/bindings/modules/idl.gni") |
| 7 import("//third_party/WebKit/Source/bindings/modules/modules.gni") | 7 import("//third_party/WebKit/Source/bindings/modules/modules.gni") |
| 8 | 8 |
| 9 bindings_scripts_dir = get_path_info(".", "abspath") | 9 bindings_scripts_dir = get_path_info(".", "abspath") |
| 10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" | 10 bindings_scripts_output_dir = "$root_gen_dir/blink/bindings/scripts" |
| (...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 167 # http://crbug.com/358074 | 167 # http://crbug.com/358074 |
| 168 "//third_party/WebKit/Source/bindings/modules:interfaces_info", | 168 "//third_party/WebKit/Source/bindings/modules:interfaces_info", |
| 169 | 169 |
| 170 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", | 170 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", |
| 171 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", | 171 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", |
| 172 "//third_party/WebKit/Source/core:generated_testing_idls", | 172 "//third_party/WebKit/Source/core:generated_testing_idls", |
| 173 ] | 173 ] |
| 174 } | 174 } |
| 175 } | 175 } |
| 176 | 176 |
| 177 # Runs the idl_compiler to generate IDL dictionary impl files. |
| 178 # |
| 179 # Parameters: |
| 180 # sources = a list of IDL files to process |
| 181 # outputs = a list of files to write to |
| 182 template("idl_dictionary") { |
| 183 output_dir = "$root_gen_dir/blink/" |
| 184 |
| 185 action(target_name) { |
| 186 script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py" |
| 187 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" |
| 188 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) |
| 189 |
| 190 inputs = [ idl_files_list ] + invoker.sources |
| 191 outputs = invoker.outputs |
| 192 |
| 193 args = [ |
| 194 "--cache-dir", |
| 195 rebase_path(bindings_scripts_output_dir, root_build_dir), |
| 196 "--output-dir", |
| 197 rebase_path(output_dir, root_build_dir), |
| 198 "--interfaces-info", |
| 199 rebase_path("$bindings_modules_output_dir/InterfacesInfoModules.pickle", |
| 200 root_build_dir), |
| 201 "--write-file-only-if-changed=1", |
| 202 "--generate-dictionary-impl", |
| 203 rebase_path(idl_files_list, root_build_dir), |
| 204 ] |
| 205 |
| 206 deps = [ |
| 207 # FIXME: should be interfaces_info_core (w/o modules) |
| 208 # http://crbug.com/358074 |
| 209 "//third_party/WebKit/Source/bindings/modules:interfaces_info", |
| 210 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", |
| 211 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", |
| 212 ] |
| 213 } |
| 214 } |
| 215 |
| 177 # Calls the aggregate_generated_bindings script. | 216 # Calls the aggregate_generated_bindings script. |
| 178 # | 217 # |
| 179 # Parameters: | 218 # Parameters: |
| 180 # sources = a list of source IDL files. | 219 # sources = a list of source IDL files. |
| 181 # component_dir = Name of directory for these files (one word, no slashes). | 220 # component_dir = Name of directory for these files (one word, no slashes). |
| 182 # outputs = a list of files to write to. | 221 # outputs = a list of files to write to. |
| 183 template("aggregate_generated_bindings") { | 222 template("aggregate_generated_bindings") { |
| 184 action(target_name) { | 223 action(target_name) { |
| 185 script = "//third_party/WebKit/Source/bindings/scripts/aggregate_generated_b
indings.py" | 224 script = "//third_party/WebKit/Source/bindings/scripts/aggregate_generated_b
indings.py" |
| 186 | 225 |
| 187 # Write lists of main IDL files to a file, so that the command lines don't | 226 # Write lists of main IDL files to a file, so that the command lines don't |
| 188 # exceed OS length limits. | 227 # exceed OS length limits. |
| 189 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" | 228 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" |
| 190 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) | 229 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) |
| 191 | 230 |
| 192 inputs = [ idl_files_list ] + invoker.sources | 231 inputs = [ idl_files_list ] + invoker.sources |
| 193 outputs = invoker.outputs | 232 outputs = invoker.outputs |
| 194 | 233 |
| 195 args = [ | 234 args = [ |
| 196 invoker.component_dir, | 235 invoker.component_dir, |
| 197 rebase_path(idl_files_list, root_build_dir), | 236 rebase_path(idl_files_list, root_build_dir), |
| 198 "--", | 237 "--", |
| 199 ] | 238 ] |
| 200 args += rebase_path(invoker.outputs, root_build_dir) | 239 args += rebase_path(invoker.outputs, root_build_dir) |
| 201 } | 240 } |
| 202 } | 241 } |
| OLD | NEW |