| 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 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 # http://crbug.com/358074 | 172 # http://crbug.com/358074 |
| 173 "//third_party/WebKit/Source/bindings/modules:interfaces_info", | 173 "//third_party/WebKit/Source/bindings/modules:interfaces_info", |
| 174 | 174 |
| 175 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", | 175 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", |
| 176 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", | 176 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", |
| 177 "//third_party/WebKit/Source/core:generated_testing_idls", | 177 "//third_party/WebKit/Source/core:generated_testing_idls", |
| 178 ] | 178 ] |
| 179 } | 179 } |
| 180 } | 180 } |
| 181 | 181 |
| 182 # Runs the idl_compiler to generate IDL dictionary impl files. | 182 # Runs the idl_compiler to generate IDL dictionary and union impl files. |
| 183 # | 183 # |
| 184 # Parameters: | 184 # Parameters: |
| 185 # sources = a list of IDL files to process | 185 # sources = a list of IDL files to process |
| 186 # outputs = a list of files to write to | 186 # outputs = a list of files to write to |
| 187 template("idl_dictionary") { | 187 # output_dir = the directory to put the output files |
| 188 output_dir = "$root_gen_dir/blink/" | 188 # individual_info = a filename of pickle file which contains idl union types |
| 189 # target_component = component to generate code for |
| 190 template("idl_impl") { |
| 191 dictionary_impl_output_dir = "$root_gen_dir/blink/" |
| 189 | 192 |
| 190 action(target_name) { | 193 action(target_name) { |
| 191 script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py" | 194 script = "//third_party/WebKit/Source/bindings/scripts/idl_compiler.py" |
| 192 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" | 195 idl_files_list = "$target_gen_dir/${target_name}_file_list.tmp" |
| 193 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) | 196 write_file(idl_files_list, rebase_path(invoker.sources, root_build_dir)) |
| 194 | 197 |
| 195 inputs = [ idl_files_list ] + invoker.sources | 198 inputs = [ idl_files_list ] + invoker.sources |
| 196 outputs = invoker.outputs | 199 outputs = invoker.outputs |
| 197 | 200 |
| 198 args = [ | 201 args = [ |
| 199 "--cache-dir", | 202 "--cache-dir", |
| 200 rebase_path(bindings_scripts_output_dir, root_build_dir), | 203 rebase_path(bindings_scripts_output_dir, root_build_dir), |
| 201 "--output-dir", | 204 "--output-dir", |
| 202 rebase_path(output_dir, root_build_dir), | 205 rebase_path(invoker.output_dir, root_build_dir), |
| 206 "--dictionary-impl-output-dir", |
| 207 rebase_path(dictionary_impl_output_dir, root_build_dir), |
| 203 "--interfaces-info", | 208 "--interfaces-info", |
| 204 rebase_path("$bindings_modules_output_dir/InterfacesInfoModules.pickle", | 209 rebase_path("$bindings_modules_output_dir/InterfacesInfoModules.pickle", |
| 205 root_build_dir), | 210 root_build_dir), |
| 211 "--individual-info", |
| 212 rebase_path(invoker.individual_info, root_build_dir), |
| 213 "--target-component", |
| 214 invoker.target_component, |
| 206 "--write-file-only-if-changed=1", | 215 "--write-file-only-if-changed=1", |
| 207 "--generate-dictionary-impl", | 216 "--generate-impl", |
| 208 rebase_path(idl_files_list, root_build_dir), | 217 rebase_path(idl_files_list, root_build_dir), |
| 209 ] | 218 ] |
| 210 | 219 |
| 211 deps = [ | 220 deps = [ |
| 212 # FIXME: should be interfaces_info_core (w/o modules) | 221 # FIXME: should be interfaces_info_core (w/o modules) |
| 213 # http://crbug.com/358074 | 222 # http://crbug.com/358074 |
| 214 "//third_party/WebKit/Source/bindings/modules:interfaces_info", | 223 "//third_party/WebKit/Source/bindings/modules:interfaces_info", |
| 215 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", | 224 "//third_party/WebKit/Source/bindings/scripts:cached_lex_yacc_tables", |
| 216 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", | 225 "//third_party/WebKit/Source/bindings/scripts:cached_jinja_templates", |
| 217 ] | 226 ] |
| (...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 331 output_header_files += [ | 340 output_header_files += [ |
| 332 "$output_dir/${interface}${component}Constructors.h" | 341 "$output_dir/${interface}${component}Constructors.h" |
| 333 ] | 342 ] |
| 334 } | 343 } |
| 335 | 344 |
| 336 outputs = output_idl_files + output_header_files | 345 outputs = output_idl_files + output_header_files |
| 337 deps = invoker.deps | 346 deps = invoker.deps |
| 338 } | 347 } |
| 339 } | 348 } |
| 340 | 349 |
| OLD | NEW |