[Android] build: fix invalid env.sh when building differents archs
Thomas Guillem
git at videolan.org
Tue Oct 21 12:09:24 CEST 2014
vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Tue Oct 21 11:29:20 2014 +0200| [b7d2a9a4982140a7b9e8bfdd100cc21c0b75cf15] | committer: Thomas Guillem
build: fix invalid env.sh when building differents archs
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=b7d2a9a4982140a7b9e8bfdd100cc21c0b75cf15
---
compile.sh | 34 ++++++++++++++++++----------------
1 file changed, 18 insertions(+), 16 deletions(-)
diff --git a/compile.sh b/compile.sh
index abb3773..ed7896b 100755
--- a/compile.sh
+++ b/compile.sh
@@ -18,6 +18,13 @@ if [ -z "$ANDROID_ABI" ]; then
exit 1
fi
+if [ -z "$NO_FPU" ];then
+ NO_FPU=0
+fi
+if [ -z "$NO_ARMV6" ];then
+ NO_ARMV6=0
+fi
+
BUILD=0
FETCH=0
RELEASE=0
@@ -47,6 +54,11 @@ if [ "$BUILD" = 0 -a "$FETCH" = 0 ];then
FETCH=1
fi
+HAVE_ARM=0
+HAVE_X86=0
+HAVE_MIPS=0
+HAVE_64=0
+
# Set up ABI variables
if [ ${ANDROID_ABI} = "x86" ] ; then
TARGET_TUPLE="i686-linux-android"
@@ -423,20 +435,10 @@ EssentialsA
echo "export PATH=$NDK_TOOLCHAIN_PATH:\${ANDROID_SDK}/platform-tools:\${PATH}" >> env.sh
# CPU flags
-if [ -n "${HAVE_ARM}" ]; then
- echo "export HAVE_ARM=1" >> env.sh
-elif [ -n "${HAVE_X86}" ]; then
- echo "export HAVE_X86=1" >> env.sh
-elif [ -n "${HAVE_MIPS}" ]; then
- echo "export HAVE_MIPS=1" >> env.sh
-fi
+echo "export HAVE_ARM=${HAVE_ARM}" >> env.sh
+echo "export HAVE_X86=${HAVE_X86}" >> env.sh
+echo "export HAVE_MIPS=${HAVE_MIPS}" >> env.sh
-if [ -n "${NO_ARMV6}" ]; then
- echo "export NO_ARMV6=1" >> env.sh
-fi
-if [ -n "${NO_FPU}" ]; then
- echo "export NO_FPU=1" >> env.sh
-fi
-if [ -n "${HAVE_64}" ]; then
- echo "export HAVE_64=1" >> env.sh
-fi
+echo "export NO_ARMV6=${NO_ARMV6}" >> env.sh
+echo "export NO_FPU=${NO_FPU}" >> env.sh
+echo "export HAVE_64=${HAVE_64}" >> env.sh
More information about the Android
mailing list