From owner-freebsd-questions@FreeBSD.ORG Fri Jul 2 23:18:46 2004 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 00D1A16A4CE for ; Fri, 2 Jul 2004 23:18:46 +0000 (GMT) Received: from bilbo.otenet.gr (bilbo.otenet.gr [195.170.0.13]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1A61643D45 for ; Fri, 2 Jul 2004 23:18:43 +0000 (GMT) (envelope-from keramida@ceid.upatras.gr) Received: from gothmog.gr (patr530-a169.otenet.gr [212.205.215.169]) i62NId7O006543; Sat, 3 Jul 2004 02:18:39 +0300 Received: from gothmog.gr (gothmog [127.0.0.1]) by gothmog.gr (8.12.11/8.12.11) with ESMTP id i62NIbCY073268; Sat, 3 Jul 2004 02:18:37 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Received: (from giorgos@localhost) by gothmog.gr (8.12.11/8.12.11/Submit) id i62NIang073267; Sat, 3 Jul 2004 02:18:36 +0300 (EEST) (envelope-from keramida@ceid.upatras.gr) Date: Sat, 3 Jul 2004 02:18:36 +0300 From: Giorgos Keramidas To: Geert Hendrickx Message-ID: <20040702231836.GA63834@gothmog.gr> References: <20040701225452.GA16898@lori.mine.nu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20040701225452.GA16898@lori.mine.nu> cc: freebsd-questions@freebsd.org Subject: Re: make buildworld: build changes only? 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: Fri, 02 Jul 2004 23:18:46 -0000 On 2004-07-02 00:54, Geert Hendrickx wrote: > Is it possible to rebuild these changes only? I know I could cd to the > directory of each changed file and do a make install there, but that is > of course not quite practical. I suppose this could be automated, since > this was exactly the design principle of make: rebuild changed sources > only. > > I know this might brake some dependencies in some cases, but I expect > this to be rare. I could still do a "full" buildworld when necessary. Not if the 'partial build' produces a system that's not working good enough to do a full buildworld though :( If you know what you're doing, it's possible -- most of the time -- to get away with something like this: $ cd /usr/src $ cvs -qR up -APd $ cd usr.bin/foo/ $ make clean all install But this isn't guaranteed to always work and it cannot be automated in the way that you might be thinking of (i.e. run a couple of commands and let everything magically fall into place). The most automated way of building stuff is practically a crontab script that runs: if [ ! -f /root/.noautobuildworld ]; then cvsup -g -L 2 -h cvsup-server.example.net /root/supfile cd /usr/src && \ make buildworld fi Output shall be mailed to root, since this is called from crontab, and you'll be able to `touch /root/.noautobuildworld' to inhibit automatic buildworlds and use the last known good build from /usr/obj to install your system with `make installworld' as usual. HTH, Giorgos