[Android] build: fix ndk fixup
Thomas Guillem
git at videolan.org
Mon Oct 20 18:05:28 CEST 2014
vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Mon Oct 20 17:50:26 2014 +0200| [b841412883b4b4a9716699420b8ecd64b1b7dbb6] | committer: 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.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b841412883b4b4a9716699420b8ecd64b1b7dbb6
---
compile.sh | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/compile.sh b/compile.sh
index 1dc8604..fad780f 100755
--- a/compile.sh
+++ b/compile.sh
@@ -317,9 +317,18 @@ fi
# ANDROID NDK FIXUP (BLAME GOOGLE)
config_undef ()
{
+ previous_change=`stat -c "%y" 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
# 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.
@@ -330,6 +339,7 @@ if [ ${ANDROID_API} = "android-21" ] ; then
# doesn't have any shm functions and/or symbols. */
config_undef HAVE_SYS_SHM_H
fi
+# END OF ANDROID NDK FIXUP
echo "Building"
make $MAKEFLAGS
More information about the Android
mailing list