summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--scripts/include/common.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/scripts/include/common.sh b/scripts/include/common.sh
index e54922b..e348e5d 100644
--- a/scripts/include/common.sh
+++ b/scripts/include/common.sh
@@ -165,9 +165,19 @@ function run_cmake {
}
function run_make {
- echo "make"
- make
+ if [[ "${jobs}" == "" ]]; then
+ if [ -f "/proc/cpuinfo" ]; then
+ jobs="$(cat /proc/cpuinfo|grep processor|wc -l)"
+ else
+ jobs="1"
+ fi
+ fi
+ j=" -j${jobs}"
+
+ echo "make$j"
+ make$j
check_error $?
+ unset j
}
function run_make_install {