forked from haojiangwang/tcltk
-
Notifications
You must be signed in to change notification settings - Fork 0
/
compile-tbcload.sh
executable file
·56 lines (45 loc) · 1.3 KB
/
compile-tbcload.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
56
#!/bin/bash -e
## module
MODULE=tbcload
## load defaults
. ./common.sh
## check debug switch
if [ -n "$SW_DEBUG" ]; then
CONFIGURE_SWITCH+="--enable-symbols"
fi
## check 64bit platform
if [ "$BARCH" == "x86_64" ]; then
CONFIGURE_SWITCH+="--enable-64bit "
fi
## print
echo "** Compiling $MODULE $CONFIGURE_SWITCH"
## delete whole compile sources and start from new
if [ -n "$SW_CLEANUP" ]; then
echo -n "Deleting old sources ... "
rm -rf $COMPILEDIR/$MODULE
echo done
fi
## copy source to temp compile path
if [ ! -d $COMPILEDIR/$MODULE ] || [ -n "$SW_FORCECOPY" ]; then
echo -n "Copying new sources ... "
rsync -a $INTSRCDIR/$MODULE $COMPILEDIR/
rsync -a $EXTSRCDIR/tcl/generic/tclCompile.h $COMPILEDIR/$MODULE/
echo done
fi
## change to compile dir
cd $COMPILEDIR/$MODULE
## configure and make
#env CFLAGS="-D TCL_86_PLUS -D TCL_862_PLUS"
autoconf
(CFLAGS="-I$COMPILEDIR/tcl/win" ./configure --prefix=$INSTALLDIR -includedir=$COMPILEDIR/tcl/win $CONFIGURE_SWITCH)
make
make install
## copy licence file
echo -n "Copying extras ... "
rsync -a $COMPILEDIR/$MODULE/license.terms $iLICENCEDIR/$MODULE.licence
## Sun, Uni ... etc. copy source files
mkdir -p $iSHAREDIR/source
tar -czf $iSHAREDIR/source/$MODULE.tgz -C $INTSRCDIR/ $MODULE
echo done
## fini
echo "** Finished compile-$MODULE."