Skip to content

Commit 676c21a

Browse files
committed
Added make options
1 parent 24d431c commit 676c21a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

lib/core.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,11 @@ SED_BIN=$($WHICH_BIN sed)
55
WGET_BIN=$($WHICH_BIN wget)
66
TAR_BIN=$($WHICH_BIN tar)
77

8+
NPROC=$($WHICH_BIN nproc)
9+
MAKE_OPTS="-s"
10+
if [ "$NPROC" != "" ]; then
11+
MAKE_OPTS="${MAKE_OPTS} -j$($NPROC)"
12+
fi
813

914
error_exit() {
1015
local msg=$1
@@ -192,7 +197,7 @@ php_band_compile_php() {
192197
if [ ! -f .built ]; then
193198
make clean
194199
pre_compile_php
195-
make
200+
make ${MAKE_OPTS}
196201
[ $? -eq 0 ] || error_exit "Compilation of php failed" 3
197202
post_compile_php
198203
touch .built

0 commit comments

Comments
 (0)