2013-04-29 12:09:31 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
2013-08-06 20:32:29 +00:00
|
|
|
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
|
|
|
source $SCRIPT_DIR/android_setup.sh
|
2013-04-29 12:09:31 +00:00
|
|
|
|
2013-08-12 12:30:04 +00:00
|
|
|
for arg in ${APP_ARGS[@]}
|
2013-08-06 20:32:29 +00:00
|
|
|
do
|
|
|
|
if [[ "${arg}" == "--use-ccache" ]];
|
2013-04-29 12:09:31 +00:00
|
|
|
then
|
|
|
|
if [[ -z "$ANDROID_MAKE_CCACHE" ]];
|
|
|
|
then
|
|
|
|
ANDROID_MAKE_CCACHE=$(which ccache)
|
|
|
|
fi
|
|
|
|
else
|
2013-08-06 20:32:29 +00:00
|
|
|
makeVars=("${makeVars[@]}" "${arg}")
|
2013-04-29 12:09:31 +00:00
|
|
|
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
|
|
|
|
|
2013-07-22 14:18:08 +00:00
|
|
|
make ${makeVars[@]}
|
2013-04-29 12:09:31 +00:00
|
|
|
if [ $? != 0 ]
|
|
|
|
then
|
|
|
|
exit 1;
|
|
|
|
fi
|