OLD | NEW |
(Empty) | |
| 1 # Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 # Use of this source code is governed by a BSD-style license that can be |
| 3 # found in the LICENSE file. |
| 4 |
| 5 # Writes a script to root_out_dir/bin that passes --output-directory to the |
| 6 # wrapped script, in addition to forwarding arguments. |
| 7 template("wrapper_script") { |
| 8 action(target_name) { |
| 9 _name = get_path_info(invoker.target, "name") |
| 10 _output = "$root_out_dir/bin/$_name" |
| 11 |
| 12 script = "//build/android/gyp/create_tool_script.py" |
| 13 outputs = [ |
| 14 _output, |
| 15 ] |
| 16 |
| 17 # The target isn't actually used by the script, but it's nice to have GN |
| 18 # check that it exists. |
| 19 inputs = [ |
| 20 invoker.target, |
| 21 ] |
| 22 args = [ |
| 23 "--output", |
| 24 rebase_path(_output, root_build_dir), |
| 25 "--target", |
| 26 rebase_path(invoker.target, root_build_dir), |
| 27 "--output-directory", |
| 28 rebase_path(root_out_dir, root_build_dir), |
| 29 ] |
| 30 } |
| 31 } |
OLD | NEW |