Speedup for make clean-depends (and thus make clean)

Alexander Leidinger Alexander at Leidinger.net
Sun May 20 07:01:56 UTC 2007


Hi,

the attached patch speeds up make clean-depends in the case when not a
lot of work directories exist (basic idea by Jeremy Lea). It does this
by only including dirs in the cleaning where a WRKDIR exists.

In the X.org 7.2 dependency tree case and a completely clean ports tree
it is a speedup from about 7min10 to 4min40 on my system. For a not so
clean ports tree the time should be more than this, as the cleaning
itself will take a good amount of time. But on a system where you only
build a leaf port, or in case of portupgrade where a lot of subdirs are
clean, it should give a nice speed improvement.

This version does not change the semantics of a make clean. If we are
allowed to change the semantic (not calculating the dependency-subtree
in case a port is already clean), it should be possible to speed this
up more.

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.

Bye,
Alexander.

-- 
The only way to make up for being lost is to make
record time while you are lost.
http://www.Leidinger.net  Alexander @ Leidinger.net: PGP ID = B0063FE7
http://www.FreeBSD.org     netchild @ FreeBSD.org  : PGP ID = 72077137
-------------- next part --------------
A non-text attachment was scrubbed...
Name: bsd.port.mk2.diff
Type: text/x-patch
Size: 1302 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-ports/attachments/20070520/e0733ead/bsd.port.mk2.bin


More information about the freebsd-ports mailing list