X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=scripts%2Fhvk-common.sh;h=fb03814494d47597a565cadc6dc8ec3ef919c2c1;hb=8c14aea36db58f7eb1a7ee34f4c9dd440831f1df;hp=7f332da5c2fd5f3ede071163d870ecc863194b46;hpb=a5da940f226a74aba1c50279d04b37897beeec63;p=hvutilities.git diff --git a/scripts/hvk-common.sh b/scripts/hvk-common.sh index 7f332da..fb03814 100644 --- a/scripts/hvk-common.sh +++ b/scripts/hvk-common.sh @@ -1,5 +1,8 @@ #!/bin/bash +# Abort on errors +set -e + if [ -f include/linux/linux_logo.h ]; then mode=linux elif [ -f include/asm-generic/u-boot.h ]; then @@ -17,9 +20,13 @@ else source ${SCRIPTPATH}/hvk-x86.sh fi -: ${MAKEJOBS:="-j$(nproc)"} +: ${MAKEJOBS:="$(nproc)"} + +if [ x"${MAKEJOBS}" != x"" ]; then + MAKEJOBS_ARG="-j ${MAKEJOBS}" +fi -KMAKE="make ${MAKEJOBS}" +KMAKE="make ${MAKEJOBS_ARG}" # Needed to compile sample userspace programs (rtc-test): export CROSS_COMPILE_KCFLAGS=${KCFLAGS}