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 # Currently paths here are hard coded for convenience in building Mojo/Flutter. | 5 # Currently paths here are hard coded for convenience in building Mojo/Flutter. |
6 declare_args() { | 6 declare_args() { |
7 # Specify the path to a host compatible version of the Dart SDK. | 7 # Specify the path to a host compatible version of the Dart SDK. |
8 # This SDK is used to compile the Observatory frontend sources. | 8 # This SDK is used to compile the Observatory frontend sources. |
9 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk") | 9 dart_host_sdk = rebase_path("//third_party/dart-sdk/dart-sdk") |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... | |
34 deps = [ | 34 deps = [ |
35 ":copy_observatory", | 35 ":copy_observatory", |
36 ] | 36 ] |
37 | 37 |
38 script = "../../tools/observatory_tool.py" | 38 script = "../../tools/observatory_tool.py" |
39 | 39 |
40 inputs = [ | 40 inputs = [ |
41 rebase_path("pubspec.yaml"), | 41 rebase_path("pubspec.yaml"), |
42 ] | 42 ] |
43 | 43 |
44 current_dir = rebase_path(".", "//") | |
44 args = [ | 45 args = [ |
45 "--silent=True", | 46 "--silent=True", |
46 "--pub-executable", | 47 "--pub-executable", |
47 dart_host_pub_exe, | 48 dart_host_pub_exe, |
48 "--directory", | 49 "--directory", |
49 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), | 50 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"), |
50 "--command", | 51 "--command", |
51 "rewrite", | 52 "rewrite", |
52 rebase_path("../observatory/pubspec.yaml"), | 53 rebase_path("../observatory/pubspec.yaml"), |
53 rebase_path( | 54 rebase_path( |
54 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"), | 55 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml"), |
55 "../../third_party/", | 56 "../../third_party/", |
56 rebase_path("../../third_party/"), | 57 rebase_path("../../third_party/"), |
57 ] | 58 ] |
58 | 59 |
59 outputs = [ | 60 outputs = [ |
60 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", | 61 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml", |
61 ] | 62 ] |
62 } | 63 } |
63 | 64 |
64 action("copy_observatory_deps") { | 65 action("copy_observatory_deps") { |
65 deps = [ | 66 deps = [ |
66 ":write_observatory_pubspec_yaml", | 67 ":write_observatory_pubspec_yaml", |
67 ] | 68 ] |
68 | 69 |
69 script = "../../tools/observatory_tool.py" | 70 script = "../../tools/observatory_tool.py" |
70 | 71 |
72 current_dir = rebase_path(".", "//") | |
71 inputs = [ | 73 inputs = [ |
72 script, | 74 script, |
73 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", | 75 "$root_gen_dir/observatory_copy/$current_dir/pubspec.yaml", |
74 ] | 76 ] |
75 | 77 |
76 args = [ | 78 args = [ |
77 "--silent=True", | 79 "--silent=True", |
78 "--pub-executable", | 80 "--pub-executable", |
79 dart_host_pub_exe, | 81 dart_host_pub_exe, |
80 "--stamp", | 82 "--stamp", |
81 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/package s.stamp"), | 83 rebase_path("$root_gen_dir/observatory_copy/$current_dir/packages.stamp"), |
82 "--directory", | 84 "--directory", |
83 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), | 85 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"), |
84 "--command", | 86 "--command", |
85 "get", | 87 "get", |
86 ] | 88 ] |
87 | 89 |
88 outputs = [ | 90 outputs = [ |
89 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp", | 91 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp", |
90 ] | 92 ] |
91 } | 93 } |
92 | 94 |
93 action("pub_build_observatory") { | 95 action("pub_build_observatory") { |
96 current_dir = rebase_path(".", "//") | |
94 sources = | 97 sources = |
95 rebase_path(observatory_sources_gypi.sources, | 98 rebase_path(observatory_sources_gypi.sources, |
96 "", | 99 "", |
97 "$root_gen_dir/observatory_copy/dart/runtime/observatory") | 100 "$root_gen_dir/observatory_copy/$current_dir") |
98 | 101 |
99 deps = [ | 102 deps = [ |
100 ":copy_observatory", | 103 ":copy_observatory", |
101 ":copy_observatory_deps", | 104 ":copy_observatory_deps", |
102 ] | 105 ] |
103 | 106 |
104 script = "../../tools/observatory_tool.py" | 107 script = "../../tools/observatory_tool.py" |
105 | 108 |
106 inputs = [ | 109 inputs = [ |
107 script, | 110 script, |
108 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp", | 111 "$root_gen_dir/observatory_copy/$current_dir/packages.stamp", |
109 ] | 112 ] |
110 inputs += sources | 113 inputs += sources |
111 | 114 |
112 args = [ | 115 args = [ |
113 "--silent=True", | 116 "--silent=True", |
114 "--pub-executable", | 117 "--pub-executable", |
115 dart_host_pub_exe, | 118 dart_host_pub_exe, |
116 "--directory", | 119 "--directory", |
117 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), | 120 rebase_path("$root_gen_dir/observatory_copy/$current_dir/"), |
118 "--command", | 121 "--command", |
119 "build", | 122 "build", |
120 rebase_path("$root_out_dir/observatory/build"), | 123 rebase_path("$root_out_dir/observatory/build"), |
121 ] | 124 ] |
122 | 125 |
123 outputs = [ | 126 outputs = [ |
124 "$root_out_dir/observatory/build/web/main.dart.js", | 127 "$root_out_dir/observatory/build/web/main.dart.js", |
125 ] | 128 ] |
126 } | 129 } |
127 | 130 |
(...skipping 17 matching lines...) Expand all Loading... | |
145 rebase_path("$root_out_dir/observatory"), | 148 rebase_path("$root_out_dir/observatory"), |
146 "--command", | 149 "--command", |
147 "deploy", | 150 "deploy", |
148 ] | 151 ] |
149 | 152 |
150 outputs = [ | 153 outputs = [ |
151 "$root_out_dir/observatory/deployed/web/main.dart.js", | 154 "$root_out_dir/observatory/deployed/web/main.dart.js", |
152 ] | 155 ] |
153 } | 156 } |
154 | 157 |
155 action("archive_observatory") { | 158 template("observatory_archive") { |
156 deps = [ | 159 assert(defined(invoker.inner_namespace), "Need inner_namespace in $target_name ") |
Cutch
2016/09/21 23:26:27
line length
zra
2016/09/22 06:08:17
Done.
| |
157 ":deploy_observatory", | 160 assert(defined(invoker.outer_namespace), "Need outer_namespace in $target_name ") |
158 ] | 161 action(target_name) { |
162 deps = [ | |
163 ":deploy_observatory", | |
164 ] | |
159 | 165 |
160 script = "../tools/create_archive.py" | 166 script = "../tools/create_archive.py" |
161 | 167 |
162 inputs = [ | 168 inputs = [ |
163 script, | 169 script, |
164 "$root_out_dir/observatory/deployed/web/main.dart.js", | 170 "$root_out_dir/observatory/deployed/web/main.dart.js", |
165 ] | 171 ] |
166 | 172 |
167 args = [ | 173 inner_namespace = invoker.inner_namespace |
168 "--output", | 174 outer_namespace = invoker.outer_namespace |
169 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), | 175 output_name = target_name |
170 "--tar_output", | 176 args = [ |
171 rebase_path("$root_gen_dir/observatory/observatory_archive.tar"), | 177 "--output", |
172 "--outer_namespace", "dart", | 178 rebase_path("$root_gen_dir/observatory/${output_name}.cc"), |
173 "--inner_namespace", "observatory", | 179 "--tar_output", |
174 "--name", "observatory_assets_archive", | 180 rebase_path("$root_gen_dir/observatory/${output_name}.tar"), |
175 "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"), | 181 "--outer_namespace", outer_namespace, |
176 ] | 182 "--inner_namespace", inner_namespace, |
183 "--name", "observatory_assets_archive", | |
184 "--client_root", rebase_path("$root_out_dir/observatory/deployed/web/"), | |
185 ] | |
177 | 186 |
178 outputs = [ | 187 outputs = [ |
179 "$root_gen_dir/observatory/observatory_archive.cc", | 188 "$root_gen_dir/observatory/${output_name}.cc", |
180 "$root_gen_dir/observatory/observatory_archive.tar", | 189 "$root_gen_dir/observatory/${output_name}.tar", |
181 ] | 190 ] |
191 } | |
192 } | |
193 | |
194 observatory_archive("embedded_archive_observatory") { | |
195 outer_namespace = "dart" | |
196 inner_namespace = "observatory" | |
182 } | 197 } |
183 | 198 |
184 source_set("embedded_observatory_archive") { | 199 source_set("embedded_observatory_archive") { |
185 deps = [ | 200 deps = [ |
186 ":archive_observatory", | 201 ":embedded_archive_observatory", |
187 ] | 202 ] |
188 | 203 |
189 sources = [ | 204 sources = [ |
190 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), | 205 rebase_path("$root_gen_dir/observatory/embedded_archive_observatory.cc"), |
191 ] | 206 ] |
192 } | 207 } |
208 | |
209 observatory_archive("standalone_archive_observatory") { | |
210 outer_namespace = "dart" | |
211 inner_namespace = "bin" | |
212 } | |
213 | |
214 source_set("standalone_observatory_archive") { | |
215 deps = [ | |
216 ":standalone_archive_observatory", | |
217 ] | |
218 | |
219 sources = [ | |
220 rebase_path("$root_gen_dir/observatory/standalone_archive_observatory.cc"), | |
221 ] | |
222 } | |
OLD | NEW |