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..a5a2abb59af367b0101de6297afff2567fc96c7b |
--- /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") { |
+ action(target_name) { |
+ _name = get_path_info(invoker.target, "name") |
+ _output = "$root_out_dir/bin/$_name" |
+ |
+ script = "//build/android/gyp/create_tool_script.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), |
+ ] |
+ } |
+} |