summaryrefslogtreecommitdiffstats
path: root/chromium/third_party/skia/platform_tools/android/bin/android_make
diff options
context:
space:
mode:
Diffstat (limited to 'chromium/third_party/skia/platform_tools/android/bin/android_make')
-rwxr-xr-xchromium/third_party/skia/platform_tools/android/bin/android_make21
1 files changed, 21 insertions, 0 deletions
diff --git a/chromium/third_party/skia/platform_tools/android/bin/android_make b/chromium/third_party/skia/platform_tools/android/bin/android_make
new file mode 100755
index 00000000000..9601db9b17c
--- /dev/null
+++ b/chromium/third_party/skia/platform_tools/android/bin/android_make
@@ -0,0 +1,21 @@
+#!/bin/bash
+
+# Fail-fast if anything in the script fails.
+set -e
+
+# Remove any existing .android_config file before running android_setup. If we
+# did not remove this now then we would build for whatever device type was
+# listed in the .android_config instead of the default device type.
+rm -f .android_config
+
+SCRIPT_DIR=$(dirname "${BASH_SOURCE[0]}")
+source $SCRIPT_DIR/android_setup.sh
+
+SKIA_SRC_DIR=$(cd "${SCRIPT_DIR}/../../.."; pwd)
+GYP_GENERATORS=ninja-android "${SKIA_SRC_DIR}/gyp_skia"
+ninja -C $SKIA_OUT/$BUILDTYPE ${APP_ARGS[@]}
+
+# Write the device id into the .android_config file. This tells
+# android_run_skia the last build we completed.
+echo $DEVICE_ID > .android_config
+