From owner-freebsd-ports@FreeBSD.ORG Tue May 22 13:34:34 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 39EBE16A468 for ; Tue, 22 May 2007 13:34:34 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.224]) by mx1.freebsd.org (Postfix) with ESMTP id D32F713C43E for ; Tue, 22 May 2007 13:34:33 +0000 (UTC) (envelope-from infofarmer@gmail.com) Received: by wr-out-0506.google.com with SMTP id 70so1602516wra for ; Tue, 22 May 2007 06:34:32 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=YKibVLpHW7NYbt/5O+q702p4FDXJoayoxmrVjdXP8LwuaF7RsxniB5yItJPw0PfWySKW0XCxz6yAHWF8I3Yj1jtJkHiAGBgVTF6Qed0gDLUGeXBbzOKvtL+fMakdyGU01getdaSNkkZ7gdQ/7S4xBNhWIYSIXPy9yASKl5J7GkM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:sender:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references:x-google-sender-auth; b=iB3tlL/NOESwnUcv8uSkvlr1WsbbdqiOqqnd4o8T6z5nQYBsw2RM3P3cEl9/1jez+ubY3TCiOMy/8g4EvcHVhhjcjwvFSrtrPZlHbBZGcL9bFepve3ozZ1Ua+Gqe1TtcpuemXERpvQpndUjHoDeiRqb1UPo946BQx/JlYZatfnk= Received: by 10.115.54.1 with SMTP id g1mr3271372wak.1179840872209; Tue, 22 May 2007 06:34:32 -0700 (PDT) Received: by 10.114.194.5 with HTTP; Tue, 22 May 2007 06:34:32 -0700 (PDT) Message-ID: Date: Tue, 22 May 2007 17:34:32 +0400 From: "Andrew Pantyukhin" Sender: infofarmer@gmail.com To: "Stephen Montgomery-Smith" In-Reply-To: <4652EC0C.8030604@math.missouri.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <465291FB.4010901@math.missouri.edu> <20070522071941.GB59910@xor.obsecurity.org> <20070522110359.dwce59oaowkc400o@webmail.leidinger.net> <4652EC0C.8030604@math.missouri.edu> X-Google-Sender-Auth: f097c60cf2ce05f3 Cc: ports@freebsd.org, Alexander Leidinger , 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:34:34 -0000 On 5/22/07, Stephen Montgomery-Smith wrote: > 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. A seemingly better way may be to make these system vars available in make by default. They may even be compiled in - to achieve virtually no performance impact (except for a bit larger default var table).