Commit b8414128 authored by Thomas Guillem's avatar Thomas Guillem

build: fix ndk fixup

- Don't trigger a full build when config.h is hacked
- Also hack config.h when configure dependencies change.
parent c8dccbaf
...@@ -317,9 +317,18 @@ fi ...@@ -317,9 +317,18 @@ fi
# ANDROID NDK FIXUP (BLAME GOOGLE) # ANDROID NDK FIXUP (BLAME GOOGLE)
config_undef () config_undef ()
{ {
previous_change=`stat -c "%y" config.h`
sed -i 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h sed -i 's,#define '$1' 1,/\* #undef '$1' \*/,' config.h
# don't change modified date in order to don't trigger a full build
touch -d "$previous_change" config.h
} }
# if config dependencies change, ./config.status --recheck
# is run and overwrite previously hacked config.h. So call make Makefile here
# and hack config.h after.
make $MAKEFLAGS Makefile
if [ ${ANDROID_ABI} = "x86" -a ${ANDROID_API} != "android-21" ] ; then if [ ${ANDROID_ABI} = "x86" -a ${ANDROID_API} != "android-21" ] ; then
# NDK x86 libm.so has nanf symbol but no nanf definition, we don't known if # NDK x86 libm.so has nanf symbol but no nanf definition, we don't known if
# intel devices has nanf. Assume they don't have it. # intel devices has nanf. Assume they don't have it.
...@@ -330,6 +339,7 @@ if [ ${ANDROID_API} = "android-21" ] ; then ...@@ -330,6 +339,7 @@ if [ ${ANDROID_API} = "android-21" ] ; then
# doesn't have any shm functions and/or symbols. */ # doesn't have any shm functions and/or symbols. */
config_undef HAVE_SYS_SHM_H config_undef HAVE_SYS_SHM_H
fi fi
# END OF ANDROID NDK FIXUP
echo "Building" echo "Building"
make $MAKEFLAGS make $MAKEFLAGS
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment