mirror of
git://xwords.git.sourceforge.net/gitroot/xwords/xwords
synced 2025-01-29 08:34:37 +01:00
don't touch Application.mk unless it's changed to avoid recompiling every .c file each time
This commit is contained in:
parent
6107400835
commit
57c887b8cd
1 changed files with 17 additions and 5 deletions
|
@ -3,17 +3,29 @@
|
|||
set -u -e
|
||||
|
||||
APPMK=./jni/Application.mk
|
||||
TMP_MK=/tmp/tmp_$$_Application.mk
|
||||
XWORDS_DEBUG_ARMONLY=${XWORDS_DEBUG_ARMONLY:-""}
|
||||
XWORDS_DEBUG_X86ONLY=${XWORDS_DEBUG_X86ONLYx:-""}
|
||||
|
||||
echo "# Generated by $0; do not edit!!!" > $APPMK
|
||||
echo "# Generated by $0; do not edit!!!" > $TMP_MK
|
||||
|
||||
if [ "$1" = "release" ]; then
|
||||
echo "APP_ABI := armeabi x86" >> $APPMK
|
||||
echo "APP_ABI := armeabi x86" >> $TMP_MK
|
||||
elif [ -n "$XWORDS_DEBUG_ARMONLY" ]; then
|
||||
echo "APP_ABI := armeabi" >> $APPMK
|
||||
echo "APP_ABI := armeabi" >> $TMP_MK
|
||||
elif [ -n "$XWORDS_DEBUG_X86ONLY" ]; then
|
||||
echo "APP_ABI := x86" >> $APPMK
|
||||
echo "APP_ABI := x86" >> $TMP_MK
|
||||
else
|
||||
echo "APP_ABI := armeabi x86" >> $APPMK
|
||||
echo "APP_ABI := armeabi x86" >> $TMP_MK
|
||||
fi
|
||||
|
||||
# Now replace the existing file, but only if it's different. Touching
|
||||
# it causes the library to be completely rebuilt, so avoid that if
|
||||
# possible!
|
||||
|
||||
if [ ! -f $APPMK ]; then
|
||||
cp $TMP_MK $APPMK
|
||||
elif ! diff $APPMK $TMP_MK; then
|
||||
cp $TMP_MK $APPMK
|
||||
fi
|
||||
rm -f $TMP_MK
|
||||
|
|
Loading…
Add table
Reference in a new issue