FreeBSD ccache port is wonderfiul!

michael johnson buhnux at
Fri Nov 25 09:34:43 GMT 2005

Hash: SHA1

On Nov 25, 2005, at 4:28 AM, Bjarne Wichmann Petersen wrote:

> On Monday 21 November 2005 15:25, Michael C. Shultz wrote:
>> ps: I cc'ed freebsd-ports at 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.

yeah, the reason for this is because src/ sets PATH

root at blueheron /usr/src > make -V PATH

and ccache lives in /usr/local..

> Should I make another if-statement for /usr/ports? Or do
> I have it all wrong

as long as you have /usr/local/libexec/ccache in your path
before /usr/bin you'll be fine.

> Bjarne
> _______________________________________________
> freebsd-ports at mailing list
> To unsubscribe, send any mail to "freebsd-ports- 
> unsubscribe at"

Version: GnuPG v1.4.1 (Darwin)


More information about the freebsd-ports mailing list