From owner-freebsd-ports@FreeBSD.ORG Tue May 22 13:11:48 2007 Return-Path: X-Original-To: freebsd-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 1223716A41F; Tue, 22 May 2007 13:11:48 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from sccmmhc92.asp.att.net (sccmmhc92.asp.att.net [204.127.203.212]) by mx1.freebsd.org (Postfix) with ESMTP id BB2A713C44B; Tue, 22 May 2007 13:11:47 +0000 (UTC) (envelope-from stephen@math.missouri.edu) Received: from laptop2.montlan (12-216-253-187.client.mchsi.com[12.216.253.187]) by sccmmhc92.asp.att.net (sccmmhc92) with ESMTP id <20070522131141m9200e0mi1e>; Tue, 22 May 2007 13:11:46 +0000 Message-ID: <4652EC0C.8030604@math.missouri.edu> Date: Tue, 22 May 2007 08:11:40 -0500 From: Stephen Montgomery-Smith User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.8.1.2) Gecko/20070505 SeaMonkey/1.1.1 MIME-Version: 1.0 To: Andrew Pantyukhin References: <465291FB.4010901@math.missouri.edu> <20070522071941.GB59910@xor.obsecurity.org> <20070522110359.dwce59oaowkc400o@webmail.leidinger.net> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Cc: gnome@freebsd.org, Alexander Leidinger , freebsd-ports@freebsd.org, Kris Kennaway Subject: Re: More speed increases for make-ing 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: Tue, 22 May 2007 13:11:48 -0000 Andrew Pantyukhin wrote: > On 5/22/07, Alexander Leidinger wrote: >> Quoting Andrew Pantyukhin (from Tue, 22 May >> 2007 11:55:39 +0400): >> >> > On 5/22/07, Kris Kennaway wrote: >> >> On Tue, May 22, 2007 at 01:47:23AM -0500, Stephen Montgomery-Smith >> wrote: >> >>> This small modification cuts off about 25% off pkg_version on my >> system. >> >>> >> >>> Basically bsd.gnome.mk recursively finds all the dependencies, but >> many >> >>> of them are listed many times. This makes make work extra hard >> when it >> >>> doesn't have to. I simply weed out the repeated entries. >> >>> >> >> >> >>> --- bsd.gnome.mk-orig Tue May 22 01:29:08 2007 >> >>> +++ bsd.gnome.mk Tue May 22 01:29:22 2007 >> >>> @@ -655,6 +655,8 @@ >> >>> _USE_GNOME+= ${${component}_USE_GNOME_IMPL} ${component} >> >>> . endfor >> >>> >> >>> +_USE_GNOME!=(for i in ${_USE_GNOME}; do ${ECHO_CMD} $$i; done) | >> sort -u >> >>> + >> >>> # Setup the GTK+ API version for pixbuf loaders, input method >> modules, >> >>> # and theme engines. >> >>> PLIST_SUB+= GTK2_VERSION="${GTK2_VERSION}" >> >> >> >> Be careful, != assignments may add thousands of process invocations to >> >> large targets like 'make index' and can slow it down dramatically. >> > >> > Right, and uniqueness logic can be implemented in make. >> >> Be proactive and tell/point out how... :) > > TMTOWTDI. There are several examples in bsd.*.mk. The > obvious one is "flags" (you set or unset flag vars > first, then traverse them and add what you need to > the list). In recent versions of our make you can > also use ${VAR:O:u} I must admit I was looking for the :u. Definitely a good feature - maybe it could be invoked in the make file conditional on an appropriate value of OSVERSION. Incidently if you want to save a few more != assignments, I notice that setting the variables ARCH=i386 OPSYS=FreeBSD OSREL=6.2 OSVERSION=602110 in /etc/make.conf will do this for you. Of course, you then have to keep this info up to date (e.g. change OSVERSION every time you do a "make world"), and it doesn't really seem to save a lot of time on my system, but I would be interested to hear other reports.