Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 May 2007 10:20:26 +0200
From:      Alexander Leidinger <Alexander@Leidinger.net>
To:        Jeremy Lea <reg@FreeBSD.ORG>
Cc:        ports@FreeBSD.ORG
Subject:   Re: Speedup for make clean-depends (and thus make clean)
Message-ID:  <20070521102026.d5y5ckqvk8cwcsg0@webmail.leidinger.net>
In-Reply-To: <20070521021313.GA63269@flint.openpave.org>
References:  <20070520090149.190a919c@deskjail> <20070521021313.GA63269@flint.openpave.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Quoting Jeremy Lea <reg@FreeBSD.ORG> (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



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