diff --git a/contrib/devtools/build_autotools.sh b/contrib/devtools/build_autotools.sh index 9b6f75d362..4a72be6950 100755 --- a/contrib/devtools/build_autotools.sh +++ b/contrib/devtools/build_autotools.sh @@ -1,26 +1,27 @@ #!/usr/bin/env bash export LC_ALL=C set -euxo pipefail : "${TOPLEVEL:=$(git rev-parse --show-toplevel)}" : "${BUILD_DIR:=${TOPLEVEL}/build}" # Default to nothing : "${CONFIGURE_FLAGS:=}" +: "${THREADS:=$(nproc || sysctl -n hw.ncpu)}" # Generate necessary autoconf files cd ${TOPLEVEL} ./autogen.sh mkdir -p "${BUILD_DIR}" cd ${BUILD_DIR} rm -f build.status test_bitcoin.xml read -a CONFIGURE_FLAGS <<< "$CONFIGURE_FLAGS --prefix=$(pwd)" ../configure "${CONFIGURE_FLAGS[@]}" # Run build make -j "${THREADS}"