-
Notifications
You must be signed in to change notification settings - Fork 6
/
buildall
executable file
·140 lines (120 loc) · 3.55 KB
/
buildall
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
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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
#!/bin/bash
# Set up environment to build and install CHiLL at Blue Waters
echo "This script needs to be customized before it is executed..."
exit
# Package directory ...
export PACKAGEDIR=/sw/sources/chill
# Directory to build in ...
export BUILDDIR=/u/sciteam/rwheeler/scratch
# Directory to install permanent files ...
export INSTALLDIR=/sw/xe/chill
# Install tools in seperate directories
export AUTOCONFINSTALLDIR=$INSTALLDIR/autoconf
export GCCINSTALLDIR=$INSTALLDIR/gcc
export BOOSTINSTALLDIR=$INSTALLDIR/boost
export ROSEINSTALLDIR=$INSTALLDIR/rose
# Packages already installed
export JAVA_HOME=/opt/java/jdk1.7.0_45
export PYTHON_INCDIR=/usr/include/python2.6
export PYTHON_LIBDIR=/usr/lib64
export PYTHON_VERSION=2.6
# Create toplevel build and installation directories if they do not already exist...
if false; then
mkdir -p $BUILDDIR
mkdir -p $INSTALLDIR
mkdir -p $INSTALLDIR/lib
mkdir -p $INSTALLDIR/lib64
mkdir -p $INSTALLDIR/bin
mkdir -p $AUTOCONFINSTALLDIR
mkdir -p $GCCINSTALLDIR
mkdir -p $BOOSTINSTALLDIR
mkdir -p $ROSEINSTALLDIR
fi
export PATH=$INSTALLDIR/bin:$PATH
#
# Unpack needed items into the build area
#
if false; then
cd $BUILDDIR
for dir in autoconf/autoconf-2.69 gcc/gcc-4.4.7 boost/boost_1_45_0 rose/edg4x-rose chill/chill-0.2.1; do
mkdir -p `dirname $dir`/build
echo checking for `basename $dir`
if [ ! -d $dir ]; then
echo unpacking tar file `basename $dir`.tar.gz
(cd `dirname $dir`; tar xzf $PACKAGEDIR/`basename $dir`.tar.gz)
fi
done
fi
#
# Configure and build autoconf
#
if false; then
echo Building autoconf
cd $BUILDDIR/autoconf/build
../autoconf-2.69/configure --prefix=$AUTOCONFINSTALLDIR
make -j`nproc`
make -j`nproc` install
fi
export PATH=$AUTOCONFINSTALLDIR/bin:$PATH
#
# Configure and build gcc
#
if false; then
echo Building gcc
cd $BUILDDIR/gcc/build
../gcc-4.4.7/configure --prefix=$GCCINSTALLDIR
make -j`nproc`
make -j`nproc` install
fi
export PATH=$GCCINSTALLDIR/bin:$PATH
export LD_LIBRARY_PATH=$GCCINSTALLDIR/lib64:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$GCCINSTALLDIR/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH
#
# Configure and build boost
#
if false; then
echo Building Boost
export BOOSTLIBSNEEDED=date_time,filesystem,program_options,regex,system,thread,wave,iostreams
cd $BUILDDIR/boost/boost_1_45_0
./bootstrap.sh --prefix=$BOOSTINSTALLDIR --with-libraries=$BOOSTLIBSNEEDED
./bjam install --prefix=$BOOSTINSTALLDIR --build-dir=../build
fi
export LD_LIBRARY_PATH=$BOOSTINSTALLDIR/lib:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$BOOSTINSTALLDIR/include:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH
#
# Configure and build rose
#
if false; then
echo Building Rose
cd $BUILDDIR/rose/build
../edg4x-rose/configure --prefix=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR
make -j`nproc`
make -j`nproc` install
fi
export LD_LIBRARY_PATH=$ROSEINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server:$LD_LIBRARY_PATH
export C_INCLUDE_PATH=$ROSEINSTALLDIR/include:$ROSEINSTALLDIR/include/rose:$C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH=$C_INCLUDE_PATH
#
# Configure and build chill
#
if false; then
echo Building CHiLL
cd $BUILDDIR/chill/chill-0.2.1
./configure --with-interface=python --prefix=$INSTALLDIR --with-rose=$ROSEINSTALLDIR --with-boost=$BOOSTINSTALLDIR
make -j`nproc`
make -j`nproc` install
fi
#
# Test CHiLL
#
if false; then
echo Testing CHiLL
cd $BUILDDIR/chill/chill-0.2.1/test-chill
./runtests
fi
echo Remember to set your paths to...
echo
echo 'export PATH=$PATH:'$INSTALLDIR/bin
echo 'export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:'$ROSEINSTALLDIR/lib:$BOOSTINSTALLDIR/lib:$JAVA_HOME/jre/lib/amd64/server