skia2/platform_tools/android/bin/android_make

37 lines
665 B
Plaintext
Raw Normal View History

#!/bin/bash
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
source $SCRIPT_DIR/android_setup.sh
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
# write the out directory into the .android_config file
echo $SKIA_OUT > .android_config
make ${makeVars[@]}
if [ $? != 0 ]
then
exit 1;
fi