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

Side by Side Diff: runtime/observatory/BUILD.gn

Issue 2301833003: GN: Relativize occurrances of //dart (Closed)
Patch Set: Further cleanup. Remove unneeded rebase_path()s Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | sdk/lib/rules.gni » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
11 # Specify the path to a host compatible version of pub. 11 # Specify the path to a host compatible version of pub.
12 # This is used to compile the Observatory frontend sources. 12 # This is used to compile the Observatory frontend sources.
13 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub") 13 dart_host_pub_exe = rebase_path("$dart_host_sdk/bin/pub")
14 } 14 }
15 15
16 # Helper build rules for packaging the Dart observatory resources. 16 # Helper build rules for packaging the Dart observatory resources.
17 observatory_sources_gypi = 17 observatory_sources_gypi =
18 exec_script("../../tools/gypi_to_gn.py", 18 exec_script("../../tools/gypi_to_gn.py",
19 [ rebase_path( 19 [ rebase_path(
20 "//dart/runtime/observatory/observatory_sources.gypi") ], 20 "../observatory/observatory_sources.gypi") ],
21 "scope", 21 "scope",
22 [ "//dart/runtime/observatory/observatory_sources.gypi" ]) 22 [ "../observatory/observatory_sources.gypi" ])
23 23
24 copy("copy_observatory") { 24 copy("copy_observatory") {
25 sources = rebase_path(observatory_sources_gypi.sources, 25 sources = rebase_path(observatory_sources_gypi.sources,
26 "", 26 "",
27 ".") 27 ".")
28 outputs = [ 28 outputs = [
29 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}", 29 "$root_gen_dir/observatory_copy/{{source_root_relative_dir}}/{{source_file_p art}}",
30 ] 30 ]
31 } 31 }
32 32
33 action("write_observatory_pubspec_yaml") { 33 action("write_observatory_pubspec_yaml") {
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 args = [ 44 args = [
45 "--silent=True", 45 "--silent=True",
46 "--pub-executable", 46 "--pub-executable",
47 dart_host_pub_exe, 47 dart_host_pub_exe,
48 "--directory", 48 "--directory",
49 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 49 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
50 "--command", 50 "--command",
51 "rewrite", 51 "rewrite",
52 rebase_path("//dart/runtime/observatory/pubspec.yaml"), 52 rebase_path("../observatory/pubspec.yaml"),
53 rebase_path( 53 rebase_path(
54 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"), 54 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml"),
55 "../../third_party/", 55 "../../third_party/",
56 rebase_path("../../../dart/third_party/"), 56 rebase_path("../../third_party/"),
57 ] 57 ]
58 58
59 outputs = [ 59 outputs = [
60 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 60 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml",
61 ] 61 ]
62 } 62 }
63 63
64 action("copy_observatory_deps") { 64 action("copy_observatory_deps") {
65 deps = [ 65 deps = [
66 ":write_observatory_pubspec_yaml", 66 ":write_observatory_pubspec_yaml",
67 ] 67 ]
68 68
69 script = "//dart/tools/observatory_tool.py" 69 script = "../../tools/observatory_tool.py"
70 70
71 inputs = [ 71 inputs = [
72 script, 72 script,
73 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml", 73 "$root_gen_dir/observatory_copy/dart/runtime/observatory/pubspec.yaml",
74 ] 74 ]
75 75
76 args = [ 76 args = [
77 "--silent=True", 77 "--silent=True",
78 "--pub-executable", 78 "--pub-executable",
79 dart_host_pub_exe, 79 dart_host_pub_exe,
(...skipping 14 matching lines...) Expand all
94 sources = 94 sources =
95 rebase_path(observatory_sources_gypi.sources, 95 rebase_path(observatory_sources_gypi.sources,
96 "", 96 "",
97 "$root_gen_dir/observatory_copy/dart/runtime/observatory") 97 "$root_gen_dir/observatory_copy/dart/runtime/observatory")
98 98
99 deps = [ 99 deps = [
100 ":copy_observatory", 100 ":copy_observatory",
101 ":copy_observatory_deps", 101 ":copy_observatory_deps",
102 ] 102 ]
103 103
104 script = "//dart/tools/observatory_tool.py" 104 script = "../../tools/observatory_tool.py"
105 105
106 inputs = [ 106 inputs = [
107 script, 107 script,
108 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp", 108 "$root_gen_dir/observatory_copy/dart/runtime/observatory/packages.stamp",
109 ] 109 ]
110 inputs += sources 110 inputs += sources
111 111
112 args = [ 112 args = [
113 "--silent=True", 113 "--silent=True",
114 "--pub-executable", 114 "--pub-executable",
115 dart_host_pub_exe, 115 dart_host_pub_exe,
116 "--directory", 116 "--directory",
117 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"), 117 rebase_path("$root_gen_dir/observatory_copy/dart/runtime/observatory/"),
118 "--command", 118 "--command",
119 "build", 119 "build",
120 rebase_path("$root_out_dir/observatory/build"), 120 rebase_path("$root_out_dir/observatory/build"),
121 ] 121 ]
122 122
123 outputs = [ 123 outputs = [
124 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js", 124 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js",
125 ] 125 ]
126 } 126 }
127 127
128 action("deploy_observatory") { 128 action("deploy_observatory") {
129 deps = [ 129 deps = [
130 ":pub_build_observatory", 130 ":pub_build_observatory",
131 ] 131 ]
132 132
133 script = "//dart/tools/observatory_tool.py" 133 script = "../../tools/observatory_tool.py"
134 134
135 inputs = [ 135 inputs = [
136 script, 136 script,
137 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js", 137 "$root_out_dir/observatory/build/web/index.html.polymer.bootstrap.dart.js",
138 ] 138 ]
139 139
140 args = [ 140 args = [
141 "--silent=True", 141 "--silent=True",
142 "--pub-executable", 142 "--pub-executable",
143 dart_host_pub_exe, 143 dart_host_pub_exe,
144 "--directory", 144 "--directory",
145 rebase_path("$root_out_dir/observatory"), 145 rebase_path("$root_out_dir/observatory"),
146 "--command", 146 "--command",
147 "deploy", 147 "deploy",
148 ] 148 ]
149 149
150 outputs = [ 150 outputs = [
151 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ", 151 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ",
152 ] 152 ]
153 } 153 }
154 154
155 action("archive_observatory") { 155 action("archive_observatory") {
156 deps = [ 156 deps = [
157 ":deploy_observatory", 157 ":deploy_observatory",
158 ] 158 ]
159 159
160 script = "//dart/runtime/tools/create_archive.py" 160 script = "../tools/create_archive.py"
161 161
162 inputs = [ 162 inputs = [
163 script, 163 script,
164 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ", 164 "$root_out_dir/observatory/deployed/web/index.html.polymer.bootstrap.dart.js ",
165 ] 165 ]
166 166
167 args = [ 167 args = [
168 "--output", 168 "--output",
169 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), 169 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"),
170 "--tar_output", 170 "--tar_output",
(...skipping 12 matching lines...) Expand all
183 183
184 source_set("embedded_observatory_archive") { 184 source_set("embedded_observatory_archive") {
185 deps = [ 185 deps = [
186 ":archive_observatory", 186 ":archive_observatory",
187 ] 187 ]
188 188
189 sources = [ 189 sources = [
190 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"), 190 rebase_path("$root_gen_dir/observatory/observatory_archive.cc"),
191 ] 191 ]
192 } 192 }
OLDNEW
« no previous file with comments | « runtime/bin/BUILD.gn ('k') | sdk/lib/rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698