FreeBSD ccache port is wonderfiul!

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


-----BEGIN PGP SIGNED MESSAGE-----
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 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.

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

root at blueheron /usr/src > make -V PATH
/sbin:/bin:/usr/sbin:/usr/bin

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 freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-ports
> To unsubscribe, send any mail to "freebsd-ports- 
> unsubscribe at freebsd.org"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (Darwin)

iD8DBQFDhtq3n4uqfTwEb9YRAqOSAJ97JAht+o/3c6+BvX9VUd4C7BdZkgCfZ5aJ
qXPG7s7OgbiWl02yvXLGVEI=
=5wxd
-----END PGP SIGNATURE-----


More information about the freebsd-ports mailing list