File indexing completed on 2024-12-22 04:18:24

0001 #!/bin/sh
0002 
0003 cd `dirname $0`
0004 
0005 export SCRIPTDIR=$PWD
0006 export BUILDDIR=$PWD/build
0007 
0008 echo "Building Kst from $SCRIPTDIR into $BUILDDIR"
0009 
0010 if [ "$1" = "debug" ]
0011 then
0012   echo "Building in Debug mode"
0013   export KST_DEBUG_MODE=1
0014 else
0015   echo "Building in Release mode"
0016   export KST_DEBUG_MODE=0
0017 fi
0018 
0019 if [ "$2" ]
0020 then
0021   echo "Installation location of $2 has been requested"
0022   export INSTALL_PREFIX=$2
0023 fi
0024 
0025 if [ "$3" ]
0026 then
0027   echo "Installation library directory of $3 has been requested"
0028   export INSTALL_LIBDIR=$3
0029 fi
0030 
0031 if [ "$4" ]
0032 then
0033   echo "Output directory of $4 has been requested"
0034   export OUTPUT_DIR=$4
0035 fi
0036 
0037 if [ "$INSTALL_LIBDIR" ]
0038 then
0039   echo "Build will be automatically installed to the configured location ($INSTALL_PREFIX)"
0040 else
0041   echo "Build will be automatically install to the default location (/usr)"
0042 fi
0043 
0044 mkdir -p $BUILDDIR
0045 cd $BUILDDIR
0046 qmake -r $SCRIPTDIR/kst.pro
0047 
0048 if [ -d /opt/icecream/bin ]
0049 then
0050         echo "Using Icecream"
0051         PATH=/opt/icecream/bin:$PATH make -j4
0052         PATH=/opt/icecream/bin:$PATH make install
0053 else
0054         make -j3
0055         make install
0056 fi