[Android] List all options for ANDROID_ABI if it's not been set

Rafaël Carré git at videolan.org
Tue Oct 15 13:12:08 CEST 2013


vlc-ports/android | branch: master | Rafaël Carré <funman at videolan.org> | Tue Oct 15 13:08:11 2013 +0200| [f0d2ce1da1a6bd4f278d473f60f179bb92b77c6a] | committer: Rafaël Carré

List all options for ANDROID_ABI if it's not been set

Give a separate error message for missing ANDROID_ABI
It might require 2 consecutive runs of compile.sh, but should
be clearer for the newcomer

> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=f0d2ce1da1a6bd4f278d473f60f179bb92b77c6a
---

 compile.sh   |    9 +++++++--
 configure.sh |   10 +++++++---
 2 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/compile.sh b/compile.sh
index 193966d..d3cd9f8 100755
--- a/compile.sh
+++ b/compile.sh
@@ -6,12 +6,17 @@
 
 set -e
 
-if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" -o -z "$ANDROID_ABI" ]; then
+if [ -z "$ANDROID_NDK" -o -z "$ANDROID_SDK" ]; then
    echo "You must define ANDROID_NDK, ANDROID_SDK and ANDROID_ABI before starting."
    echo "They must point to your NDK and SDK directories.\n"
-   echo "ANDROID_ABI should match your ABI: armeabi-v7a, armeabi or ..."
    exit 1
 fi
+
+if [ -z "$ANDROID_ABI" ]; then
+   echo "Please set ANDROID_ABI to your architecture: armeabi-v7a, armeabi, x86 or mips."
+   exit 1
+fi
+
 # try to detect NDK version
 REL=$(grep -o '^r[0-9]*.*' $ANDROID_NDK/RELEASE.TXT 2>/dev/null|cut -b2-)
 case "$REL" in
diff --git a/configure.sh b/configure.sh
index c8643b9..02f635a 100755
--- a/configure.sh
+++ b/configure.sh
@@ -1,8 +1,12 @@
 #!/bin/sh
 
-if [ -z "$ANDROID_NDK" -o -z "$ANDROID_ABI" ]; then
-    echo "Please set the ANDROID_NDK environment variable with its path.\n"
-    echo "ANDROID_ABI should match your ABI: armeabi-v7a, armeabi or ..."
+if [ -z "$ANDROID_NDK" ]; then
+    echo "Please set the ANDROID_NDK environment variable with its path."
+    exit 1
+fi
+
+if [ -z "$ANDROID_ABI" ]; then
+    echo "Please set ANDROID_ABI to your architecture: armeabi-v7a, armeabi, x86 or mips."
     exit 1
 fi
 



More information about the Android mailing list