[Android] build: re-order some commands

Thomas Guillem git at videolan.org
Tue May 14 16:47:34 CEST 2019


vlc-android | branch: master | Thomas Guillem <thomas at gllm.fr> | Tue May 14 08:53:26 2019 +0200| [9acfd02e5da499a52e01996c3c88ace44d13ece4] | committer: Thomas Guillem

build: re-order some commands

Move VLC PATH configuration up. This will be useful for next commits.

> https://code.videolan.org/videolan/vlc-android/commit/9acfd02e5da499a52e01996c3c88ace44d13ece4
---

 compile-libvlc.sh | 54 +++++++++++++++++++++++++++++-------------------------
 1 file changed, 29 insertions(+), 25 deletions(-)

diff --git a/compile-libvlc.sh b/compile-libvlc.sh
index 7a58c56e9..5efbb518f 100755
--- a/compile-libvlc.sh
+++ b/compile-libvlc.sh
@@ -83,9 +83,29 @@ else
     exit 1
 fi
 
+############
+# VLC PATH #
+############
+SRC_DIR=$PWD
+if [ -f $SRC_DIR/src/libvlc.h ];then
+    VLC_SRC_DIR="$SRC_DIR"
+elif [ -d $SRC_DIR/vlc ];then
+    VLC_SRC_DIR=$SRC_DIR/vlc
+else
+    echo "Could not find vlc sources"
+    exit 1
+fi
+
+VLC_BUILD_DIR=`realpath $VLC_SRC_DIR/build-android-${TARGET_TUPLE}`
+VLC_OUT_PATH="$VLC_BUILD_DIR/ndk"
+mkdir -p $VLC_OUT_PATH
+VLC_OUT_LDLIBS="-L$VLC_OUT_PATH/libs/${ANDROID_ABI} -lvlc"
+
+#################
+# NDK TOOLCHAIN #
+#################
 NDK_TOOLCHAIN_DIR=${PWD}/toolchains/${PLATFORM_SHORT_ARCH}
 NDK_TOOLCHAIN_PATH=${NDK_TOOLCHAIN_DIR}/bin
-
 # Add the NDK toolchain to the PATH, needed both for contribs and for building
 # stub libraries
 CROSS_TOOLS=${NDK_TOOLCHAIN_PATH}/${TARGET_TUPLE}-
@@ -159,28 +179,6 @@ else
     NDK_DEBUG=1
 fi
 
-SRC_DIR=$PWD
-if [ -f $SRC_DIR/src/libvlc.h ];then
-    VLC_SRC_DIR="$SRC_DIR"
-elif [ -d $SRC_DIR/vlc ];then
-    VLC_SRC_DIR=$SRC_DIR/vlc
-else
-    echo "Could not find vlc sources"
-    exit 1
-fi
-
-VLC_BUILD_DIR=`realpath $VLC_SRC_DIR/build-android-${TARGET_TUPLE}`
-VLC_OUT_PATH="$VLC_BUILD_DIR/ndk"
-VLC_OUT_LDLIBS="-L$VLC_OUT_PATH/libs/${ANDROID_ABI} -lvlc"
-
-avlc_checkfail()
-{
-    if [ ! $? -eq 0 ];then
-        echo "$1"
-        exit 1
-    fi
-}
-
 ###############
 # DISPLAY ABI #
 ###############
@@ -207,6 +205,14 @@ if [ -z "$ANDROID_ABI" ]; then
     exit 1
 fi
 
+avlc_checkfail()
+{
+    if [ ! $? -eq 0 ];then
+        echo "$1"
+        exit 1
+    fi
+}
+
 avlc_make_toolchain()
 {
 NDK_TOOLCHAIN_PROPS=${NDK_TOOLCHAIN_DIR}/source.properties
@@ -577,8 +583,6 @@ cd $SRC_DIR
 # libVLC modules #
 ##################
 
-mkdir -p $VLC_OUT_PATH
-
 REDEFINED_VLC_MODULES_DIR=${VLC_BUILD_DIR}/install/lib/vlc/plugins
 rm -rf ${REDEFINED_VLC_MODULES_DIR}
 mkdir -p ${REDEFINED_VLC_MODULES_DIR}



More information about the Android mailing list