[mythtv] distcc build script

David George david at thegeorges.us
Mon Jan 31 12:36:20 EST 2005

Based on the instructions at: 
http://mythtv.org/docs/mythtv-HOWTO-5.html#ss5.5 , I created the 
attached build script.  Feel free to include it in contrib.

I found I needed to add the make -C libs/libmythsamplerate -j$num_hosts 
CC=distcc line in order to build a recent CVS (not sure if it is still 
needed though).

The only change you need to do is to modify the DISTCC_HOSTS variable to 
your hostnames.  The script will multiple the number of hostnames by 2 
to get a recommended -j amount.

You can also pass in configure on the command line to run the initial 
./configure if you did a make distclean.  I haven't actually tested 
this, but it should work.


-------------- next part --------------

# @(#) distcc_build v1.0  Build MythTV using distcc  Author: David George

echo "Build started: `date`" > build.log

if [ "X$1" = "Xconfigure" ]; then

# Change the hosts listed in the DISTCC_HOSTS variable to your hosts running
# distccd.  You can specify as many hosts as you wish and this script will
# automatically compute a reasonable -j argument for you.

export DISTCC_HOSTS='localhost host1 host2 host3'

num_hosts=`echo $DISTCC_HOSTS | awk '{ print NF }'`
((numhosts=$num_hosts * 2))

qmake mythtv.pro
make qmake
make -C libs/libavcodec -j$num_hosts CC=distcc
make -C libs/libavformat -j$num_hosts CC=distcc
make -C libs/libmythsamplerate -j$num_hosts CC=distcc
make -C libs/libmyth -j$num_hosts CXX=distcc
make -C libs/libmythtv -j$num_hosts CXX=distcc
make -C libs -j$num_hosts CXX=distcc
make -j$num_hosts CXX=distcc

echo "Build finished: `date`" >> build.log

More information about the mythtv-dev mailing list