summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsam <sam@FreeBSD.org>2008-10-19 06:58:31 +0000
committersam <sam@FreeBSD.org>2008-10-19 06:58:31 +0000
commitf0bd6304a2f45313e77bf94ca25c84270c3d4c8d (patch)
tree945dc303ebee7ffede9e384536cbb7181bf5cfb6
parent4ceda2abba2589b9879eb14763ddd65a15bd1ed8 (diff)
downloadFreeBSD-src-f0bd6304a2f45313e77bf94ca25c84270c3d4c8d.zip
FreeBSD-src-f0bd6304a2f45313e77bf94ca25c84270c3d4c8d.tar.gz
add -n option to suppress clearing the build tree and add -DNO_CLEAN
to buildworld and/or buildkernel
-rw-r--r--tools/tools/nanobsd/nanobsd.sh20
1 files changed, 18 insertions, 2 deletions
diff --git a/tools/tools/nanobsd/nanobsd.sh b/tools/tools/nanobsd/nanobsd.sh
index 00ad156..d1041a2 100644
--- a/tools/tools/nanobsd/nanobsd.sh
+++ b/tools/tools/nanobsd/nanobsd.sh
@@ -665,6 +665,7 @@ usage () {
echo " -b suppress builds (both kernel and world)"
echo " -i suppress disk image build"
echo " -k suppress buildkernel"
+ echo " -n add -DNO_CLEAN to buildworld, buildkernel, etc"
echo " -q make output more quite"
echo " -v make output more verbose"
echo " -w suppress buildworld"
@@ -676,12 +677,13 @@ usage () {
#######################################################################
# Parse arguments
+do_clean=true
do_kernel=true
do_world=true
do_image=true
set +e
-args=`getopt bc:hikqvw $*`
+args=`getopt bc:hiknqvw $*`
if [ $? -ne 0 ] ; then
usage
exit 2
@@ -714,6 +716,10 @@ do
do_image=false
shift
;;
+ -n)
+ do_clean=false
+ shift
+ ;;
-q)
PPLEVEL=$(($PPLEVEL - 1))
shift
@@ -763,6 +769,12 @@ else
exit 1
fi
+if $do_clean ; then
+ true
+else
+ NANO_PMAKE="${NANO_PMAKE} -DNO_CLEAN"
+fi
+
export MAKEOBJDIRPREFIX
export NANO_ARCH
@@ -793,7 +805,11 @@ export NANO_BOOTLOADER
pprint 1 "NanoBSD image ${NANO_NAME} build starting"
if $do_world ; then
- clean_build
+ if $do_clean ; then
+ clean_build
+ else
+ pprint 2 "Using existing build tree (as instructed)"
+ fi
make_conf_build
build_world
else
OpenPOWER on IntegriCloud