diff options
author | Brian Behlendorf <[email protected]> | 2015-11-16 09:47:43 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-11-16 16:10:07 -0800 |
commit | 27a19a0d5a5297f399eaa6eca86dc4047e484078 (patch) | |
tree | 7d2135fa7c9927b1ef0531964e1d58097a5b8075 | |
parent | 3d8d245fb3f1724488c972658da2aab9e8528210 (diff) |
zimport.sh: Add configure/make option support
Allow the following environment variables to control the build
behavior of the zimport.sh script. This can be useful when you
want a debug build or require specific build options. The
default values are:
CONFIG_OPTIONS=""
MAKE_OPTIONS="-s -j$(nproc)"
Signed-off-by: Brian Behlendorf <[email protected]>
-rwxr-xr-x | scripts/zimport.sh | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/scripts/zimport.sh b/scripts/zimport.sh index d702be579..3488460ee 100755 --- a/scripts/zimport.sh +++ b/scripts/zimport.sh @@ -73,9 +73,13 @@ COLOR=1 REPO="https://github.com/zfsonlinux" IMAGES_DIR="$SCRIPTDIR/zfs-images/" IMAGES_TAR="https://github.com/zfsonlinux/zfs-images/tarball/master" -CPUS=`grep -c ^processor /proc/cpuinfo` ERROR=0 +CONFIG_LOG="configure.log" +CONFIG_OPTIONS=${CONFIG_OPTIONS:-""} +MAKE_LOG="make.log" +MAKE_OPTIONS=${MAKE_OPTIONS:-"-s -j$(nproc)"} + usage() { cat << EOF USAGE: @@ -405,9 +409,9 @@ for TAG in $SRC_TAGS; do else cd $SPL_DIR make distclean &>/dev/null - sh ./autogen.sh &>/dev/null || fail 1 - ./configure &>/dev/null || fail 2 - make -s -j$CPUS &>/dev/null || fail 3 + ./autogen.sh >>$CONFIG_LOG 2>&1 || fail 1 + ./configure $CONFIG_OPTIONS >>$CONFIG_LOG 2>&1 || fail 2 + make ${MAKE_OPTIONS} >>$MAKE_LOG 2>&1 || fail 3 pass_nonewline fi done @@ -425,9 +429,10 @@ for TAG in $SRC_TAGS; do else cd $ZFS_DIR make distclean &>/dev/null - sh ./autogen.sh &>/dev/null || fail 1 - ./configure --with-spl=$SPL_DIR &>/dev/null || fail 2 - make -s -j$CPUS &>/dev/null || fail 3 + ./autogen.sh >>$CONFIG_LOG 2>&1 || fail 1 + ./configure --with-spl=$SPL_DIR $CONFIG_OPTIONS \ + >>$CONFIG_LOG 2>&1 || fail 2 + make ${MAKE_OPTIONS} >>$MAKE_LOG 2>&1 || fail 3 pass_nonewline fi done |