-
Notifications
You must be signed in to change notification settings - Fork 23
Expand file tree
/
Copy pathbuild_robodoc.sh
More file actions
executable file
·72 lines (63 loc) · 1.7 KB
/
build_robodoc.sh
File metadata and controls
executable file
·72 lines (63 loc) · 1.7 KB
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
#
# Use this file to build ROBODoc when you used git clone to
# get the ROBODoc sources
#
# You can also use it to recreate all autoconfig files from
# the official source release.
#
# If a ./build_robodoc.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
# autoreconf calls all needed autotools
# -f consider all autotool files obsolete
# -i copy missing auxiliary files
automake
autoreconf -f -i
# 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
# Adding -Werror makes the test for snprintf fail! Bug in autoconfig?
# CFLAGS="-g -Wall -Werror -O0 -Wshadow -Wredundant-decls" ./configure
#
CFLAGS="-g -Wall -O0 -Wshadow -Wredundant-decls" ./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