[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-devel
Subject:    Re: ccache and distcc
From:       Mike Richardson <mike () quaking ! demon ! co ! uk>
Date:       2003-02-06 9:30:56
[Download RAW message or body]

On Wednesday 05 Feb 2003 3:38 pm, fenix@club-internet.fr wrote:
> ----Message d'origine----
>
> >De: Pupeno <pupeno@kde.org>
> >A: kde-devel@kde.org
> >Sujet: ccache and distcc
> >Date: Wed, 5 Feb 2003 11:07:02 -0500
> >
> >-----BEGIN PGP SIGNED MESSAGE-----
> >Hash: SHA1
> >
> >Is anybody here using ccache and distcc to build KDE ?
>
> yes, me :)
>
> >I changed by hand the variables in Makefile to use ccache and it worked,
> > how can I make it automatically ?
>
> do some links:
> ln -s /usr/local/bin/ccache /usr/local/bin/cc
> ln -s /usr/local/bin/ccache /usr/local/bin/c++
> ln -s /usr/local/bin/ccache /usr/local/bin/CC
> ln -s /usr/local/bin/ccache /usr/local/bin/gcc
> ln -s /usr/local/bin/ccache /usr/local/bin/g++
> ln -s /usr/local/bin/ccache /usr/local/bin/gcc-3
> ln -s /usr/local/bin/ccache /usr/local/bin/g++-3

I use distcc, tho not ccache. I started this way, the i decided it was too 
problematic. I found the following a lot better:

First, a wrapper round make:

[mike@henley mike]$ cat /usr/local/bin/mmake3
#!/bin/sh

export DISTCC_HOSTS='localhost legacy archibold'
export PATH=/usr/local/distcc:$PATH 
make

[mike@henley mike]$

I've also got a mmake2 for when "legacy" is running XP :(( Then

[mike@henley mike]$ cat /usr/local/distcc/gcc
#!/bin/sh
echo `date`: distcc /usr/bin/gcc $* >> /tmp/distcc.log
exec distcc /usr/bin/gcc $*
[mike@henley mike]$

(and similarly for g++). The logging is just so I could convince myself that 
it was doing the right thing.


Then, if i *know* may change will only recompile one file, then i just do 
make, and I know the build will run on localhost, which is the fastest 
machine (and there are no distcc overheads). OTOH, for big changes I use the 
command "mmake3" (or "mmake2" :)

One extra advantage of this is, you can set it up without root access, it., 
just put the scripts in a directory of your own and adjust the paths to 
match.

I guess the same could work to use ccache as well.

Mike

>
> in you sh profile:
> set PATH="/usr/local/bin:$PATH"
>
> >And to mix distcc and ccache should I call "distcc ccache gcc" ?
> >Thanks.
>
> i have used links /usr/local/bin/cc -> /usr/local/bin/cc-wrapper.pl but now
> as i only use ccache i have removed my wrapper :(
>
> FeniX
>
> >- --
> >Pupeno: pupeno@kde.org
> >KDE Accessibility co-maintainer
> >http://accessibility.kde.org
> >
> >> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to
> >> unsubscribe <<

-- 
The box said "Install Windows 98 or better".
So I installed Linux.

mike@quaking.demon.co.uk
http://www.quaking.demon.co.uk, http://www.thekompany.com

 
>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic