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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
# Configure the build
if [[ "$1"x == "x" ]];then
PREFIX=$PWD
else
PREFIX=$1
fi
#======================================================================
# Configure stuff needed for eggs
#======================================================================
function configure_dependencies () {
#======================================================================
# libnanomsg
#======================================================================
if [[ ! $(ls /usr/lib/*/libnanomsg*) ]];then
echo "libnanomsg build needed."
echo "BUILD_NANOMSG=yes" >> makefile.inc
fi
#======================================================================
# postgresql libraries
#======================================================================
if [[ ! $(ls /usr/lib/*/libpq.*) ]];then
echo "Postgresql build needed."
echo "BUILD_POSTGRES=yes" >> makefile.inc
fi
if [[ ! $(ls /usr/lib/*/libsqlite3.*) ]];then
echo "Sqlite3 build needed."
echo "BUILD_SQLITE3=yes" >> makefile.inc
fi
}
#======================================================================
# Initialize makefile.inc
#======================================================================
echo "" > makefile.inc
#======================================================================
# Do we need Chicken?
#======================================================================
if [[ -e /usr/bin/sw_vers ]]; then
ARCHSTR=$(/usr/bin/sw_vers -productVersion)
else
ARCHSTR=$(lsb_release -sr)
fi
echo "CHICKEN_PREFIX=$PREFIX/.$ARCHSTR" >> makefile.inc
CHICKEN_PREFIX=$PREFIX/bin/.$ARCHSTR
if [[ ! $(type csi) ]];then
echo "Chicken build needed."
echo "BUILD_CHICKEN=yes" >> makefile.inc
configure_dependencies
echo "include chicken.makefile" >> makefile.inc
else
echo "CSIPATH=$(which csi)" >> makefile.inc
CSIPATH=$(which csi)
echo "CKPATH=$(dirname $(dirname $CSIPATH))" >> makefile.inc
fi
# Make setup scripts
echo "#!/bin/bash" > setup.sh
echo "export PATH=$CHICKEN_PREFIX/bin:\$PATH" >> setup.sh
echo "export LD_LIBRARY_PATH=$CHICKEN_PREFIX/lib" >> setup.sh
echo 'exec "$@"' >> setup.sh
chmod a+x setup.sh
echo "setenv PATH $CHICKEN_PREFIX/bin:\$PATH" > setup.csh
echo "setenv LD_LIBRARY_PATH $CHICKEN_PREFIX/lib" >> setup.csh
echo "All done creating makefile.inc, feel free to edit it!"
echo "run \"setup.sh bash\" or source setup.csh to get PATH and LD_LIBRARY_PATH adjusted"
|
<
|
<
<
<
<
<
|
<
<
<
|
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
<
|
<
<
|
<
<
|
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Megatest. If not, see <http://www.gnu.org/licenses/>.
# look at build.config (not a version controlled file and
# create ulex.scm and dbmgr.scm
if [[ -e transport-flavor ]];then
FLAVOR=$(cat transport-flavor)
else
FLAVOR=full
fi
sed -e "s/FLAVOR/$FLAVOR/" ulex.scm.template > ulex.scm
sed -e "s/FLAVOR/$FLAVOR/" dbmgrmod.scm.template > dbmgrmod.scm
|