forked from gumpu/ROBODoc
-
Notifications
You must be signed in to change notification settings - Fork 0
/
do.sh
executable file
·72 lines (60 loc) · 1.61 KB
/
do.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
#!/bin/bash
# vi: ff=unix
# $Id: do.sh,v 1.22 2008/06/17 11:49:26 gumpu Exp $
# If a ./do.sh under cygwin gives
# : command not found
# : command not found
# : command not foundclocal
#
# Then this file has wrong line-endings (cr/lf).
# To fix it unzip the archive under cygwin with the
# option -a, so
# unzip -a robodoc-xx-xx-xx.zip
#
rm -f *~
rm -f makefile.in
rm -f *.tar.gz *.zip
rm -f *.log aclocal.m4 config.cache
rm -fr autom4te.cache
rm -f install-sh
rm -f mkinstalldirs
rm -f missing makefile
rm -f configure config.status
# Obsolete
#aclocal
#automake -a
#autoconf
# autoreconf does a better job, and calls all needed autotools
# -f consider all autotool files obsolete
# -i copy missing auxiliary files
autoreconf -f -i
# run configure to guess configuration
# CFLAGS="-g -Wall -DDMALLOC -DMALLOC_FUNC_CHECK" LDFLAGS="-ldmalloc" ./configure
# CFLAGS="-g -Wall -O0 -std=gnu99 -pedantic -Wshadow -Wbad-function-cast -Wconversion -Wredundant-decls" ./configure
CFLAGS="-g -Wall -O0 -std=gnu99 -pedantic -Wshadow -Wbad-function-cast -Wredundant-decls" ./configure
#CFLAGS="-g -Wall" ./configure
#./configure
# distcheck creates all distribution packages and does some sanity checks on it
make distcheck
# Make clean and recompile
make clean
make
# cross-compile if all tools are found
(cd Source && make -f makefile.plain xcompiler-test) > /dev/null 2>&1
if [ "$?" = "0" ] ; then
set -e
rm -fr ./tmp$$
cp -R ./Source ./tmp$$
cd ./tmp$$
make clean
make -f makefile.plain xcompile
cp -f *.zip ../
cd ..
rm -fr ./tmp$$
set +e
fi
# Mac OS X package
if [ "`uname`" = "Darwin" ] ; then
make -f rpm.mk osxpkg
fi
exit 0