Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(441)

Unified Diff: runtime/observatory/BUILD.gn

Issue 1046993002: Support building Observatory in mojo tree (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/observatory/observatory.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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",
+ ]
+}
« no previous file with comments | « no previous file | runtime/observatory/observatory.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698