From owner-freebsd-hackers Fri Dec 5 01:05:51 1997 Return-Path: Received: (from root@localhost) by hub.freebsd.org (8.8.7/8.8.7) id BAA04592 for hackers-outgoing; Fri, 5 Dec 1997 01:05:51 -0800 (PST) (envelope-from owner-freebsd-hackers) Received: from Tandem.com (suntan.tandem.com [192.216.221.8]) by hub.freebsd.org (8.8.7/8.8.7) with ESMTP id BAA04581 for ; Fri, 5 Dec 1997 01:05:45 -0800 (PST) (envelope-from grog@lemis.com) Received: from papillon.lemis.com ([168.87.69.104]) by Tandem.com (8.8.8/2.0.1) with ESMTP id BAA27836; Fri, 5 Dec 1997 01:05:39 -0800 (PST) Received: (grog@localhost) by papillon.lemis.com (8.8.8/8.6.12) id RAA01863; Fri, 5 Dec 1997 17:03:54 +0800 (CST) Message-ID: <19971205170352.42121@lemis.com> Date: Fri, 5 Dec 1997 17:03:52 +0800 From: Greg Lehey To: John-Mark Gurney Cc: Francisco Reyes , "hackers@freebsd.org" Subject: Re: Why so many steps to build new kernel? References: <199712050750.XAA25888@super.zippo.com> <19971205161339.59500@lemis.com> <19971205005430.09155@hydrogen.nike.efn.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.84e In-Reply-To: <19971205005430.09155@hydrogen.nike.efn.org>; from John-Mark Gurney on Fri, Dec 05, 1997 at 12:54:30AM -0800 Organisation: LEMIS, PO Box 460, Echunga SA 5153, Australia Phone: +61-8-8388-8286 Fax: +61-8-8388-8725 Mobile: +61-41-739-7062 WWW-Home-Page: http://www.lemis.com/~grog Sender: owner-freebsd-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk On Fri, Dec 05, 1997 at 12:54:30AM -0800, John-Mark Gurney wrote: > Greg Lehey scribbled this message on Dec 5: >> On Fri, Dec 05, 1997 at 02:50:07AM -0400, Francisco Reyes wrote: >>> I was wondering if there would be any problems with creating a script >>> for some of the steps of building a new kernel. What if any would be >>> the problem with having a script which does: >>> >>> config kern1 >>> cd ../../kern1 >>> make depend >>> make all >>> make install >> >> Why not? Of course, you could simplify it. >> >>> If such script was created it should check the return code of the >>> make command to make sure there were no problems. >> >> You wouldn't need to do that if you wrote: >> >> make config depend all install >> >> Better still, you could make a target 'world' which did this for you, >> including the cd's and configs in your original version. > > hmm... where is this config target for make?? just checked my -current > kernel source tree and see no config target... > > also, how do you propose to handle the directory tree being removed and > recreated out from under you when config runs? (hmm... something like > exec'ing make after the config phase might work...) That's left as an exercise to the reader. OK, what the hell, something like: KERNEL = DEFAULT CONF = /usr/src/sys/i386/conf COMPILE = /usr/src/sys/compile world: config depend build install config: ${CONF}/${KERNEL} cd ${CONF} config -g -n ${KERNEL} depend: ${COMPILE}/${KERNEL} cd ${COMPILE}; make depend all build: ${COMPILE}/${KERNEL} cd ${COMPILE}; make all install: ${COMPILE}/${KERNEL} cd ${COMPILE}; make install If you want to build a different kernel, you specify the name to make: make world KERNEL=FOOBAR What have I left out? Greg