From fda69b6ee1f560bb3272db74cbb4f5a9b2bace54 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Thu, 18 Feb 2016 00:37:46 -0500 Subject: [PATCH] Add variable for passing options to make. Include a commented-out example of how to use -j to do multicore builds. --- buildenv.sh | 6 ++++++ chocpkg/chocpkg | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/buildenv.sh b/buildenv.sh index 34231eb..4740b7a 100644 --- a/buildenv.sh +++ b/buildenv.sh @@ -14,6 +14,12 @@ else IS_CROSS_COMPILE=false fi +# Extra arguments we pass to make when building. +MAKE_OPTS= + +# Uncomment to use more threads for faster builds. +#MAKE_OPTS=-j4 + # On OS X, we must set additional options: build 32-bit binaries, and the # target API version. if [ $(uname) = "Darwin" ]; then diff --git a/chocpkg/chocpkg b/chocpkg/chocpkg index 673cdb7..2e16edc 100755 --- a/chocpkg/chocpkg +++ b/chocpkg/chocpkg @@ -176,7 +176,7 @@ do_build() { error_exit "Failed to configure package $PACKAGE_NAME for build." ) - make || ( + make $MAKE_OPTS || ( error_exit "Failed to build package $PACKAGE_NAME." ) }