configure

Sun, 03 Nov 2024 19:36:21 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 03 Nov 2024 19:36:21 +0100
changeset 982
7a88b8a05ae1
parent 979
bbae1ebf309b
child 987
53e22f112b11
permissions
-rwxr-xr-x

add -c flag to ARFLAGS to suppress diagnostic message on stderr

753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
1 #!/bin/sh
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
2
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
3
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
4 # some utility functions
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
5 isplatform()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
6 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
7 for p in $PLATFORM
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
8 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
9 if [ "$p" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
10 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
11 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
12 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
13 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
14 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
15 notisplatform()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
16 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
17 for p in $PLATFORM
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
18 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
19 if [ "$p" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
20 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
21 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
22 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
23 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
24 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
25 istoolchain()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
26 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
27 for t in $TOOLCHAIN
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
28 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
29 if [ "$t" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
30 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
31 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
32 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
33 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
34 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
35 notistoolchain()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
36 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
37 for t in $TOOLCHAIN
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
38 do
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
39 if [ "$t" = "$1" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
40 return 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
41 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
42 done
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
43 return 0
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
44 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
45
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
46 # clean abort
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
47 abort_configure()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
48 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
49 rm -Rf "$TEMP_DIR"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
50 exit 1
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
51 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
52
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
53 # Test for availability of pkg-config
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
54 PKG_CONFIG=`command -v pkg-config`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
55 : ${PKG_CONFIG:="false"}
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
56
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
57 # Simple uname based platform detection
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
58 # $PLATFORM is used for platform dependent dependency selection
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
59 OS=`uname -s`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
60 OS_VERSION=`uname -r`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
61 printf "detect platform... "
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
62 if [ "$OS" = "SunOS" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
63 PLATFORM="solaris sunos unix svr4"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
64 elif [ "$OS" = "Linux" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
65 PLATFORM="linux unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
66 elif [ "$OS" = "FreeBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
67 PLATFORM="freebsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
68 elif [ "$OS" = "OpenBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
69 PLATFORM="openbsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
70 elif [ "$OS" = "NetBSD" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
71 PLATFORM="netbsd bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
72 elif [ "$OS" = "Darwin" ]; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
73 PLATFORM="macos osx bsd unix"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
74 elif echo "$OS" | grep -i "MINGW" > /dev/null; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
75 PLATFORM="windows mingw"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
76 fi
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
77 : ${PLATFORM:="unix"}
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
78
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
79 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
80 echo "$PLATFORM_NAME"
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
81
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
82
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
83 # help text
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
84 printhelp()
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
85 {
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
86 echo "Usage: $0 [OPTIONS]..."
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
87 cat << __EOF__
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
88 Installation directories:
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
89 --prefix=PREFIX path prefix for architecture-independent files
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
90 [$prefix]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
91 --exec-prefix=EPREFIX path prefix for architecture-dependent files
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
92 [PREFIX]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
93
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
94 --bindir=DIR user executables [EPREFIX/bin]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
95 --sbindir=DIR system admin executables [EPREFIX/sbin]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
96 --libexecdir=DIR program executables [EPREFIX/libexec]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
97 --sysconfdir=DIR system configuration files [PREFIX/etc]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
98 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
99 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
100 --runstatedir=DIR run-time variable data [LOCALSTATEDIR/run]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
101 --libdir=DIR object code libraries [EPREFIX/lib]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
102 --includedir=DIR C header files [PREFIX/include]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
103 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
104 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
105 --infodir=DIR info documentation [DATAROOTDIR/info]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
106 --mandir=DIR man documentation [DATAROOTDIR/man]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
107 --localedir=DIR locale-dependent data [DATAROOTDIR/locale]
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
108
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
109 Options:
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
110 --debug add extra compile flags for debug builds
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
111 --release add extra compile flags for release builds
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
112 --with-docs=(all|html|api|none)
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
113
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
114 Optional Features:
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
115 --enable-coverage
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
116
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
117 __EOF__
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
118 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
119
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
120 # create temporary directory
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 TEMP_DIR=".tmp-`uname -n`"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 rm -Rf "$TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 if mkdir -p "$TEMP_DIR"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 echo "Cannot create tmp dir $TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 echo "Abort"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
128 exit 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 touch "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 touch "$TEMP_DIR/features"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133 # define standard variables
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 # also define standard prefix (this is where we will search for config.site)
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 prefix=/usr
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
136 exec_prefix=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 bindir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 sbindir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 libdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 libexecdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 datarootdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 datadir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 sysconfdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 sharedstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 localstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 runstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 includedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 infodir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 localedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 mandir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152 # custom variables
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
153 if true \
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
154 ; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
155 src_dir=`pwd`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
156 DOXYGEN=`command -v doxygen`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
157 PANDOC=`command -v pandoc`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
158 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
159
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160 # features
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
162 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163 # parse arguments
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
164 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
165 BUILD_TYPE="default"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 for ARG in "$@"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 case "$ARG" in
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 "--prefix="*) prefix=${ARG#--prefix=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 "--exec-prefix="*) exec_prefix=${ARG#--exec-prefix=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 "--bindir="*) bindir=${ARG#----bindir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 "--sbindir="*) sbindir=${ARG#--sbindir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 "--libdir="*) libdir=${ARG#--libdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 "--datadir="*) datadir=${ARG#--datadir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180 "--includedir="*) includedir=${ARG#--includedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 "--infodir="*) infodir=${ARG#--infodir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 "--mandir"*) mandir=${ARG#--mandir} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
183 "--localedir"*) localedir=${ARG#--localedir} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
184 "--help"*) printhelp; abort_configure ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
185 "--debug") BUILD_TYPE="debug" ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
186 "--release") BUILD_TYPE="release" ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
187 "--with-docs="*) OPT_WITH_DOCS=${ARG#--with-docs=} ;;
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
188 "--enable-coverage") FEATURE_COVERAGE=on ;;
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
189 "--disable-coverage") unset FEATURE_COVERAGE ;;
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
190 "-"*) echo "unknown option: $ARG"; abort_configure ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
191 esac
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
192 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
193
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
194
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
195
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
196 # set defaults for dir variables
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197 : ${exec_prefix:="$prefix"}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198 : ${bindir:='${exec_prefix}/bin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
199 : ${sbindir:='${exec_prefix}/sbin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
200 : ${libdir:='${exec_prefix}/lib'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
201 : ${libexecdir:='${exec_prefix}/libexec'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
202 : ${datarootdir:='${prefix}/share'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
203 : ${datadir:='${datarootdir}'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
204 : ${sysconfdir:='${prefix}/etc'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
205 : ${sharedstatedir:='${prefix}/com'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
206 : ${localstatedir:='${prefix}/var'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
207 : ${runstatedir:='${localstatedir}/run'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
208 : ${includedir:='${prefix}/include'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
209 : ${infodir:='${datarootdir}/info'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
210 : ${mandir:='${datarootdir}/man'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
211 : ${localedir:='${datarootdir}/locale'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
212
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
213 # check if a config.site exists and load it
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
214 if [ -n "$CONFIG_SITE" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
215 # CONFIG_SITE may contain space separated file names
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216 for cs in $CONFIG_SITE; do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217 printf "loading defaults from $cs... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
218 . "$cs"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 echo ok
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
220 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 elif [ -f "$prefix/share/config.site" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 printf "loading site defaults... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 . "$prefix/share/config.site"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 echo ok
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 elif [ -f "$prefix/etc/config.site" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
226 printf "loading site defaults... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 . "$prefix/etc/config.site"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228 echo ok
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 # generate vars.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233 cat > "$TEMP_DIR/vars.mk" << __EOF__
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
234 prefix=$prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
235 exec_prefix=$exec_prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
236 bindir=$bindir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
237 sbindir=$sbindir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
238 libdir=$libdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
239 libexecdir=$libexecdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
240 datarootdir=$datarootdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
241 datadir=$datadir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
242 sysconfdir=$sysconfdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
243 sharedstatedir=$sharedstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
244 localstatedir=$localstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
245 runstatedir=$runstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
246 includedir=$includedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
247 infodir=$infodir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
248 mandir=$mandir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
249 localedir=$localedir
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
250 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
251
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
252 # toolchain detection utilities
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
253 . make/toolchain.sh
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
255 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256 # DEPENDENCIES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
259 # check languages
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 lang_c=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 lang_cpp=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262 if detect_c_compiler ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 lang_c=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266 # create buffer for make variables required by dependencies
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 echo > "$TEMP_DIR/make.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269 test_pkg_config()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
271 if "$PKG_CONFIG" --exists "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
276 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
277 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
278 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
280 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
282 print_check_msg()
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
283 {
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
284 if [ -z "$1" ]; then
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
285 shift
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
286 printf "$@"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
287 fi
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
288 }
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
289
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
290 dependency_error_coverage()
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
291 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
292 print_check_msg "$dep_checked_coverage" "checking for coverage... "
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
293 # dependency coverage toolchain="gcc"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
294 while true
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
295 do
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
296 if notistoolchain "gcc"; then
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
297 break
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
298 fi
788
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
299 TEMP_CFLAGS="$TEMP_CFLAGS \${COVERAGE_CFLAGS}"
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
300 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
301 print_check_msg "$dep_checked_coverage" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
302 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
303 return 1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
304 done
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
305
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
306 print_check_msg "$dep_checked_coverage" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
307 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
308 return 0
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
309 }
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
310 dependency_error_pandoc()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
312 print_check_msg "$dep_checked_pandoc" "checking for pandoc... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 # dependency pandoc
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 if test -n "$PANDOC" > /dev/null ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 fi
979
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
321 cat >> $TEMP_DIR/make.mk << __EOF__
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
322 # Dependency: pandoc
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
323 PANDOC=$PANDOC
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
324 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
325 print_check_msg "$dep_checked_pandoc" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
326 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
328 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
329
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
330 print_check_msg "$dep_checked_pandoc" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
331 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 dependency_error_c()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
336 print_check_msg "$dep_checked_c" "checking for c... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 # dependency c platform="mingw"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 if notisplatform "mingw"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
347 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
348 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
349 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
350 STLIB_EXT=.lib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
351 SHLIB_EXT=.dll
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
353 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
354 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
355 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
356 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
357
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
358 # dependency c platform="macos"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
359 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
360 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
361 if notisplatform "macos"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
369 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 STLIB_EXT=.a
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 SHLIB_EXT=.dylib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
374 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
375 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
379 # dependency c platform="unix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
380 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
381 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 if notisplatform "unix"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
390 AR=ar
982
7a88b8a05ae1 add -c flag to ARFLAGS to suppress diagnostic message on stderr
Mike Becker <universe@uap-core.de>
parents: 979
diff changeset
391 ARFLAGS=cr
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
392 STLIB_EXT=.a
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
393 SHLIB_EXT=.so
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
395 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
396 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
399
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
400 print_check_msg "$dep_checked_c" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
401 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
404 dependency_error_file_tools()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 {
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
406 print_check_msg "$dep_checked_file_tools" "checking for file_tools... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 # dependency file-tools
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
410 cat >> $TEMP_DIR/make.mk << __EOF__
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
411 # Dependency: file_tools
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
412 MKDIR=/bin/mkdir -p
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
413 RMFILE=/bin/rm -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
414 RMDIR=/bin/rm -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
415 COPYFILE=/bin/cp -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
416 COPYALL=/bin/cp -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
417 SYMLINK=/bin/ln -s
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
418 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
419 print_check_msg "$dep_checked_file_tools" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
420 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
421 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
423
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
424 print_check_msg "$dep_checked_file_tools" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
425 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
428 dependency_error_doxygen()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
429 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
430 print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
431 # dependency doxygen
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
434 if test -n "$DOXYGEN" > /dev/null ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
435 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438 fi
979
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
439 cat >> $TEMP_DIR/make.mk << __EOF__
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
440 # Dependency: doxygen
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
441 DOXYGEN=$DOXYGEN
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
442 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
443 print_check_msg "$dep_checked_doxygen" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
444 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
445 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
446 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
448 print_check_msg "$dep_checked_doxygen" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
449 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
452
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
453 # start collecting dependency information
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 echo > "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
455
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 DEPENDENCIES_FAILED=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458 # unnamed dependencies
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
464 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
467 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
468 # library version
759
475335643af4 increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents: 757
diff changeset
469 VERSION=3.1.0
825
3f324ea53152 be honest at least in the lib version
Mike Becker <universe@uap-core.de>
parents: 821
diff changeset
470 LIBVERSION=5.0.0
3f324ea53152 be honest at least in the lib version
Mike Becker <universe@uap-core.de>
parents: 821
diff changeset
471 LIBVERSION_MAJOR=5
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
472
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
473 # build directory structure !! do not change or override !!
979
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
474 src_dir=${src_dir}
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
475 build_dir=${src_dir}/build
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
476 docs_dir=${src_dir}/build/docs
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
477 dist_dir=${src_dir}/dist
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
478 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
479 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
480 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
481 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 done
842
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
483 while true
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
484 do
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
485 if notisplatform "solaris"; then
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
486 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
487 fi
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
488 while true
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
489 do
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
490
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
491 TEMP_LDFLAGS="$TEMP_LDFLAGS -lm"
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
492 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
493 done
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
494 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
495 done
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
497 # add general dependency flags to flags.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
498 echo "# general flags" >> "$TEMP_DIR/flags.mk"
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
499 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
500 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
502 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
503 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
510 # OPTION VALUES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
511 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 checkopt_with_docs_all()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
514 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
519 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
520 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
521 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
522 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
523 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
524 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
525 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
527 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 checkopt_with_docs_html()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
537 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 checkopt_with_docs_api()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
552 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
553 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
554 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
557 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
558 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
561 checkopt_with_docs_none()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
562 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
563 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
564 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
565 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 # TARGETS
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 echo >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 echo "configuring global target"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
578 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
579 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 if dependency_error_c; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED c "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 if dependency_error_file_tools; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
587 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
588 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
589
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 # Features
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
591 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
592 # check dependency
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
593 if dependency_error_coverage ; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
594 # "auto" features can fail and are just disabled in this case
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
595 if [ "$FEATURE_COVERAGE" = "auto" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
596 DISABLE_FEATURE_COVERAGE=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
597 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
598 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage "
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
599 ERROR=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
600 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
601 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
602 if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
603 unset FEATURE_COVERAGE
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
604 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
605 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
606
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607 # Option: --with-docs
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 if [ -z "$OPT_WITH_DOCS" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
609 echo "auto-detecting option 'with-docs'"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
610 SAVED_ERROR="$ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
614 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
615 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
616 echo " with-docs: all" >> "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
617 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
619 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
620 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
621 echo " with-docs: html" >> "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
622 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
623 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
624 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
625 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
626 echo " with-docs: api" >> "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
629 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
630 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
631 echo " with-docs: none" >> "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
633 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
637 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
638 SAVED_ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
639 SAVED_DEPENDENCIES_FAILED="option 'with-docs' $SAVED_DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
640 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
641 ERROR="$SAVED_ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
643 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
644 echo "checking option with-docs = $OPT_WITH_DOCS"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
645 if false; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
646 false
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
647 elif [ "$OPT_WITH_DOCS" = "all" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
648 echo " with-docs: $OPT_WITH_DOCS" >> $TEMP_DIR/options
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
649 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
651 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
653 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
654 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
655 elif [ "$OPT_WITH_DOCS" = "html" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
656 echo " with-docs: $OPT_WITH_DOCS" >> $TEMP_DIR/options
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
657 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
658 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
659 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
660 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
661 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
662 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
663 elif [ "$OPT_WITH_DOCS" = "api" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
664 echo " with-docs: $OPT_WITH_DOCS" >> $TEMP_DIR/options
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
665 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
666 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
668 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
669 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
670 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671 elif [ "$OPT_WITH_DOCS" = "none" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 echo " with-docs: $OPT_WITH_DOCS" >> $TEMP_DIR/options
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
675 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 DEPENDENCIES_FAILED="option 'with-docs' $DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
678 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
679 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
680 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
681
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
682 if [ -n "${TEMP_CFLAGS}" ] && [ -n "$lang_c" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
683 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
684 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
685 if [ -n "${TEMP_CXXFLAGS}" ] && [ -n "$lang_cpp" ]; then
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
686 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
687 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
688 if [ "$BUILD_TYPE" = "debug" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
689 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
690 echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
691 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
692 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
693 echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
694 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
695 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
696 if [ "$BUILD_TYPE" = "release" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
697 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
698 echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
699 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
700 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
701 echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
702 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
703 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
704 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
705 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
706 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
707
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
708
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
709 # final result
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
710 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
711 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
712 echo "Error: Unresolved dependencies"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
713 echo "$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
714 abort_configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
715 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
716
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
717 echo "configure finished"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
718 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
719 echo "Build Config:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
720 echo " PREFIX: $prefix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
721 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
722 echo "Options:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
723 cat "$TEMP_DIR/options"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
724 echo "Features:"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
725 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
726 echo " coverage: on"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
727 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
728 echo " coverage: off"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
729 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
730 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
731
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
732 # generate the config.mk file
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
733 cat > "$TEMP_DIR/config.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
734 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
735 # config.mk generated by configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
736 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
737
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
738 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
739 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
740 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
741 rm -Rf "$TEMP_DIR"

mercurial