[Android] build: use MAKEFLAGS env if already set

Thomas Guillem git at videolan.org
Fri Oct 10 10:52:46 CEST 2014


vlc-ports/android | branch: master | Thomas Guillem <tom at gllm.fr> | Fri Oct 10 10:49:23 2014 +0200| [9a6d3d851319ec42c19cbae232ea1fad73a55fbe] | committer: Jean-Baptiste Kempf

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=9a6d3d851319ec42c19cbae232ea1fad73a55fbe
---

 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