From owner-freebsd-ports@FreeBSD.ORG Mon May 21 08:20:50 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5A1FE16A41F; Mon, 21 May 2007 08:20:50 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from redbull.bpaserver.net (redbullneu.bpaserver.net [213.198.78.217]) by mx1.freebsd.org (Postfix) with ESMTP id 10A8113C458; Mon, 21 May 2007 08:20:50 +0000 (UTC) (envelope-from alexander@leidinger.net) Received: from outgoing.leidinger.net (p54A5CD56.dip.t-dialin.net [84.165.205.86]) by redbull.bpaserver.net (Postfix) with ESMTP id 212342E29A; Mon, 21 May 2007 10:20:43 +0200 (CEST) Received: from webmail.leidinger.net (webmail.Leidinger.net [192.168.1.102]) by outgoing.leidinger.net (Postfix) with ESMTP id 0EF315B6169; Mon, 21 May 2007 10:20:27 +0200 (CEST) Received: (from www@localhost) by webmail.leidinger.net (8.13.8/8.13.8/Submit) id l4L8KQDQ034271; Mon, 21 May 2007 10:20:26 +0200 (CEST) (envelope-from Alexander@Leidinger.net) Received: from pslux.cec.eu.int (pslux.cec.eu.int [158.169.9.14]) by webmail.leidinger.net (Horde MIME library) with HTTP; Mon, 21 May 2007 10:20:26 +0200 Message-ID: <20070521102026.d5y5ckqvk8cwcsg0@webmail.leidinger.net> X-Priority: 3 (Normal) Date: Mon, 21 May 2007 10:20:26 +0200 From: Alexander Leidinger To: Jeremy Lea References: <20070520090149.190a919c@deskjail> <20070521021313.GA63269@flint.openpave.org> In-Reply-To: <20070521021313.GA63269@flint.openpave.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: quoted-printable User-Agent: Internet Messaging Program (IMP) H3 (4.1.4) / FreeBSD-7.0 X-BPAnet-MailScanner-Information: Please contact the ISP for more information X-BPAnet-MailScanner: Found to be clean X-BPAnet-MailScanner-SpamCheck: not spam, SpamAssassin (not cached, score=-14.864, required 8, autolearn=not spam, BAYES_00 -15.00, DK_POLICY_SIGNSOME 0.00, FORGED_RCVD_HELO 0.14) X-BPAnet-MailScanner-From: alexander@leidinger.net X-Spam-Status: No Cc: ports@FreeBSD.ORG Subject: Re: Speedup for make clean-depends (and thus make clean) X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 May 2007 08:20:50 -0000 Quoting Jeremy Lea (from Sun, 20 May 2007 19:13:13 -0700): > Hi, > > On Sun, May 20, 2007 at 09:01:49AM +0200, Alexander Leidinger wrote: >> I could write such a new target, e.g. limited-clean, which could be used >> with update tools if there's some interest in something like this from >> the author of such a tool. > > The patch below should get you going on this. The first will save a > stat and a make for each port, so it should reduce your time even more, I tried to do the WRKDIR and _DEPEND_DIRS part in one go myself, but =20 it was slower than the patch I did post (in the case where all dirs =20 are already clean). But I did use another implementation, I did a "set =20 -- $$children" and used shift instead of state variables. Did you =20 compare the speed of your patch with the speed of my patch (in a =20 directory with a lot of dependencies like e.g. gnome2)? > and the second does the limited-clean. I've just added little targets > to test them. There's a bug. You continue if the WRKDIR does not exist, but you =20 don't change the state, so you don't check if the first dependency was =20 already checked. You need to switch to the second state before =20 checking the existence of the WRKDIR. > One might want to use the logic that 'make clean' does a 'make clean > limited-clean' if NOCLEANDEPENDS is not defined, and 'make clean' if it > is, and leave 'make clean-depends' to do the full clean. I don't think changing the semantic of some existing stuff without a =20 major reason is a good idea. I think it is better to introduce a new =20 target and let people use the new target instead. Bye, Alexander. --=20 A log may float in a river, but that does not make it a crocodile. http://www.Leidinger.net Alexander @ Leidinger.net: PGP ID =3D B0063FE7 http://www.FreeBSD.org netchild @ FreeBSD.org : PGP ID =3D 72077137