Chromium Code Reviews| Index: runtime/observatory/BUILD.gn |
| diff --git a/runtime/observatory/BUILD.gn b/runtime/observatory/BUILD.gn |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..701e06df37acf44ceb7824b1f0594037a26852ce |
| --- /dev/null |
| +++ b/runtime/observatory/BUILD.gn |
| @@ -0,0 +1,129 @@ |
| +# Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file |
| +# for details. All rights reserved. Use of this source code is governed by a |
| +# BSD-style license that can be found in the LICENSE file. |
| + |
| +observatory_sources_gypi = |
| + exec_script("../../tools/gypi_to_gn.py", |
| + [rebase_path("observatory_sources.gypi")], |
| + "scope", |
| + ["observatory_sources.gypi"]) |
| + |
| +copy("copy_observatory") { |
| + sources = observatory_sources_gypi.sources |
| + outputs = [ |
| + "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_part}}", |
| + ] |
| +} |
| + |
| +action("rewrite_observatory_pubspec_yaml") { |
| + deps = [ |
| + ":copy_observatory" |
| + ] |
| + |
| + script = "../../tools/observatory_tool.py" |
| + |
| + inputs = [ |
| + "pubspec.yaml" |
| + ] |
| + |
| + args = [ |
| + "--pub-executable", |
| + rebase_path("../../../third_party/dart-sdk/dart-sdk/bin/pub"), |
|
zra
2015/03/30 19:50:03
I think we generally don't want code in the dart t
Cutch
2015/03/30 20:16:38
Done.
|
| + "--directory", |
| + rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), |
| + "--command", |
| + "rewrite", |
| + rebase_path("pubspec.yaml"), |
| + rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"), |
| + "../../third_party/", |
| + rebase_path("../../../dart/third_party/") |
| + ] |
| + |
| + outputs = [ |
| + "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml" |
| + ] |
| +} |
| + |
| +action("fetch_observatory_deps") { |
| + deps = [ |
| + ":write_observatory_pubspec_yaml" |
| + ] |
| + |
| + script = "../../tools/observatory_tool.py" |
| + |
| + inputs = [ |
| + script, |
| + "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml" |
| + ] |
| + |
| + args = [ |
| + "--pub-executable", |
| + rebase_path("../../../third_party/dart-sdk/dart-sdk/bin/pub"), |
|
zra
2015/03/30 19:50:03
ditto
|
| + "--directory", |
| + rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), |
| + "--command", |
| + "get", |
| + ] |
| + |
| + outputs = [ |
| + "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.lock" |
| + ] |
| +} |
| + |
| +action("pub_build_observatory") { |
| + sources = rebase_path(observatory_sources_gypi.sources) |
| + deps = [ |
| + ":fetch_observatory_deps" |
| + ] |
| + |
| + script = "../../tools/observatory_tool.py" |
| + |
| + inputs = [ |
| + script |
| + ] |
| + inputs += observatory_sources_gypi.sources |
| + |
| + args = [ |
| + "--pub-executable", |
| + rebase_path("../../../third_party/dart-sdk/dart-sdk/bin/pub"), |
|
zra
2015/03/30 19:50:03
ditto
|
| + "--directory", |
| + rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), |
| + "--command", |
| + "build", |
| + rebase_path("$root_out_dir/observatory/build") |
| + ] |
| + |
| + outputs = [ |
| + "$root_out_dir/observatory/build/web/index.html", |
| + "$root_out_dir/observatory/build/web/index.html_bootstrap.dart.js", |
| + ] |
| +} |
| + |
| + |
| +action("deploy_observatory") { |
| + deps = [ |
| + ":pub_build_observatory" |
| + ] |
| + |
| + script = "../../tools/observatory_tool.py" |
| + |
| + inputs = [ |
| + script, |
| + "$root_out_dir/observatory/build/web/index.html", |
| + "$root_out_dir/observatory/build/web/index.html_bootstrap.dart.js", |
| + ] |
| + |
| + args = [ |
| + "--pub-executable", |
| + rebase_path("../../../third_party/dart-sdk/dart-sdk/bin/pub"), |
|
zra
2015/03/30 19:50:03
ditto
|
| + "--directory", |
| + rebase_path("$root_out_dir/observatory"), |
| + "--command", |
| + "deploy", |
| + ] |
| + |
| + outputs = [ |
| + "$root_out_dir/observatory/deployed/web/index.html", |
| + "$root_out_dir/observatory/deployed/web/index.html_bootstrap.dart.js", |
| + ] |
| +} |