From 21517f693d8360c88b98eba0dd68d5769195df21 Mon Sep 17 00:00:00 2001 From: Dov Alperin Date: Wed, 8 Jan 2020 14:19:29 -0500 Subject: [PATCH] Build: Add fast build mode that does not clean everything or run tests Passing the "-f" or "--fast" option to the ./makeall.sh script will build everything without cleaning first, and then will skip tests. --- Kernel/makeall.sh | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/Kernel/makeall.sh b/Kernel/makeall.sh index 5eec01557c5..2782b232233 100755 --- a/Kernel/makeall.sh +++ b/Kernel/makeall.sh @@ -10,6 +10,18 @@ build_group=$(id -g) export build_user export build_group +fast_mode= +while [ "$1" != "" ]; do + case $1 in + -f | --fast ) fast_mode=1 + ;; + -h | --help ) echo "-f or --fast: build fast without cleaning or running tests" + exit 0 + ;; + esac + shift +done + sudo id MAKE=make @@ -18,8 +30,14 @@ if [ "$(uname -s)" = "OpenBSD" ]; then MAKE=gmake fi -$MAKE -C ../ clean && \ +if [ $fast_mode = 1 ]; then $MAKE -C ../ && \ - $MAKE -C ../ test && \ - $MAKE -C ../ install && - sudo -E PATH="$PATH" ./build-image-qemu.sh + $MAKE -C ../ install && + sudo -E PATH="$PATH" ./build-image-qemu.sh +else + $MAKE -C ../ clean && \ + $MAKE -C ../ && \ + $MAKE -C ../ test && \ + $MAKE -C ../ install && + sudo -E PATH="$PATH" ./build-image-qemu.sh +fi