From owner-freebsd-questions@FreeBSD.ORG Tue Sep 23 07:46:30 2003 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6EDA716A4B3 for ; Tue, 23 Sep 2003 07:46:30 -0700 (PDT) Received: from smtp.infracaninophile.co.uk (happy-idiot-talk.infracaninophile.co.uk [81.2.69.218]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD10A43FEA for ; Tue, 23 Sep 2003 07:46:24 -0700 (PDT) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [127.0.0.1]) h8NEjDJK068432 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 23 Sep 2003 15:46:14 +0100 (BST) (envelope-from matthew@happy-idiot-talk.infracaninophile.co.uk) Received: (from matthew@localhost)h8NEjD9W068427; Tue, 23 Sep 2003 15:45:13 +0100 (BST) (envelope-from matthew) Date: Tue, 23 Sep 2003 15:45:13 +0100 From: Matthew Seaman To: D J Hawkey Jr Message-ID: <20030923144513.GA51933@happy-idiot-talk.infracaninophile.co.uk> Mail-Followup-To: Matthew Seaman , D J Hawkey Jr , questions at FreeBSD References: <20030923143226.GA89496@sheol.localdomain> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="x+6KMIRAuhnl3hBn" Content-Disposition: inline In-Reply-To: <20030923143226.GA89496@sheol.localdomain> User-Agent: Mutt/1.5.4i X-Spam-Status: No, hits=-11.5 required=5.0 tests=AWL,BAYES_01,EMAIL_ATTRIBUTION,IN_REP_TO,PGP_SIGNATURE_2, QUOTED_EMAIL_TEXT,REFERENCES,REPLY_WITH_QUOTES, USER_AGENT_MUTT autolearn=ham version=2.55 X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp) cc: questions at FreeBSD Subject: Re: Something I should know about 'make buildkernel ...', but I don't. X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Sep 2003 14:46:30 -0000 --x+6KMIRAuhnl3hBn Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Sep 23, 2003 at 09:32:26AM -0500, D J Hawkey Jr wrote: > Hi All. >=20 > Something's been bugging me about 'make buildkernel ...' (or pro'lly more > precisely, the docs): How do I re-make the kernel without first cleaning > /usr/obj/...? >=20 > After applying patches, I bump $BRANCH in /sys/conf/newvers.sh, and would > like the running kernel to reflect the current patchlevel, but not at the > expense of a complete rebuild. Something this trivial shouldn't get me in > any trouble, kernel-wise, should it? >=20 > Browsing Makefile.inc1, I see these defines: > -DNOCLEANDIR run ${MAKE} clean, instead of ${MAKE} cleandir > -DNOCLEAN do not clean at all >=20 > What does 'cleandir' do that 'clean' doesn't? Remove directory trees? > Anyway, is it as simple as: > make buildkernel -DNOCLEAN KERNCONF=3D... So long as you aren't changing the kernel configuration, then you can probably use the 'old' build mechanism: # cd /usr/src/sys/i386/conf # config YOURKERNELCONFIGHERE # cd ../../compile/YOURKERNELCONFIGHERE # make depend # make # make install However, this is only worth doing if you're going to be recompiling the kernel a number of times, as the first time through it will compile everything. Note that this won't put the object files etc. under /usr/obj, although you might be able to achieve that by creative use of the '-d destdir' flag to config(8). Mind you, with modern machines cleaning or not before rebuilding is becoming much less of an issue. It took less time to build a kernel on my machine than it did to write this e-mail... Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 26 The Paddocks Savill Way PGP: http://www.infracaninophile.co.uk/pgpkey Marlow Tel: +44 1628 476614 Bucks., SL7 1TH UK --x+6KMIRAuhnl3hBn Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.3 (FreeBSD) iD8DBQE/cFx5dtESqEQa7a0RAlutAJ9ZtiGKXys0kkVeHZVV8jMixIrayQCbBTLW vllN3qDJeqdBXmGoj8uK8KE= =i2ZO -----END PGP SIGNATURE----- --x+6KMIRAuhnl3hBn--