Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 27 May 2007 16:10:00 -0700
From:      Jeremy Lea <reg@freebsd.org>
To:        Stephen Montgomery-Smith <stephen@math.missouri.edu>, ports@freebsd.org
Subject:   Re: Looking for speed increases in "make index" and pkg_version for ports
Message-ID:  <20070527231000.GA56939@flint.openpave.org>
In-Reply-To: <20070527223048.GA37505@icarus.home.lan>
References:  <4659EF80.70100@math.missouri.edu> <20070527223048.GA37505@icarus.home.lan>

next in thread | previous in thread | raw e-mail | index | archive | help
Hi,

On Sun, May 27, 2007 at 03:30:48PM -0700, Jeremy Chadwick wrote:
> Does it need to be done this way?  Can we just iterate through all of
> the ports, call make -V _DEPEND_DIRS, then sort | uniq the results?

This is exactly what ALL-DEPENDS-LIST does.  Except it's faster.  It
keeps two lists and generates a third implictly, with a two more
temporary lists...  The first is $$L, which start cas _DEPEND_DIRS.  It
loops over L and for each directory ($$d) in $$L checks if it has
already been there (the ports dependencies are not a single list - a
port like gnome2 implicitly depends on libtool hundreds of times), and
skips it if it has, otherwise it adds it to $$checked, which is the list
of directories it has checked, and echo's it so it is added to the
result of ALL-DEPENDS-LIST.  It then does a make -V _DEPENDS_DIR in the
directory (getting $$children), which it then checks to make sure they
are not in the list of checked directories or directories to be checked. 
If they are not it adds them to $$l, the list of directories to check. 
Once it has done with the directories in $$L it sets $$L to $$l, and
starts over, until there are no more directories.

Regards,
  -Jeremy

-- 
FreeBSD - Because the best things in life are free...
                                           http://www.freebsd.org/



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