Index: build/android/push_libraries.gypi |
diff --git a/build/android/push_libraries.gypi b/build/android/push_libraries.gypi |
new file mode 100644 |
index 0000000000000000000000000000000000000000..17f479debbef3182c4cc86adb7f9ee8041353395 |
--- /dev/null |
+++ b/build/android/push_libraries.gypi |
@@ -0,0 +1,48 @@ |
+# Copyright 2013 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. |
+ |
+# This file is meant to be included into an action to provide a rule that |
+# pushes stripped shared libraries to the attached Android device. This should |
+# only be used with the gyp_managed_install flag set. |
+# |
+# To use this, create a gyp target with the following form: |
+# { |
+# 'actions': [ |
+# 'variables': { |
+# 'ordered_libraries_file': 'file generated by write_ordered_libraries' |
+# 'strip_stamp': 'stamp from strip action to block on' |
+# 'libraries_source_dir': 'location where stripped libraries are stored' |
+# 'device_library_dir': 'location on the device where to put pushed libraries', |
+# 'push_stamp': 'file to touch when the action is complete' |
+# }, |
+# 'includes': [ '../../build/android/push_libraries.gypi' ], |
+# ], |
+# }, |
+# |
+ |
+{ |
+ 'action_name': 'push_libraries_<(_target_name)', |
+ 'message': 'Pushing libraries to device for <(_target_name)', |
+ 'inputs': [ |
+ '<(DEPTH)/build/android/gyp/util/build_utils.py', |
+ '<(DEPTH)/build/android/gyp/util/md5_check.py', |
+ '<(DEPTH)/build/android/gyp/push_libraries.py', |
+ '<(strip_stamp)', |
+ ], |
+ 'outputs': [ |
+ '<(push_stamp)', |
+ # If a user switches the connected device, new libraries may |
+ # need to be pushed even if there have been no changes. To |
+ # ensure that the libraries on the device are always |
+ # up-to-date, this step should always be triggered. |
+ '<(push_stamp).fake', |
+ ], |
+ 'action': [ |
+ 'python', '<(DEPTH)/build/android/gyp/push_libraries.py', |
+ '--libraries-dir=<(libraries_source_dir)', |
+ '--device-dir=<(device_library_dir)', |
+ '--libraries-json=<(ordered_libraries_file)', |
+ '--stamp=<(push_stamp)', |
+ ], |
+} |