2014-08-04 14:53:21 +00:00
|
|
|
#!/bin/sh
|
2015-02-12 12:32:30 +00:00
|
|
|
#< build-me.sh - 20150212 - 20140804
|
2014-08-04 14:53:21 +00:00
|
|
|
BN=`basename $0`
|
|
|
|
|
|
|
|
TMPSRC="../.."
|
|
|
|
BLDLOG="bldlog-1.txt"
|
|
|
|
|
|
|
|
if [ -f "$BLDLOG" ]; then
|
|
|
|
rm -f $BLDLOG
|
|
|
|
fi
|
|
|
|
|
2015-02-12 12:32:30 +00:00
|
|
|
TMPOPTS=""
|
2014-08-04 14:53:21 +00:00
|
|
|
##############################################
|
|
|
|
### ***** NOTE THIS INSTALL LOCATION ***** ###
|
|
|
|
### Change to suit your taste, environment ###
|
|
|
|
##############################################
|
2015-02-12 12:32:30 +00:00
|
|
|
# TMPINST="$HOME/projects/install/tidy"
|
|
|
|
# TMPOPTS="-DCMAKE_INSTALL_PREFIX=$TMPINST"
|
2014-08-04 14:53:21 +00:00
|
|
|
#############################################
|
2015-02-12 12:32:30 +00:00
|
|
|
# To build SHARED library
|
|
|
|
# TMPOPTS="$TMPOPTS -DBUILD_SHARED_LIB:BOOL=TRUE"
|
2014-08-04 14:53:21 +00:00
|
|
|
|
2015-02-07 14:50:00 +00:00
|
|
|
for arg in $@; do
|
|
|
|
TMPOPTS="$TMPOPTS $arg"
|
|
|
|
done
|
|
|
|
|
|
|
|
|
2014-08-04 14:53:21 +00:00
|
|
|
echo "$BN: Doing: 'cmake $TMPSRC $TMPOPTS' to $BLDLOG"
|
|
|
|
cmake $TMPSRC $TMPOPTS >> $BLDLOG 2>&1
|
|
|
|
if [ ! "$?" = "0" ]; then
|
|
|
|
echo "$BN: cmake confiuration, generation error"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo "$BN: Doing: 'make' to $BLDLOG"
|
|
|
|
make >> $BLDLOG 2>&1
|
|
|
|
if [ ! "$?" = "0" ]; then
|
|
|
|
echo "$BN: make error - see $BLDLOG for details"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
echo ""
|
|
|
|
echo "$BN: appears a successful build... see $BLDLOG for details"
|
2014-08-06 12:38:21 +00:00
|
|
|
echo ""
|
2015-02-12 12:32:30 +00:00
|
|
|
echo "$BN: Time for '[sudo] make install' IFF desired..."
|
2014-08-04 14:53:21 +00:00
|
|
|
echo ""
|
|
|
|
|
|
|
|
# eof
|
|
|
|
|