forked from CUBRID/cubrid
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathautobuild_aix.cmd
executable file
·72 lines (59 loc) · 1.08 KB
/
autobuild_aix.cmd
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
#!/bin/bash
# Here you can specify it
OPTS="--prefix=$HOME/cubrid --enable-64bit --enable-debug"
# You'd better set JAVA_HOME
if [ "x$JAVA_HOME" = "x" ]; then
JAVA_HOME=/home1/irteam/app/jdk/jdk6
fi
# default values
MAKE="make"
BIT_MODEL="32"
for opt in $OPTS
do
case "$opt" in
--enable-64bit)
BIT_MODEL="64"
shift
;;
*)
shift
;;
esac
done
SYS=`uname -s`
if test "x$SYS" = "xAIX"
then
MAKE="gmake"
CC="gcc -maix$BIT_MODEL"
CXX="g++ -maix$BIT_MODEL"
OBJECT_MODE="$BIT_MODEL"
export CC CXX OBJECT_MODE
fi
# clean the config directory
if [ -d config ]; then
rm -f config/*
fi
. ./autogen.sh
if [ -d build ]; then
rm -rf build
fi
# make sure not re-generate configure
for i in `ls external`
do
if [ -d "external/$i" ]; then
if [ -e "external/$i/configure" ]; then
echo "touch external/$i/configure"
touch external/$i/configure
fi
fi
done
mkdir -p build && cd build
../configure $OPTS && $MAKE && $MAKE install
if [ $? = 0 ]
then
echo "build success"
exit 0
else
echo "build error"
exit -1
fi