diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-11-26 03:00:29 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-11-26 03:00:29 +0300 |
commit | c53f50227f520a28f82c71cc1aefaec2dc4ddac9 (patch) | |
tree | 58c44944d8e868d4f828dbc68281f64d4a7a9ba9 /scripts/include/common.sh | |
parent | 4fb71203992bb0ccc0dfbbf8f0cb46d6c2ecd180 (diff) | |
parent | 85c928c3fd96018ca5ca6d27dc7ffa7b63764fa2 (diff) | |
download | spm-c53f50227f520a28f82c71cc1aefaec2dc4ddac9.tar.gz spm-c53f50227f520a28f82c71cc1aefaec2dc4ddac9.tar.bz2 spm-c53f50227f520a28f82c71cc1aefaec2dc4ddac9.tar.xz spm-c53f50227f520a28f82c71cc1aefaec2dc4ddac9.zip |
Merge branch 'master' into curl
Diffstat (limited to 'scripts/include/common.sh')
-rw-r--r-- | scripts/include/common.sh | 20 |
1 files changed, 12 insertions, 8 deletions
diff --git a/scripts/include/common.sh b/scripts/include/common.sh index 974d66c..2383724 100644 --- a/scripts/include/common.sh +++ b/scripts/include/common.sh @@ -18,6 +18,10 @@ function common_build_init { export envname=${package} fi + if [[ "${MAKE}" == "" ]]; then + export MAKE="make" + fi + export srcdir=$(realpath "${dir}/../src/${package}") if [ ! -d "${srcdir}" ]; then echo "Error: Package sources directory not exists for package '${package}'." @@ -111,8 +115,8 @@ function run_autoreconf { echo "cd ${srcdir}/${SUBDIR}" cd "${srcdir}/${SUBDIR}" check_error $? - echo "make distclean" - make distclean + echo "${MAKE} distclean" + ${MAKE} distclean echo "autoreconf ${flags}" autoreconf ${flags} unset flags @@ -169,21 +173,21 @@ function run_make { if [[ "${jobs}" == "" ]]; then if [ -f "/proc/cpuinfo" ]; then jobs="$(cat /proc/cpuinfo|grep processor|wc -l)" + j=" -j${jobs}" else - jobs="1" + j="" fi fi - j=" -j${jobs}" - echo "make$j" - make$j + echo "${MAKE}$j" + ${MAKE}$j check_error $? unset j } function run_make_install { - echo "make install" - make install + echo "${MAKE} install" + ${MAKE} install check_error $? } |