From e7d46a1a0ec4654d24dd3a35c6e00c2a6d7e7175 Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Fri, 30 Mar 2007 20:24:37 +0000 Subject: [PATCH] turbo_build.sh git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@4815 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- build/turbo_build.sh | 54 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100755 build/turbo_build.sh diff --git a/build/turbo_build.sh b/build/turbo_build.sh new file mode 100755 index 0000000000..9409d1fdad --- /dev/null +++ b/build/turbo_build.sh @@ -0,0 +1,54 @@ +arg=$1 ; shift +switch_srcdir=`pwd` +if [ -z $MAKE ] ; then + MAKE=make +fi + +if [ -z $arg ] ; then + $MAKE -j8 core + MODS=`cat modules.conf | grep -v \#` + for i in $MODS ; do + MOD_NAME=`echo $i | sed -e 's|^.*/||'` + MOD_DIR=`if test -d $switch_srcdir/src/mod/$i ; then echo $switch_srcdir/src/mod/$i ; else echo $i ; fi;` + touch /tmp/$MOD_NAME.tmp + $0 $MOD_NAME $MOD_DIR + done + while [ 1 = 1 ] ; do + x=0 + for i in $MODS ; do + if [ -f /tmp/$MOD_NAME.tmp ] ; then + x=$[$x+1]; + fi + done + if [ $x = 0 ] ; then + sleep 1 + echo done + exit; + fi + sleep 1 + done + + exit +fi + +if [ ! $arg = "bg" ] ; then + $0 bg $arg $@ & + exit +fi + + +MOD_NAME=$1 ; shift +MOD_DIR=$1 ; shift + +echo "Making module in $MOD_NAME" +if [ -f $MOD_DIR/Makefile ] ; then + cd $MOD_DIR && BASE=$switch_srcdir $MAKE +else + cd $MOD_DIR && BASE=$switch_srcdir $MAKE -f $switch_srcdir/build/modmake.rules +fi + +echo "Finished making module in $MOD_NAME" +sleep 1 +rm /tmp/$MOD_NAME.tmp + +