OLD | NEW |
1 # Copyright 2015 The Chromium Authors. All rights reserved. | 1 # Copyright 2015 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 # Template to generate a dart embedder package. | 5 # Template to generate a dart embedder package. |
6 # Required invoker inputs: | 6 # Required invoker inputs: |
7 # String package (relative path to package e.g. mojo/public/interfaces/applica
tion) | 7 # String package (relative path to package e.g. mojo/public/interfaces/applica
tion) |
8 template("dart_embedder_package") { | 8 template("dart_embedder_package") { |
9 package = invoker.package | 9 package = invoker.package |
10 package_path = "//$package" | 10 package_path = "//$package" |
(...skipping 30 matching lines...) Expand all Loading... |
41 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}
}"), | 41 "$root_gen_dir/dart_embedder_packages/$destination/{{source_file_part}
}"), |
42 ] | 42 ] |
43 } | 43 } |
44 } | 44 } |
45 | 45 |
46 # Template to generate a dart embedder resource.cc file. | 46 # Template to generate a dart embedder resource.cc file. |
47 # Required invoker inputs: | 47 # Required invoker inputs: |
48 # String output (name of output file) | 48 # String output (name of output file) |
49 # List inputs (list of input files to be included) | 49 # List inputs (list of input files to be included) |
50 # String table_name (name of symbol for resource table) | 50 # String table_name (name of symbol for resource table) |
| 51 # String root_prefix (base directory of resources) |
51 # Optional invoker inputs: | 52 # Optional invoker inputs: |
52 # String input_directory (directory of resources that are recursively added) | 53 # String input_directory (directory of resources that are recursively added) |
53 # List deps | 54 # List deps |
54 # List datadeps | 55 # List datadeps |
55 template("dart_embedder_resources") { | 56 template("dart_embedder_resources") { |
56 action(target_name) { | 57 action(target_name) { |
57 script = "//dart/runtime/tools/create_resources.py" | 58 script = "//dart/runtime/tools/create_resources.py" |
58 deps = [] | 59 deps = [] |
59 if (defined(invoker.deps)) { | 60 if (defined(invoker.deps)) { |
60 deps += invoker.deps | 61 deps += invoker.deps |
61 } | 62 } |
62 datadeps = [] | 63 datadeps = [] |
63 if (defined(invoker.datadeps)) { | 64 if (defined(invoker.datadeps)) { |
64 datadeps = invoker.datadeps | 65 datadeps = invoker.datadeps |
65 } | 66 } |
66 | 67 |
67 output = invoker.output | 68 output = invoker.output |
68 outputs = [ | 69 outputs = [ |
69 output, | 70 output, |
70 ] | 71 ] |
71 | 72 |
72 inputs = [ script ] + invoker.inputs | 73 inputs = [ script ] + invoker.inputs |
73 | 74 |
| 75 root_prefix = rebase_path(invoker.root_prefix) |
| 76 |
74 args = [ | 77 args = [ |
75 "--output", | 78 "--output", |
76 rebase_path(output), | 79 rebase_path(output), |
77 "--outer_namespace", | 80 "--outer_namespace", |
78 "mojo", | 81 "mojo", |
79 "--inner_namespace", | 82 "--inner_namespace", |
80 "dart", | 83 "dart", |
81 "--table_name", | 84 "--table_name", |
82 invoker.table_name, | 85 invoker.table_name, |
83 "--root_prefix", | 86 "--root_prefix", |
84 rebase_path("//mojo/dart/embedder/"), | 87 root_prefix, |
85 ] | 88 ] |
86 if (defined(invoker.input_directory)) { | 89 if (defined(invoker.input_directory)) { |
87 args += [ | 90 args += [ |
88 "--client_root", | 91 "--client_root", |
89 rebase_path(invoker.input_directory), | 92 rebase_path(invoker.input_directory), |
90 ] | 93 ] |
91 } | 94 } |
92 args += rebase_path(invoker.inputs) | 95 args += rebase_path(invoker.inputs) |
93 } | 96 } |
94 } | 97 } |
OLD | NEW |