From owner-freebsd-ports@FreeBSD.ORG Sun May 27 23:09:29 2007 Return-Path: X-Original-To: ports@freebsd.org Delivered-To: freebsd-ports@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B27D16A4D5 for ; Sun, 27 May 2007 23:09:29 +0000 (UTC) (envelope-from reg@openpave.org) Received: from warsaw.ucdavis.edu (warsaw.ucdavis.edu [128.120.32.41]) by mx1.freebsd.org (Postfix) with ESMTP id 042AB13C469 for ; Sun, 27 May 2007 23:09:28 +0000 (UTC) (envelope-from reg@openpave.org) Received: from flint.openpave.org ([169.237.230.40]) by warsaw.ucdavis.edu (8.13.7/8.13.1/it-defang-5.4.0) with ESMTP id l4RN9SHS023619 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sun, 27 May 2007 16:09:28 -0700 (PDT) Received: from sandy.local (flint.local [192.168.1.5]) by flint.openpave.org (8.13.8/8.13.8) with ESMTP id l4RNA0aK071486; Sun, 27 May 2007 23:10:00 GMT (envelope-from reg@sandy.local) Received: (from reg@localhost) by sandy.local (8.13.8/8.13.8/Submit) id l4RNA0NK071481; Sun, 27 May 2007 16:10:00 -0700 (PDT) (envelope-from reg) Date: Sun, 27 May 2007 16:10:00 -0700 From: Jeremy Lea To: Stephen Montgomery-Smith , ports@freebsd.org Message-ID: <20070527231000.GA56939@flint.openpave.org> References: <4659EF80.70100@math.missouri.edu> <20070527223048.GA37505@icarus.home.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070527223048.GA37505@icarus.home.lan> User-Agent: Mutt/1.4.2.2i X-Scanned-By: MIMEDefang 2.57 on 128.120.32.41 Cc: Subject: Re: Looking for speed increases in "make index" and pkg_version for ports X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 May 2007 23:09:29 -0000 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/