OLD | NEW |
1 # Copyright 2016 The Chromium Authors. All rights reserved. | 1 # Copyright 2016 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 # This template will generate inspector protocol source code. The code will | 5 # This template will generate inspector protocol source code. The code will |
6 # not be compiled, use get_target_outputs(<name>) to compile them. | 6 # not be compiled, use get_target_outputs(<name>) to compile them. |
7 # | 7 # |
8 # Inputs | 8 # Inputs |
9 # | 9 # |
10 # config_file (required) | 10 # config_file (required) |
11 # Path to json file specifying inspector protocol configuration. | 11 # Path to json file specifying inspector protocol configuration. |
12 # | 12 # |
13 # out_dir (required) | 13 # out_dir (required) |
14 # Path to put the generated files in. It must be inside output or | 14 # Path to put the generated files in. It must be inside output or |
15 # generated file directory. | 15 # generated file directory. |
16 # | 16 # |
17 # outputs (required) | 17 # outputs (required) |
18 # Files generated. Relative to out_dir. | 18 # Files generated. Relative to out_dir. |
19 # | 19 # |
20 # inputs (optional) | 20 # inputs (optional) |
21 # Extra inputs specified by the config file. | 21 # Extra inputs specified by the config file. |
22 template("inspector_protocol_generate") { | 22 template("inspector_protocol_generate") { |
23 assert(defined(invoker.config_file)) | 23 assert(defined(invoker.config_file)) |
24 assert(defined(invoker.out_dir)) | 24 assert(defined(invoker.out_dir)) |
25 assert(defined(invoker.outputs)) | 25 assert(defined(invoker.outputs)) |
26 | 26 assert(defined(invoker.inspector_protocol_dir)) |
27 inspector_protocol_dir = | 27 inspector_protocol_dir = invoker.inspector_protocol_dir |
28 "//third_party/WebKit/Source/platform/inspector_protocol" | |
29 | 28 |
30 action(target_name) { | 29 action(target_name) { |
31 script = "$inspector_protocol_dir/CodeGenerator.py" | 30 script = "$inspector_protocol_dir/CodeGenerator.py" |
32 | 31 |
33 inputs = [ | 32 inputs = [ |
34 invoker.config_file, | 33 invoker.config_file, |
35 "$inspector_protocol_dir/lib/Allocator_h.template", | 34 "$inspector_protocol_dir/lib/Allocator_h.template", |
36 "$inspector_protocol_dir/lib/Array_h.template", | 35 "$inspector_protocol_dir/lib/Array_h.template", |
37 "$inspector_protocol_dir/lib/BackendCallback_h.template", | 36 "$inspector_protocol_dir/lib/BackendCallback_h.template", |
38 "$inspector_protocol_dir/lib/Collections_h.template", | 37 "$inspector_protocol_dir/lib/Collections_h.template", |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 "abspath") | 72 "abspath") |
74 | 73 |
75 forward_variables_from(invoker, | 74 forward_variables_from(invoker, |
76 [ | 75 [ |
77 "visibility", | 76 "visibility", |
78 "deps", | 77 "deps", |
79 "public_deps", | 78 "public_deps", |
80 ]) | 79 ]) |
81 } | 80 } |
82 } | 81 } |
OLD | NEW |