| # Copyright 2017 The Cobalt Authors. All Rights Reserved. |
| # |
| # Licensed under the Apache License, Version 2.0 (the "License"); |
| # you may not use this file except in compliance with the License. |
| # You may obtain a copy of the License at |
| # |
| # http://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # Unless required by applicable law or agreed to in writing, software |
| # distributed under the License is distributed on an "AS IS" BASIS, |
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| # See the License for the specific language governing permissions and |
| # limitations under the License. |
| |
| # This header file is meant to be included to provide a rule to deploy |
| # a target on a target platform. |
| # |
| # Platforms needing such a deploy rule should define a template called |
| # "deploy", which defines an action target which performs the necessary |
| # actions (such as copying per-executable metadata files to the output |
| # directory). This template should preferably be defined in |
| # //$starboard_path/deploy.gni. |
| # |
| # To use this, at the top of the BUILD.gn file, import |
| # //starboard/build/deploy.gni. Then, define a deploy target: |
| # |
| # deploy("deploy") { |
| # executable_name = "the_primary_targets_name" |
| # } |
| # |
| # See //starboard/nplb/BUILD.gn for an example. |
| |
| import("//$starboard_path/configuration.gni") |
| |
| if (defined(include_path_platform_deploy_gni)) { |
| import(include_path_platform_deploy_gni) |
| } else { |
| # The default deploy action is to do nothing. |
| template("deploy") { |
| not_needed(invoker, "*") |
| |
| # Create an empty target so we can still depend on it. Honor the testonly |
| # and visibility settings. |
| group(target_name) { |
| forward_variables_from(invoker, |
| [ |
| "testonly", |
| "visibility", |
| ]) |
| } |
| } |
| } |