tweak turbobuild.sh

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@11736 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Anthony Minessale 2009-02-10 22:57:54 +00:00
parent 4924c4da15
commit 7dd39a1309

View File

@ -1,12 +1,19 @@
arg=$1 ; shift arg=$1 ; shift
prefix=`cat config.log | grep ^prefix=\' | awk -F \' '{print $2}'`
if [ -z $prefix ] ; then
prefix="/usr/local/freeswitch"
fi
unset VERBOSE
switch_srcdir=`pwd` switch_srcdir=`pwd`
if [ -z $MAKE ] ; then if [ -z $MAKE ] ; then
MAKE=make MAKE=make
fi fi
if [ -z $arg ] ; then if [ -z $arg ] ; then
$MAKE clean echo "Cleaning tree...."
$MAKE -j freeswitch $MAKE clean modwipe 2>&1 > /dev/null
echo "Building core...."
$MAKE -j freeswitch 2>&1 > /dev/null
MODS=`cat modules.conf | grep -v \#` MODS=`cat modules.conf | grep -v \#`
for i in $MODS ; do for i in $MODS ; do
MOD_NAME=`echo $i | sed -e 's|^.*/||'` MOD_NAME=`echo $i | sed -e 's|^.*/||'`
@ -14,6 +21,7 @@ if [ -z $arg ] ; then
touch /tmp/$MOD_NAME.tmp touch /tmp/$MOD_NAME.tmp
$0 $MOD_NAME $MOD_DIR $0 $MOD_NAME $MOD_DIR
done done
echo "Building mods...."
while [ 1 = 1 ] ; do while [ 1 = 1 ] ; do
x=0 x=0
for i in $MODS ; do for i in $MODS ; do
@ -23,7 +31,10 @@ if [ -z $arg ] ; then
done done
if [ $x = 0 ] ; then if [ $x = 0 ] ; then
echo Build finished. Making install echo Build finished. Making install
$MAKE install $MAKE install_core 2>&1 > /dev/null
mods=`find src/mod -name \*.so | grep .libs`
/bin/cp -fp $mods $prefix/mod
echo installed core and $mods
exit; exit;
fi fi
sleep 1 sleep 1
@ -41,14 +52,14 @@ fi
MOD_NAME=$1 ; shift MOD_NAME=$1 ; shift
MOD_DIR=$1 ; shift MOD_DIR=$1 ; shift
echo "Making module in $MOD_NAME" #echo "Making module in $MOD_NAME..."
if [ -f $MOD_DIR/Makefile ] ; then if [ -f $MOD_DIR/Makefile ] ; then
cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j 2>&1 > /dev/null
else else
cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j -f $switch_srcdir/build/modmake.rules cd $MOD_DIR && BASE=$switch_srcdir $MAKE -j -f $switch_srcdir/build/modmake.rules 2>&1 > /dev/null
fi fi
echo "Finished making module in $MOD_NAME" #echo "Finished making module in $MOD_NAME"
sleep 1 sleep 1
rm /tmp/$MOD_NAME.tmp rm /tmp/$MOD_NAME.tmp