| 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 # Rules to generate python packaged applications for Dart | 5 # Rules to generate python packaged applications for Dart |
| 6 | 6 |
| 7 import("../mojo_sdk.gni") | 7 import("../mojo_sdk.gni") |
| 8 | 8 |
| 9 template("dart_package") { | 9 template("dart_package") { |
| 10 action(target_name) { | 10 action(target_name) { |
| (...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 116 inputs = [ | 116 inputs = [ |
| 117 input, | 117 input, |
| 118 ] | 118 ] |
| 119 | 119 |
| 120 output = mojo_output | 120 output = mojo_output |
| 121 outputs = [ | 121 outputs = [ |
| 122 output, | 122 output, |
| 123 ] | 123 ] |
| 124 | 124 |
| 125 deps = [ | 125 deps = [ |
| 126 ":$package_analyze_sources", | 126 # TODO(erg): When dartanalyze runs at an acceptable speed, add |
| 127 # ":$package_analyze_sources" as a dependency here and remove the |
| 128 # manual group("check") in the toplevel build file. |
| 127 ":$package_name", | 129 ":$package_name", |
| 128 ] | 130 ] |
| 129 if (defined(invoker.deps)) { | 131 if (defined(invoker.deps)) { |
| 130 deps += invoker.deps | 132 deps += invoker.deps |
| 131 } | 133 } |
| 132 if (defined(invoker.mojom_deps)) { | 134 if (defined(invoker.mojom_deps)) { |
| 133 deps += invoker.mojom_deps | 135 deps += invoker.mojom_deps |
| 134 } | 136 } |
| 135 if (defined(invoker.datadeps)) { | 137 if (defined(invoker.datadeps)) { |
| 136 datadeps = invoker.datadeps | 138 datadeps = invoker.datadeps |
| 137 } | 139 } |
| 138 | 140 |
| 139 line = "#!mojo mojo:dart_content_handler" | 141 line = "#!mojo mojo:dart_content_handler" |
| 140 if (is_debug || (defined(invoker.strict) && invoker.strict == true)) { | 142 if (is_debug || (defined(invoker.strict) && invoker.strict == true)) { |
| 141 line = "#!mojo mojo:dart_content_handler?strict=true" | 143 line = "#!mojo mojo:dart_content_handler?strict=true" |
| 142 } | 144 } |
| 143 | 145 |
| 144 rebase_input = rebase_path(input, root_build_dir) | 146 rebase_input = rebase_path(input, root_build_dir) |
| 145 rebase_output = rebase_path(output, root_build_dir) | 147 rebase_output = rebase_path(output, root_build_dir) |
| 146 args = [ | 148 args = [ |
| 147 "--input=$rebase_input", | 149 "--input=$rebase_input", |
| 148 "--output=$rebase_output", | 150 "--output=$rebase_output", |
| 149 "--line=$line", | 151 "--line=$line", |
| 150 ] | 152 ] |
| 151 } | 153 } |
| 152 } | 154 } |
| OLD | NEW |