build.sh 13.3 KB
Newer Older
Oliver Bock's avatar
Oliver Bock committed
1
#!/bin/bash
Oliver Bock's avatar
Oliver Bock committed
2

Oliver Bock's avatar
Oliver Bock committed
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
###########################################################################
#   Copyright (C) 2008 by Oliver Bock                                     #
#   oliver.bock[AT]aei.mpg.de                                             #
#                                                                         #
#   This file is part of Einstein@Home.                                   #
#                                                                         #
#   Einstein@Home is free software: you can redistribute it and/or modify #
#   it under the terms of the GNU General Public License as published     #
#   by the Free Software Foundation, version 2 of the License.            #
#                                                                         #
#   Einstein@Home is distributed in the hope that it will be useful,      #
#   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 Einstein@Home. If not, see <http://www.gnu.org/licenses/>. #
#                                                                         #
###########################################################################

### TODOs #################################################################

# more refactoring (every lib in dedicated function? per traget?)

Oliver Bock's avatar
Oliver Bock committed
27
28
29
### globals ###############################################################

ROOT=`pwd`
30
LOGFILE=$ROOT/build.log
Oliver Bock's avatar
Oliver Bock committed
31
32
TARGET=0

Oliver Bock's avatar
Oliver Bock committed
33
### functions #############################################################
Oliver Bock's avatar
Oliver Bock committed
34

Oliver Bock's avatar
Oliver Bock committed
35
36
failure()
{
37
38
39
	echo "************************************" | tee -a $LOGFILE
	echo "Error detected! Stopping build!" | tee -a $LOGFILE
	echo "`date`" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
40
41
42
43
44
45

    if [ -f "$LOGFILE" ]; then
		echo "------------------------------------"
		echo "Please check logfile: `basename $LOGFILE`"
		echo "These are the final ten lines:"
		echo "------------------------------------"
46
		tail -n 14 $LOGFILE | head -n 10 -
Oliver Bock's avatar
Oliver Bock committed
47
48
49
50
51
52
53
    fi

	echo "************************************" | tee -a $LOGFILE

    exit 1
}

Oliver Bock's avatar
Oliver Bock committed
54
55
check_prerequisites()
{
56
	echo "Checking prerequisites..." | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
57
58
59
60
61
62
	
	# required toolchain
	TOOLS="automake autoconf m4 cmake wget gcc g++ ld libtool ar lex yacc"

	for tool in $TOOLS; do
		if ! ( type $tool >/dev/null 2>&1 ); then
63
			echo "Missing \"$tool\" which is a required tool!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
64
65
66
67
68
			return 1
		fi
	done

	return 0
Oliver Bock's avatar
Oliver Bock committed
69
70
71
}


72
prepare_source_tree()
Oliver Bock's avatar
Oliver Bock committed
73
{
Oliver Bock's avatar
Oliver Bock committed
74
	echo "Preparing source tree..." | tee -a $LOGFILE
75
76
77
78
79
80
81
82
83
	mkdir -p 3rdparty/oglft >> $LOGFILE || failure
	mkdir -p 3rdparty/boinc >> $LOGFILE || failure

	return 0
}


prepare_build_tree()
{
Oliver Bock's avatar
Oliver Bock committed
84
	echo "Preparing build tree..." | tee -a $LOGFILE
85
86
87
88
89
90
91
92
93
94
95
96
97
98
	mkdir -p build/sdl >> $LOGFILE || failure
	mkdir -p build/freetype2 >> $LOGFILE || failure
	mkdir -p build/oglft >> $LOGFILE || failure
	mkdir -p build/boinc >> $LOGFILE || failure
	mkdir -p build/framework >> $LOGFILE || failure
	mkdir -p build/orc >> $LOGFILE || failure
	mkdir -p build/starsphere >> $LOGFILE || failure

	return 0
}


prepare_install_tree()
{
Oliver Bock's avatar
Oliver Bock committed
99
	echo "Preparing install tree..." | tee -a $LOGFILE
100
101
102
103
104
105
106
107
108
109
110
111
112
113
	mkdir -p install/bin >> $LOGFILE || failure
	mkdir -p install/include >> $LOGFILE || failure
	mkdir -p install/lib >> $LOGFILE || failure

	return 0
}


prepare_generic()
{
	prepare_source_tree || failure
	prepare_build_tree || failure
	prepare_install_tree || failure

Oliver Bock's avatar
Oliver Bock committed
114
	# prepare additional sources
115
116
117
118

	cd $ROOT || failure
	mkdir -p 3rdparty/sdl >> $LOGFILE 2>&1 || failure
	cd $ROOT/3rdparty/sdl || failure
Oliver Bock's avatar
Oliver Bock committed
119
	if [ -d .svn ]; then
120
121
122
123
		echo "Updating SDL..." | tee -a $LOGFIL
		# make sure local changes (patches) are reverted, hence also updated
		svn revert -R . >> $LOGFILE 2>&1 || failure
		svn update >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
124
	else
Oliver Bock's avatar
Oliver Bock committed
125
		echo "Retrieving SDL (this may take a while)..." | tee -a $LOGFILE
126
		svn checkout http://svn.libsdl.org/branches/SDL-1.2 . >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
127
	fi
Oliver Bock's avatar
Oliver Bock committed
128

129
# 	cd $ROOT/3rdparty || failure
Oliver Bock's avatar
Oliver Bock committed
130
# 	echo "Retrieving SDL (this may take a while)..." | tee -a $LOGFILE
131
132
133
134
135
136
# 	wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz >> $LOGFILE 2>&1 || failure
# 	tar -xzf SDL-1.2.14.tar.gz >> $LOGFILE 2>&1 || failure
# 	rm SDL-1.2.14.tar.gz >> $LOGFILE 2>&1 || failure
# 	substitute old source tree
# 	rm -rf sdl >> $LOGFILE 2>&1 || failure
# 	mv SDL-1.2.14 sdl >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
137
	
138
	cd $ROOT/3rdparty || failure
Oliver Bock's avatar
Oliver Bock committed
139
	echo "Retrieving Freetype2 (this may take a while)..." | tee -a $LOGFILE
140
141
142
143
144
145
	wget http://mesh.dl.sourceforge.net/sourceforge/freetype/freetype-2.3.5.tar.bz2 >> $LOGFILE 2>&1 || failure
	tar -xjf freetype-2.3.5.tar.bz2 >> $LOGFILE 2>&1 || failure
	rm freetype-2.3.5.tar.bz2 >> $LOGFILE 2>&1 || failure
	# substitute old source tree
	rm -rf freetype2 >> $LOGFILE 2>&1 || failure
	mv freetype-2.3.5 freetype2 >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
146
	
147
	cd $ROOT/3rdparty/oglft || failure
Oliver Bock's avatar
Oliver Bock committed
148
	if [ -d .svn ]; then
Oliver Bock's avatar
Oliver Bock committed
149
		echo "Updating OGLFT..." | tee -a $LOGFILE
150
151
152
		# make sure local changes (patches) are reverted, hence also updated
		svn revert -R . >> $LOGFILE  2>&1 || failure
		svn update >> $LOGFILE  2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
153
	else
Oliver Bock's avatar
Oliver Bock committed
154
		echo "Retrieving OGLFT (this may take a while)..." | tee -a $LOGFILE
155
		svn checkout https://oglft.svn.sourceforge.net/svnroot/oglft/trunk . >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
156
157
	fi
	
158
	cd $ROOT/3rdparty/boinc || failure
Oliver Bock's avatar
Oliver Bock committed
159
	if [ -d .svn ]; then
Oliver Bock's avatar
Oliver Bock committed
160
		echo "Updating BOINC..." | tee -a $LOGFILE
161
162
163
		# make sure local changes (patches) are reverted, hence also updated
		svn revert -R . >> $LOGFILE  2>&1 || failure
		svn update >> $LOGFILE  2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
164
	else
Oliver Bock's avatar
Oliver Bock committed
165
		echo "Retrieving BOINC (this may take a while)..." | tee -a $LOGFILE
166
		svn checkout http://boinc.berkeley.edu/svn/trunk/boinc . >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
167
	fi
Oliver Bock's avatar
Oliver Bock committed
168
169

	return 0
Oliver Bock's avatar
Oliver Bock committed
170
171
172
173
174
}


prepare_win32()
{
175
	cd $ROOT || failure
Oliver Bock's avatar
Oliver Bock committed
176

Oliver Bock's avatar
Oliver Bock committed
177
	echo "Preparing MinGW source tree..." | tee -a $LOGFILE
178
179
	mkdir -p 3rdparty/mingw/xscripts >> $LOGFILE || failure
	cd 3rdparty/mingw/xscripts || failure
Oliver Bock's avatar
Oliver Bock committed
180
181

	if [ -d CVS ]; then
Oliver Bock's avatar
Oliver Bock committed
182
		echo "Updating MinGW build script..." | tee -a $LOGFILE
183
		cvs update -C >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
184
	else
185
		cd .. || failure
Oliver Bock's avatar
Oliver Bock committed
186
		echo "Retrieving MinGW build script (this may take a while)..." | tee -a $LOGFILE
187
		cvs -z3 -d:pserver:anonymous@mingw.cvs.sourceforge.net:/cvsroot/mingw checkout -P xscripts >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
188
189
	fi
	
190
	cd $ROOT/3rdparty/mingw/xscripts || failure
Oliver Bock's avatar
Oliver Bock committed
191
	echo "Preparing MinGW build script..." | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
192
	# note: svn has no force/overwrite switch. the file might not be updated when patched
193
194
	patch x86-mingw32-build.sh.conf < $ROOT/patches/x86-mingw32-build.sh.conf.patch >> $LOGFILE || failure
	chmod +x x86-mingw32-build.sh >> $LOGFILE || failure
Oliver Bock's avatar
Oliver Bock committed
195
196

	return 0
Oliver Bock's avatar
Oliver Bock committed
197
198
199
200
201
}


build_generic()
{
202
	cd $ROOT/3rdparty/sdl || failure
Oliver Bock's avatar
Oliver Bock committed
203
	echo "Building SDL (this may take a while)..." | tee -a $LOGFILE
204
205
206
207
208
	./autogen.sh >> $LOGFILE 2>&1 || failure
	cd $ROOT/build/sdl || failure
	$ROOT/3rdparty/sdl/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
209
	echo "Successfully built and installed SDL!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
210

211
	cd $ROOT/3rdparty/freetype2 || failure
Oliver Bock's avatar
Oliver Bock committed
212
	echo "Building Freetype2 (this may take a while)..." | tee -a $LOGFILE
213
214
215
216
	chmod +x autogen.sh >> $LOGFILE 2>&1 || failure
	chmod +x configure >> $LOGFILE 2>&1 || failure
	./autogen.sh >> $LOGFILE 2>&1 || failure
	cd $ROOT/build/freetype2 || failure
Oliver Bock's avatar
Oliver Bock committed
217
	# note: freetype (or sdl?) probably doesn't need *no* configure when static -> ansi build, see readme!
218
219
220
	$ROOT/3rdparty/freetype2/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
221
	echo "Successfully built and installed Freetype2!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
222

223
	cd $ROOT/3rdparty/oglft || failure
Oliver Bock's avatar
Oliver Bock committed
224
225
226
227
228
	echo "Patching OGLFT..." | tee -a $LOGFILE
	# note: svn has no force/overwrite switch. patched files might not be updated
	# patch: use fixed settings for freetype, deactivate FindFreetype
	FREETYPE2_INCLUDE_DIR="$ROOT/install/include"
	FREETYPE2_LIBRARIES="$ROOT/install/lib/liboglft.a"
229
	patch CMakeLists.txt < $ROOT/patches/CMakeLists.txt.oglft.patch >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
230
	# patch: build static lib instead of shared
231
232
	cd $ROOT/3rdparty/oglft/liboglft || failure
	patch CMakeLists.txt < $ROOT/patches/CMakeLists.txt.liboglft.patch >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
233
	echo "Building OGLFT..." | tee -a $LOGFILE
234
235
236
237
238
239
	cd $ROOT/build/oglft || failure
	cmake -DFREETYPE2_INCLUDE_DIR="$FREETYPE2_INCLUDE_DIR" -DFREETYPE2_LIBRARIES="$FREETYPE2_LIBRARIES" $ROOT/3rdparty/oglft >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	mkdir -p $ROOT/install/include/oglft >> $LOGFILE 2>&1 || failure
	cp OGLFT.h $ROOT/install/include/oglft >> $LOGFILE 2>&1 || failure
	cp liboglft/liboglft.a $ROOT/install/lib >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
240
	echo "Successfully built and installed OGLFT!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
241

242
	cd $ROOT/3rdparty/boinc || failure
Oliver Bock's avatar
Oliver Bock committed
243
	echo "Building BOINC (this may take a while)..." | tee -a $LOGFILE
244
245
246
247
248
	./_autosetup >> $LOGFILE 2>&1 || failure
	cd $ROOT/build/boinc || failure
	$ROOT/3rdparty/boinc/configure --prefix=$ROOT/install --enable-shared=no --enable-static=yes --disable-server --disable-client >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
249
	echo "Successfully built and installed BOINC!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
250
251

	return 0
Oliver Bock's avatar
Oliver Bock committed
252
253
}

Oliver Bock's avatar
Oliver Bock committed
254

Oliver Bock's avatar
Oliver Bock committed
255
256
257
build_mingw()
{
	echo "Not yet implemented: build_mingw()"
Oliver Bock's avatar
Oliver Bock committed
258
259

	return 0
Oliver Bock's avatar
Oliver Bock committed
260
261
}

Oliver Bock's avatar
Oliver Bock committed
262

Oliver Bock's avatar
Oliver Bock committed
263
264
build_starsphere()
{
Oliver Bock's avatar
Oliver Bock committed
265
	echo "Building Starsphere [ORC]..." | tee -a $LOGFILE
266
267
268
269
270
271
	export ORC_SRC=$ROOT/src/orc || failure
	export ORC_INSTALL=$ROOT/install || failure
	cd $ROOT/build/orc || failure
	cp $ROOT/src/orc/Makefile . >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
272
	echo "Successfully built and installed Starsphere [ORC]!" | tee -a $LOGFILE
273

Oliver Bock's avatar
Oliver Bock committed
274
	echo "Building Starsphere [Framework]..." | tee -a $LOGFILE
275
276
277
278
279
280
	export FRAMEWORK_SRC=$ROOT/src/framework || failure
	export FRAMEWORK_INSTALL=$ROOT/install || failure
	cd $ROOT/build/framework || failure
	cp $ROOT/src/framework/Makefile . >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
281
	echo "Successfully built and installed Starsphere [Framework]!" | tee -a $LOGFILE
282

Oliver Bock's avatar
Oliver Bock committed
283
	echo "Building Starsphere [Application]..." | tee -a $LOGFILE
284
285
286
287
288
289
290
	export STARSPHERE_SRC=$ROOT/src/starsphere || failure
	export STARSPHERE_INSTALL=$ROOT/install || failure
	cd $ROOT/build/starsphere || failure
	cp $ROOT/src/starsphere/Makefile . >> $LOGFILE 2>&1 || failure
	cp $ROOT/src/starsphere/*.res . >> $LOGFILE 2>&1 || failure
	make >> $LOGFILE 2>&1 || failure
	make install >> $LOGFILE 2>&1 || failure
Oliver Bock's avatar
Oliver Bock committed
291
	echo "Successfully built and installed Starsphere [Application]!" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
292
293

	return 0
Oliver Bock's avatar
Oliver Bock committed
294
}
Oliver Bock's avatar
Oliver Bock committed
295

Oliver Bock's avatar
Oliver Bock committed
296

Oliver Bock's avatar
Oliver Bock committed
297
298
build_linux()
{
299
300
	build_generic || failure
	build_starsphere || failure
Oliver Bock's avatar
Oliver Bock committed
301
302

	return 0
Oliver Bock's avatar
Oliver Bock committed
303
304
305
306
307
}


build_mac()
{
Oliver Bock's avatar
Oliver Bock committed
308
309
310
311
312
313
	echo "Not yet implemented: build_mac()"

# 	build_generic
# 	build_starsphere

	return 0
Oliver Bock's avatar
Oliver Bock committed
314
315
316
317
318
}


build_win32()
{
Oliver Bock's avatar
Oliver Bock committed
319
320
321
322
323
324
325
	echo "Not yet implemented: build_win32()"

# 	build_mingw
# 	build_generic
# 	build_starsphere

	return 0
Oliver Bock's avatar
Oliver Bock committed
326
327
328
}


Oliver Bock's avatar
Oliver Bock committed
329
330
distclean()
{
331
332
333
	cd $ROOT || failure

	echo "Purging build system..." | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
334

335
336
337
	rm -rf 3rdparty || failure
	rm -rf build || failure
	rm -rf install || failure
Oliver Bock's avatar
Oliver Bock committed
338

339
	rm -f .lastbuild || failure
Oliver Bock's avatar
Oliver Bock committed
340
341
342
}


Oliver Bock's avatar
Oliver Bock committed
343
344
check_last_build()
{
345
346
	echo "Checking previous build target..." | tee -a $LOGFILE

Oliver Bock's avatar
Oliver Bock committed
347
	LASTBUILD=`cat .lastbuild 2>/dev/null`
Oliver Bock's avatar
Oliver Bock committed
348

Oliver Bock's avatar
Oliver Bock committed
349
	if [[ ( -f .lastbuild ) && ( "$LASTBUILD" != "$1" ) ]]; then
350
351
352
353
		cd $ROOT || failure
		echo "Build target changed! Purging build and install trees..." | tee -a $LOGFILE
		rm -rf build >> $LOGFILE || failure
		rm -rf install >> $LOGFILE || failure
Oliver Bock's avatar
Oliver Bock committed
354
355
	fi

356
	echo "$1" > .lastbuild || failure
Oliver Bock's avatar
Oliver Bock committed
357
358

	return 0
Oliver Bock's avatar
Oliver Bock committed
359
360
}

Oliver Bock's avatar
Oliver Bock committed
361

Oliver Bock's avatar
Oliver Bock committed
362
363
364
365
366
367
368
369
370
371
372
373
374
print_usage()
{
	cd $ROOT

	echo "*************************"
	echo "Usage: `basename $0` <target>"
	echo
	echo "Available targets:"
	echo "  --linux"
	echo "  --mac"
	echo "  --win32"
	echo "*************************"

Oliver Bock's avatar
Oliver Bock committed
375
	echo "Wrong usage. Stopping!" >> $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
376
377

	return 0
Oliver Bock's avatar
Oliver Bock committed
378
379
380
}


Oliver Bock's avatar
Oliver Bock committed
381
### main control ##########################################################
Oliver Bock's avatar
Oliver Bock committed
382
383
384
385
386

TARGET_LINUX=1
TARGET_MAC=2
TARGET_WIN32=3

387
388
389
390
echo "************************************" | tee -a $LOGFILE
echo "Starting new build!" | tee -a $LOGFILE
echo "`date`" | tee -a $LOGFILE
echo "************************************" | tee -a $LOGFILE
391

Oliver Bock's avatar
Oliver Bock committed
392
# crude command line parsing :-)
393

Oliver Bock's avatar
Oliver Bock committed
394
395
396
if [ $# -ne 1 ]; then
  print_usage
  exit 1
397
398
fi

Oliver Bock's avatar
Oliver Bock committed
399
400
401
case "$1" in
	"--linux")
		TARGET=$TARGET_LINUX
402
		check_last_build "$1" || failure
Oliver Bock's avatar
Oliver Bock committed
403
		echo "Building linux version:" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
404
405
406
		;;
	"--mac")
		TARGET=$TARGET_MAC
407
		check_last_build "$1" || failure
Oliver Bock's avatar
Oliver Bock committed
408
		echo "Building mac version:" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
409
410
		;;
	"--win32")
Oliver Bock's avatar
Oliver Bock committed
411
		TARGET=$TARGET_WIN32
412
		check_last_build "$1" || failure
Oliver Bock's avatar
Oliver Bock committed
413
		echo "Building win32 version:" | tee -a $LOGFILE
Oliver Bock's avatar
Oliver Bock committed
414
		;;
Oliver Bock's avatar
Oliver Bock committed
415
	"--distclean")
416
		distclean || failure
Oliver Bock's avatar
Oliver Bock committed
417
418
		exit 0
		;;
Oliver Bock's avatar
Oliver Bock committed
419
	*)
Oliver Bock's avatar
Oliver Bock committed
420
421
422
		print_usage
		exit 1
		;;
Oliver Bock's avatar
Oliver Bock committed
423
esac
424

Oliver Bock's avatar
Oliver Bock committed
425
# here we go...
426

427
428
check_prerequisites || failure
prepare_generic || failure
Oliver Bock's avatar
Oliver Bock committed
429

Oliver Bock's avatar
Oliver Bock committed
430
431
case $TARGET in
	$TARGET_LINUX)
432
		build_linux || failure
Oliver Bock's avatar
Oliver Bock committed
433
434
		;;
	$TARGET_MAC)
435
		build_mac || failure
Oliver Bock's avatar
Oliver Bock committed
436
437
		;;
	$TARGET_WIN32)
438
		build_win32 || failure
Oliver Bock's avatar
Oliver Bock committed
439
440
441
442
443
444
445
446
		;;
	*)
		# should be unreachable
		print_usage
		exit 1
		;;
esac

447
448
449
450
451
echo "************************************" | tee -a $LOGFILE
echo "Build finished successfully!" | tee -a $LOGFILE
echo "`date`" | tee -a $LOGFILE
echo "************************************" | tee -a $LOGFILE

Oliver Bock's avatar
Oliver Bock committed
452
exit 0