please, review the attached patch

Mikhail Teterin mi+kde at
Sun Sep 11 17:01:30 PDT 2005


The attached patch aims to replace the deep recursion in the's ALL-DEPENDS-LIST script with a shallow one (not sure if
that's the right term, though).

The new version handles circular dependencies nicely and (being shallow)
will never require more than one sub-make to do the job. The existing
algorithm stacks as many make processes as there are dependency-levels
and is thus prone to hitting make's recursion and the kernel's maxproc
limits on occasion. The existing algoritm also passes the already
visited directories on command line, running the risk of hitting the
maximum number of command-line arguments.

An extra bonus is the substantially smaller number of subprocesses
required for every iteration (no sed, grep, cut invokations) --
everything is done by the same single shell subprocess (plus make).

Portmgr is being cautious in adopting this patch, even though the
current implemention's use of grep may miss some dependencies (kde3
misses print/teTeX for example). It needs more testing -- please,

To test simply merge the patch into your and try various
recursive targets like clean, and fetch-recursive, or simply

Note that the list of directories is no longer sort-ed (the current
version uses "sort -u" to get rid of duplicates), so the exact order in
which directories are listed/visited may be different -- that's normal.

Thanks for your time!


-------------- next part --------------
A non-text attachment was scrubbed...
Type: text/x-diff
Size: 2412 bytes
Desc: not available
Url :

More information about the freebsd-ports mailing list