From owner-freebsd-ports@FreeBSD.ORG Fri Nov 25 12:06:01 2005 Return-Path: X-Original-To: freebsd-ports@freebsd.org Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1201A16A422 for ; Fri, 25 Nov 2005 12:06:01 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: from wproxy.gmail.com (wproxy.gmail.com [64.233.184.193]) by mx1.FreeBSD.org (Postfix) with ESMTP id A6CCB43D5D for ; Fri, 25 Nov 2005 12:05:48 +0000 (GMT) (envelope-from ringworm01@gmail.com) Received: by wproxy.gmail.com with SMTP id 71so286322wra for ; Fri, 25 Nov 2005 04:05:47 -0800 (PST) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:from:to:subject:date:user-agent:cc:references:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:message-id; b=kwxOYfcANRZu2AORR9KMRa4n5YZ+Xa5hKx3DsAkyGRfibpTqXykG3PsxmeXWOB61EOya7H+5tqupHn0qjKAOdOmekIJVh6dgWOIQJpqDZvUkMnEQKIAMr/XDgbnTnwdaOk0cgKaCR0C+MC/aO4izWWAzizm11UNSlPWN07n3WEY= Received: by 10.54.93.10 with SMTP id q10mr5896979wrb; Fri, 25 Nov 2005 04:05:47 -0800 (PST) Received: from ?192.168.1.10? ( [71.102.14.129]) by mx.gmail.com with ESMTP id 64sm64473wra.2005.11.25.04.05.46; Fri, 25 Nov 2005 04:05:47 -0800 (PST) From: "Michael C. Shultz" To: freebsd-ports@freebsd.org Date: Fri, 25 Nov 2005 03:56:32 -0800 User-Agent: KMail/1.8.3 References: <200511210625.16973.ringworm01@gmail.com> <200511251028.29199.freebsd.nospam@mekanix.dk> In-Reply-To: <200511251028.29199.freebsd.nospam@mekanix.dk> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200511250356.32898.ringworm01@gmail.com> Cc: Bjarne Wichmann Petersen Subject: Re: FreeBSD ccache port is wonderfiul! 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: Fri, 25 Nov 2005 12:06:01 -0000 On Friday 25 November 2005 01:28, Bjarne Wichmann Petersen wrote: > On Monday 21 November 2005 15:25, Michael C. Shultz wrote: > > ps: I cc'ed freebsd-ports@freebsd.org in case others like myself haven't > > heard of this program yet, it may be found in /usr/ports/devel/ccache. > > I'm looking at it now, and have a small question. Reading the howto-freebsd > I'll have to insert the following into etc/make.conf: > > .if !defined(NOCCACHE) > .if ${.CURDIR:M/usr/src*} > CC=/usr/local/libexec/ccache/cc > CXX=/usr/local/libexec/ccache/c++ > .else > CC=cc > CXX=c++ > .endif > .else > CC=/usr/bin/cc > CXX=/usr/bin/c++ > .endif > > I don't know much shell-scripting, so I'm not entirely sure what > ${.CURDIR:M/usr/src*} does. But to me it looks like ccache will be called > upon only when the current directory is beneath /usr/src; ie. > world/kernel-builds. Should I make another if-statement for /usr/ports? Or > do I have it all wrong? > > Bjarne For ports I just use this: .if !defined(NOCCACHE) CC=/usr/local/libexec/ccache/cc CXX=/usr/local/libexec/ccache/c++ .endif For cdrtools ports it has to be disabled .if ${.CURDIR:M*/sysutils/cdrtools} NOCCACHE=1 .endif .if ${.CURDIR:M*/sysutils/cdrtools-cjk} NOCCACHE=1 .endif ccache gets too complicated to use for me when building world/kernel, look up the thread in current from ealier this month and decide for yourself. I only build world and kernel once a month so something like make buildworld -DNOCCACHE is probably how I'll do it. -Mike