Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 19 Oct 2008 06:58:31 +0000 (UTC)
From:      Sam Leffler <sam@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r184048 - head/tools/tools/nanobsd
Message-ID:  <200810190658.m9J6wVvB036544@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: sam
Date: Sun Oct 19 06:58:31 2008
New Revision: 184048
URL: http://svn.freebsd.org/changeset/base/184048

Log:
  add -n option to suppress clearing the build tree and add -DNO_CLEAN
  to buildworld and/or buildkernel

Modified:
  head/tools/tools/nanobsd/nanobsd.sh

Modified: head/tools/tools/nanobsd/nanobsd.sh
==============================================================================
--- head/tools/tools/nanobsd/nanobsd.sh	Sun Oct 19 06:55:08 2008	(r184047)
+++ head/tools/tools/nanobsd/nanobsd.sh	Sun Oct 19 06:58:31 2008	(r184048)
@@ -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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200810190658.m9J6wVvB036544>