-
Notifications
You must be signed in to change notification settings - Fork 3
/
build.sh
executable file
·176 lines (148 loc) · 3.38 KB
/
build.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
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
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
#! /bin/bash
# stop on any error
set -e
# echo commands
set -x
# check out repositories
if [ ! -d simd_helpers ]; then
git clone https://github.com/kmsmith137/simd_helpers.git
fi
if [ ! -d sp_hdf5 ]; then
git clone https://github.com/kmsmith137/sp_hdf5.git
fi
if [ ! -d simpulse ]; then
git clone https://github.com/kmsmith137/simpulse.git
fi
if [ ! -d ch_frb_io ]; then
git clone https://github.com/CHIMEFRB/ch_frb_io.git
fi
if [ ! -d bonsai ]; then
git clone https://github.com/CHIMEFRB/bonsai.git
fi
if [ ! -d rf_pipelines ]; then
git clone https://github.com/kmsmith137/rf_pipelines.git
fi
if [ ! -d ch_frb_rfi ]; then
git clone https://github.com/mrafieir/ch_frb_rfi.git
fi
if [ ! -d ch_frb_l1 ]; then
git clone https://github.com/kmsmith137/ch_frb_l1
fi
if [ ! -d toy_network_codes ]; then
git clone https://github.com/kmsmith137/toy_network_codes
fi
# Setup remote branches -- HACKily
(cd simpulse;
git remote add dstn https://github.com/dstndstn/simpulse.git || true;
git fetch dstn;
git checkout --track -b travis dstn/travis || true;
)
(cd rf_pipelines;
git remote add dstn https://github.com/dstndstn/rf_pipelines.git || true;
git fetch dstn;
git checkout --track -b hf5conv-2+v15 dstn/hf5conv-2+v15 || true;
)
# Setup Makefile.local links
(cd simd_helpers;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.norootprivs Makefile.local;
fi
)
(cd simpulse;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.travis Makefile.local;
fi
)
(cd sp_hdf5;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.linux Makefile.local;
fi
)
(cd ch_frb_io;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.frb1 Makefile.local;
fi
)
(cd bonsai;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.frb1 Makefile.local;
fi
)
(cd rf_pipelines;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.travis Makefile.local;
fi
)
(cd ch_frb_rfi;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.frb1 Makefile.local;
fi
)
(cd ch_frb_l1;
if [ ! -e Makefile.local ]; then
ln -s site/Makefile.local.frb1 Makefile.local;
fi
)
# Set build variables
export INCDIR=~/include
export LIBDIR=~/lib
export BINDIR=~/bin
export PYDIR=~/lib/python2.7/site-packages
export PYTHON_INCDIR=/usr/include/python2.7
export NUMPY_INCDIR=/usr/lib64/python2.7/site-packages/numpy/core/include
# MSGPACK_INC_DIR
# ZMQ_INC_DIR
# ZMQ_LIB_DIR
# JSONCPP_INC_DIR
export JSONCPP_INCDIR=/usr/include/jsoncpp
export HAVE_PSRFITS=n
export HAVE_CH_FRB_IO=y
export HAVE_BONSAI=y
# Build!
(cd simd_helpers &&
git pull &&
git checkout v4_devel &&
make &&
make install
)
(cd simpulse &&
git pull &&
git checkout travis &&
make &&
make install
)
(cd sp_hdf5 &&
git pull &&
git checkout master &&
make &&
make install
)
(cd ch_frb_io &&
git pull &&
git checkout master &&
make &&
make install
)
(cd bonsai &&
git fetch &&
git checkout v10_devel &&
make &&
make install)
(cd rf_pipelines &&
git fetch &&
git checkout hf5conv-2+v15 &&
make &&
make install)
(cd ch_frb_rfi &&
git fetch &&
git checkout master &&
make install)
(cd ch_frb_l1 &&
git fetch &&
git checkout master &&
make)
(cd toy_network_codes &&
git fetch &&
git checkout master &&
make &&
make install)