ffca502023
Unreviewed. (SkipBuildbotRuns) Review URL: https://codereview.chromium.org/14652007 git-svn-id: http://skia.googlecode.com/svn/trunk@8930 2bbb7eff-a529-9590-31e7-b0007b416f81
58 lines
955 B
Bash
Executable File
58 lines
955 B
Bash
Executable File
#!/bin/bash
|
|
|
|
makeVars=""
|
|
deviceID=""
|
|
|
|
while (( "$#" )); do
|
|
|
|
if [[ $(echo "$1" | grep "^-d$") != "" ]];
|
|
then
|
|
deviceID="$2"
|
|
shift
|
|
elif [[ "$1" == "--use-ccache" ]];
|
|
then
|
|
if [[ -z "$ANDROID_MAKE_CCACHE" ]];
|
|
then
|
|
ANDROID_MAKE_CCACHE=$(which ccache)
|
|
fi
|
|
else
|
|
makeVars="$makeVars $1"
|
|
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
|
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
# hack for x86 support in android_setup.sh
|
|
if [ "$deviceID" == "x86" ] || [ "$deviceID" == "razr_i" ]
|
|
then
|
|
ANDROID_ARCH="x86"
|
|
fi
|
|
|
|
source $SCRIPT_DIR/android_setup.sh
|
|
|
|
setup_device $deviceID
|
|
returnVal=$?
|
|
if [ $returnVal != 0 ]
|
|
then
|
|
exit 1;
|
|
fi
|
|
|
|
# write the out directory into the .android_config file
|
|
echo $SKIA_OUT > .android_config
|
|
|
|
make $makeVars
|
|
if [ $? != 0 ]
|
|
then
|
|
exit 1;
|
|
fi
|