| OLD | NEW |
| (Empty) |
| 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 | |
| 3 # found in the LICENSE file. | |
| 4 | |
| 5 import("//sky/engine/bindings/bindings.gni") | |
| 6 import("//sky/engine/build/scripts/scripts.gni") | |
| 7 import("//sky/engine/core/core.gni") | |
| 8 | |
| 9 visibility = [ "//sky/*" ] | |
| 10 | |
| 11 # Main interface IDL files (excluding dependencies and testing) | |
| 12 # are included as properties on global objects, and in aggregate bindings. | |
| 13 main_interface_idl_files = core_idl_files | |
| 14 | |
| 15 main_interface_idl_files_list = "$target_gen_dir/main_interface_idl_files.tmp" | |
| 16 write_file(main_interface_idl_files_list, | |
| 17 rebase_path(main_interface_idl_files, root_build_dir)) | |
| 18 | |
| 19 generated_global_constructors_idl_files = | |
| 20 [ "$sky_output_dir/WindowConstructors.idl" ] | |
| 21 generated_global_constructors_header_files = | |
| 22 [ "$sky_output_dir/WindowConstructors.h" ] | |
| 23 | |
| 24 # FIXME: Generate separate core_global_objects | |
| 25 # http://crbug.com/358074 | |
| 26 # GYP version: generated.gyp:global_objects | |
| 27 action("global_objects") { | |
| 28 script = "scripts/compute_global_objects.py" | |
| 29 | |
| 30 inputs = [ | |
| 31 "scripts/utilities.py", | |
| 32 | |
| 33 # Only look in main IDL files (exclude dependencies and testing, | |
| 34 # which should not define global objects). | |
| 35 main_interface_idl_files_list, | |
| 36 ] + main_interface_idl_files | |
| 37 | |
| 38 outputs = [ | |
| 39 "$bindings_output_dir/GlobalObjects.pickle", | |
| 40 ] | |
| 41 | |
| 42 args = [ | |
| 43 "--idl-files-list", | |
| 44 rebase_path(main_interface_idl_files_list, root_build_dir), | |
| 45 "--write-file-only-if-changed=1", # Always true for Ninja. FIXME: remove | |
| 46 # when everything switched to GN. | |
| 47 "--", | |
| 48 rebase_path("$bindings_output_dir/GlobalObjects.pickle", root_build_dir), | |
| 49 ] | |
| 50 } | |
| 51 | |
| 52 # GYP version: generated.gyp:global_constructors_idls | |
| 53 action("global_constructors_idls") { | |
| 54 script = "scripts/generate_global_constructors.py" | |
| 55 | |
| 56 inputs = [ | |
| 57 "scripts/generate_global_constructors.py", | |
| 58 "scripts/utilities.py", | |
| 59 "$bindings_output_dir/GlobalObjects.pickle", | |
| 60 | |
| 61 # Only includes main IDL files (exclude dependencies and testing, | |
| 62 # which should not appear on global objects). | |
| 63 main_interface_idl_files_list, | |
| 64 ] + main_interface_idl_files | |
| 65 | |
| 66 outputs = generated_global_constructors_idl_files + | |
| 67 generated_global_constructors_header_files | |
| 68 | |
| 69 args = [ | |
| 70 "--idl-files-list", | |
| 71 rebase_path(main_interface_idl_files_list, root_build_dir), | |
| 72 "--global-objects-file", | |
| 73 rebase_path("$bindings_output_dir/GlobalObjects.pickle", root_build_dir), | |
| 74 "--write-file-only-if-changed=1", # Always true for Ninja. | |
| 75 "--", | |
| 76 "Window", | |
| 77 rebase_path("$sky_output_dir/WindowConstructors.idl", root_build_dir), | |
| 78 ] | |
| 79 | |
| 80 deps = [ | |
| 81 ":global_objects", | |
| 82 ] | |
| 83 } | |
| 84 | |
| 85 # GYP version: generated.gyp:generated_idls | |
| 86 group("generated_idls") { | |
| 87 deps = [ | |
| 88 ":global_constructors_idls", | |
| 89 "//sky/engine/core:generated_testing_idls", | |
| 90 ] | |
| 91 } | |
| OLD | NEW |