| OLD | NEW |
| 1 # Copyright 2014 The Chromium Authors. All rights reserved. | 1 # Copyright 2014 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 import("//build/config/chrome_build.gni") | 5 import("//build/config/chrome_build.gni") |
| 6 | 6 |
| 7 # Runs the version processing script over the given template file to produce | 7 # Runs the version processing script over the given template file to produce |
| 8 # an output file. This is used for generating various forms of files that | 8 # an output file. This is used for generating various forms of files that |
| 9 # incorporate the product name and version. | 9 # incorporate the product name and version. |
| 10 # | 10 # |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 if (defined(invoker.extra_args)) { | 120 if (defined(invoker.extra_args)) { |
| 121 args += invoker.extra_args | 121 args += invoker.extra_args |
| 122 } | 122 } |
| 123 args += [ | 123 args += [ |
| 124 rebase_path(template_path, root_build_dir), | 124 rebase_path(template_path, root_build_dir), |
| 125 rebase_path(invoker.output, root_build_dir), | 125 rebase_path(invoker.output, root_build_dir), |
| 126 ] | 126 ] |
| 127 | 127 |
| 128 if (process_only) { | 128 if (process_only) { |
| 129 # When processing only, visibility gets applied to this target. | 129 # When processing only, visibility gets applied to this target. |
| 130 if (defined(invoker.visibility)) { | 130 forward_variables_from(invoker, [ "visibility" ]) |
| 131 visibility = invoker.visibility | |
| 132 } | |
| 133 } else { | 131 } else { |
| 134 # When linking the result, only the source set can depend on the action. | 132 # When linking the result, only the source set can depend on the action. |
| 135 visibility = [ ":$source_set_name" ] | 133 visibility = [ ":$source_set_name" ] |
| 136 } | 134 } |
| 137 } | 135 } |
| 138 | 136 |
| 139 if (!process_only) { | 137 if (!process_only) { |
| 140 source_set(source_set_name) { | 138 source_set(source_set_name) { |
| 141 if (defined(invoker.visibility)) { | 139 forward_variables_from(invoker, [ "visibility" ]) |
| 142 visibility = invoker.visibility | |
| 143 } | |
| 144 sources = get_target_outputs(":$action_name") | 140 sources = get_target_outputs(":$action_name") |
| 145 public_deps = [ | 141 public_deps = [ |
| 146 ":$action_name", | 142 ":$action_name", |
| 147 ] | 143 ] |
| 148 } | 144 } |
| 149 } | 145 } |
| 150 } | 146 } |
| OLD | NEW |