[Android] build: use MAKEFLAGS env if already set

Thomas Guillem git at videolan.org
Thu Oct 16 12:13:33 CEST 2014


vlc-ports/android | branch: tv | Thomas Guillem <tom at gllm.fr> | Fri Oct 10 10:49:23 2014 +0200| [2a87c1ed71e707aef62b402d79c896cfc5013fd2] | committer: Geoffrey Métais

build: use MAKEFLAGS env if already set

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 compile.sh |   16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/compile.sh b/compile.sh
index ca07811..9895d4d 100755
--- a/compile.sh
+++ b/compile.sh
@@ -202,14 +202,14 @@ EXTRA_CFLAGS="${EXTRA_CFLAGS} -I${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CX
 EXTRA_LDFLAGS="-l${ANDROID_NDK}/sources/cxx-stl/gnu-libstdc++${CXXSTL}/libs/${ANDROID_ABI}/libgnustl_static.a"
 
 # Make in //
-UNAMES=$(uname -s)
-MAKEFLAGS=
-if which nproc >/dev/null
-then
-MAKEFLAGS=-j`nproc`
-elif [ "$UNAMES" == "Darwin" ] && which sysctl >/dev/null
-then
-MAKEFLAGS=-j`sysctl -n machdep.cpu.thread_count`
+if [ -z "$MAKEFLAGS" ]; then
+    UNAMES=$(uname -s)
+    MAKEFLAGS=
+    if which nproc >/dev/null; then
+        MAKEFLAGS=-j`nproc`
+    elif [ "$UNAMES" == "Darwin" ] && which sysctl >/dev/null; then
+        MAKEFLAGS=-j`sysctl -n machdep.cpu.thread_count`
+    fi
 fi
 
 # Build buildsystem tools



More information about the Android mailing list