aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-30 17:22:48 +0000
committerGravatar mtklein@google.com <mtklein@google.com@2bbb7eff-a529-9590-31e7-b0007b416f81>2013-09-30 17:22:48 +0000
commit741ea9e0098bde6bdfc71c65572b51ce9596944a (patch)
treef16c4e6ceb76564f529b9672c510769665e62de8
parent9eecef0744ebd091e2412f48a68f02616ebce2f0 (diff)
Revert "Add android_ninja, like android_make for ninja."
Broke some builds. Will try again. BUG= Review URL: https://codereview.chromium.org/25307002 git-svn-id: http://skia.googlecode.com/svn/trunk@11526 2bbb7eff-a529-9590-31e7-b0007b416f81
-rwxr-xr-xplatform_tools/android/bin/android_make55
l---------platform_tools/android/bin/android_ninja1
-rwxr-xr-xplatform_tools/android/bin/android_setup.sh4
3 files changed, 41 insertions, 19 deletions
diff --git a/platform_tools/android/bin/android_make b/platform_tools/android/bin/android_make
index 077ccd84a5..10ddd3301b 100755
--- a/platform_tools/android/bin/android_make
+++ b/platform_tools/android/bin/android_make
@@ -1,25 +1,46 @@
#!/bin/bash
-# Fail-fast if anything in the script fails.
-set -e
+SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
-# 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
+# remove the existing .android_config file prior to running android_setup. If
+# we did not remove this here then we would build for whatever device type was
# listed in the .android_config instead of the default device type.
-rm -f .android_config
-
-source android_setup.sh
-
-if [ $(basename $0) = "android_make" ]; then
- GYP_GENERATORS=make-android make $APP_ARGS
-else
- GYP_GENERATORS=ninja ./gyp_skia
- OUT=$SKIA_OUT/${BUILDTYPE-Debug} # Defaults to Debug if BUILDTYPE isn't set.
- ninja -C $OUT $APP_ARGS
- ln -sf lib $OUT/lib.target # android_run_skia looks in lib.target; ninja writes to lib.
+if [ -f .android_config ]
+then
+ rm .android_config
fi
-# Write the device id into the .android_config file. This tells
-# android_run_skia the last build we completed.
+# run the config to setup the environment
+source $SCRIPT_DIR/android_setup.sh
+
+# write the device id into the .android_config file
echo $DEVICE_ID > .android_config
+for arg in ${APP_ARGS[@]}
+do
+ if [[ "${arg}" == "--use-ccache" ]];
+ then
+ if [[ -z "$ANDROID_MAKE_CCACHE" ]];
+ then
+ ANDROID_MAKE_CCACHE=$(which ccache)
+ fi
+ else
+ makeVars=("${makeVars[@]}" "${arg}")
+ fi
+
+shift
+done
+
+if [[ -n "$ANDROID_MAKE_CCACHE" ]]; then
+ $ANDROID_MAKE_CCACHE --version &> /dev/null
+ if [[ "$?" != "0" ]]; then
+ echo "Unable to find ccache!"
+ exit 1
+ fi
+fi
+
+make ${makeVars[@]}
+if [ $? != 0 ]
+then
+ exit 1;
+fi
diff --git a/platform_tools/android/bin/android_ninja b/platform_tools/android/bin/android_ninja
deleted file mode 120000
index 68a0fb120e..0000000000
--- a/platform_tools/android/bin/android_ninja
+++ /dev/null
@@ -1 +0,0 @@
-android_make \ No newline at end of file
diff --git a/platform_tools/android/bin/android_setup.sh b/platform_tools/android/bin/android_setup.sh
index 0629c6a6e8..7c3ba6a243 100755
--- a/platform_tools/android/bin/android_setup.sh
+++ b/platform_tools/android/bin/android_setup.sh
@@ -165,7 +165,7 @@ setup_device() {
TARGET_DEVICE=$(cat .android_config)
echo "INFO: no target device was specified so using the device (${TARGET_DEVICE}) from the most recent build"
else
- TARGET_DEVICE="arm_v7_thumb"
+ TARGET_DEVICE="arm_v7_thumb"
echo "INFO: no target device type was specified so using the default '${TARGET_DEVICE}'"
fi
fi
@@ -237,6 +237,8 @@ setup_device() {
fi
DEFINES="${DEFINES} android_toolchain=${TOOLCHAIN_TYPE}"
+ # Use the "android" flavor of the Makefile generator for both Linux and OS X.
+ exportVar GYP_GENERATORS "make-android"
exportVar GYP_DEFINES "$DEFINES"
exportVar SKIA_OUT "out/config/android-${TARGET_DEVICE}"
}