forked from haojiangwang/tcltk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-boost.sh
executable file
·55 lines (47 loc) · 1.35 KB
/
compile-boost.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
#!/bin/bash -e
## module
MODULE=boost
VERSION=1_49_0
BDIR=boost_${VERSION}
BFILE=boost_${VERSION}.tar.gz
## load defaults
. ./common.sh
## check debug switch
#if [ -n "$SW_DEBUG" ]; then
# CONFIGURE_DEBUG="--enable-symbols"
#fi
## print
echo "** Compiling $MODULE"
## delete whole compile sources and start from new
if [ -n "$SW_CLEANUP" ]; then
echo -n "Deleting old sources ... "
rm -rf $COMPILEDIR/$BDIR $COMPILEDIR/$MODULE
echo done
fi
## copy source to temp compile path
if [ ! -d $COMPILEDIR/$MODULE ] || [ -n "$SW_FORCECOPY" ]; then
echo -n "Copying new sources ... "
if [ -z "$WINDIR" ]; then
tar -xzf $BASEDIR/backup/$BFILE -C $COMPILEDIR/
else
## mingw throws a checksum error because it's still using 16 bit git_t - forward output to null
tar -xzf $BASEDIR/backup/$BFILE -C $COMPILEDIR/ 2> /dev/null || true
fi
## create link without version number
cd $COMPILEDIR
mv $BDIR $MODULE
echo done
fi
## Since we're using no precompiled libraries there is no compilation neccessary
## change to compile dir
#cd $COMPILEDIR/${MODULE}_${VERSION}
## prepare for compilation
#./bootstrap.sh -prefix=$COMPILEDIR/${MODULE}-install
## compile
#./b2
## install
#./b2 install
## copy licence file
cp -pv $COMPILEDIR/$MODULE/LICENSE_1_0.txt $iLICENCEDIR/$MODULE.licence
## fini
echo "** Finished compile-$MODULE."