Chromium Code Reviews| Index: tools/android/wrapper_script.gni |
| diff --git a/tools/android/wrapper_script.gni b/tools/android/wrapper_script.gni |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..dcbecc5a91669c8905e1407c8e33b3a3c1051c00 |
| --- /dev/null |
| +++ b/tools/android/wrapper_script.gni |
| @@ -0,0 +1,31 @@ |
| +# Copyright 2016 The Chromium Authors. All rights reserved. |
| +# Use of this source code is governed by a BSD-style license that can be |
| +# found in the LICENSE file. |
| + |
| +# Writes a script to root_out_dir/bin that passes --output-directory to the |
| +# wrapped script, in addition to forwarding arguments. |
| +template("wrapper_script") { |
|
jbudorick
2016/02/08 16:14:18
er why is this in tools/android/ and not in build/
rmcilroy
2016/02/09 21:44:02
+1
agrieve
2016/02/10 04:02:05
Done.
|
| + action(target_name) { |
| + _name = get_path_info(invoker.target, "name") |
| + _output = "$root_out_dir/bin/$_name" |
| + |
| + script = "//build/android/gyp/create_tool_wrapper.py" |
| + outputs = [ |
| + _output, |
| + ] |
| + |
| + # The target isn't actually used by the script, but it's nice to have GN |
| + # check that it exists. |
| + inputs = [ |
| + invoker.target, |
| + ] |
| + args = [ |
| + "--output", |
| + rebase_path(_output, root_build_dir), |
| + "--target", |
| + rebase_path(invoker.target, root_build_dir), |
| + "--output-directory", |
| + rebase_path(root_out_dir, root_build_dir), |
| + ] |
| + } |
| +} |