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/ _______________________________________________ freebsd-ports@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-ports To unsubscribe, send any mail to "[EMAIL PROTECTED]"