Added options to make Robodoc more customizable.
[robodoc.git] / do.sh
1 #!/bin/bash
2 # vi: ff=unix spell
3 # $Id: do.sh,v 1.19 2007/02/06 23:25:34 gumpu Exp $
4
5 # If a ./do.sh under cygwin gives
6 #  : command not found
7 #  : command not found
8 #  : command not foundclocal
9 #
10 # Then this file has wrong line-endings (cr/lf).
11 # To fix it unzip the archive under cygwin with the
12 # option -a, so
13 #   unzip -a robodoc-xx-xx-xx.zip
14 #
15
16 rm -f *~
17 rm -f makefile.in
18 rm -f *.tar.gz *.zip
19 rm -f *.log aclocal.m4 config.cache
20 rm -fr autom4te.cache
21 rm -f install-sh
22 rm -f mkinstalldirs
23 rm -f missing makefile
24 rm -f configure config.status
25
26 aclocal
27 automake -a
28 autoconf
29 #CFLAGS="-g -Wall -DDMALLOC -DMALLOC_FUNC_CHECK" LDFLAGS="-ldmalloc" ./configure
30 #CFLAGS="-g -Wall -Wshadow -Wbad-function-cast -Wconversion -Wredundant-decls" ./configure
31 CFLAGS="-g -Wall" ./configure
32 make dist
33 make dist-zip
34 make clean
35 make
36
37 # cross-compile if all tools are found
38 (cd Source && make -f makefile.plain xcompiler-test) > /dev/null 2>&1
39 if [ "$?" = "0" ] ; then
40         set -e
41         rm -fr ./tmp$$
42         cp -R ./Source ./tmp$$
43         cd ./tmp$$
44         make -f makefile.plain xcompile
45         cp -f *.zip ../
46         cd ..
47         rm -fr ./tmp$$
48         set +e
49 fi
50
51 # Mac OS X package
52
53 if [ "`uname`" = "Darwin" ] ; then
54         make -f rpm.mk osxpkg
55 fi
56
57 exit 0