configure

Tue, 12 Nov 2024 17:34:04 +0100

author
Mike Becker <universe@uap-core.de>
date
Tue, 12 Nov 2024 17:34:04 +0100
changeset 987
53e22f112b11
parent 982
7a88b8a05ae1
permissions
-rwxr-xr-x

add configure option for szmul

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
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
116 --disable-szmul-builtin use custom implementation, instead
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
117
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
118 __EOF__
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
119 }
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
120
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
121 # create temporary directory
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
122 TEMP_DIR=".tmp-`uname -n`"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
123 rm -Rf "$TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
124 if mkdir -p "$TEMP_DIR"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
125 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
126 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
127 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
128 echo "Abort"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
129 exit 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
130 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
131 touch "$TEMP_DIR/options"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
132 touch "$TEMP_DIR/features"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
133
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
134 # define standard variables
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
135 # 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
136 prefix=/usr
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
137 exec_prefix=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
138 bindir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
139 sbindir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
140 libdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
141 libexecdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
142 datarootdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
143 datadir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
144 sysconfdir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
145 sharedstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
146 localstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
147 runstatedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
148 includedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
149 infodir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
150 localedir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
151 mandir=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
152
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
153 # custom variables
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
154 if true \
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
155 ; then
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
156 src_dir=`pwd`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
157 DOXYGEN=`command -v doxygen`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
158 PANDOC=`command -v pandoc`
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
159 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
160
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
161 # features
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
162 FEATURE_SZMUL_BUILTIN=auto
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
163
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 # parse arguments
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 BUILD_TYPE="default"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 for ARG in "$@"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 case "$ARG" in
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 "--prefix="*) prefix=${ARG#--prefix=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 "--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
173 "--bindir="*) bindir=${ARG#----bindir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 "--sbindir="*) sbindir=${ARG#--sbindir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 "--libdir="*) libdir=${ARG#--libdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 "--libexecdir="*) libexecdir=${ARG#--libexecdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
177 "--datarootdir="*) datarootdir=${ARG#--datarootdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
178 "--datadir="*) datadir=${ARG#--datadir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
179 "--sysconfdir="*) sysconfdir=${ARG#--sysconfdir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
180 "--sharedstatedir="*) sharedstatedir=${ARG#--sharedstatedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
181 "--localstatedir="*) localstatedir=${ARG#--localstatedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
182 "--includedir="*) includedir=${ARG#--includedir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
183 "--infodir="*) infodir=${ARG#--infodir=} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
184 "--mandir"*) mandir=${ARG#--mandir} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
185 "--localedir"*) localedir=${ARG#--localedir} ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
186 "--help"*) printhelp; abort_configure ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
187 "--debug") BUILD_TYPE="debug" ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
188 "--release") BUILD_TYPE="release" ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
189 "--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
190 "--enable-coverage") FEATURE_COVERAGE=on ;;
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
191 "--disable-coverage") unset FEATURE_COVERAGE ;;
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
192 "--enable-szmul-builtin") FEATURE_SZMUL_BUILTIN=on ;;
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
193 "--disable-szmul-builtin") unset FEATURE_SZMUL_BUILTIN ;;
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
194 "-"*) echo "unknown option: $ARG"; abort_configure ;;
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
195 esac
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
196 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
197
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
198
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
199
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
200 # set defaults for dir variables
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
201 : ${exec_prefix:="$prefix"}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
202 : ${bindir:='${exec_prefix}/bin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
203 : ${sbindir:='${exec_prefix}/sbin'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
204 : ${libdir:='${exec_prefix}/lib'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
205 : ${libexecdir:='${exec_prefix}/libexec'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
206 : ${datarootdir:='${prefix}/share'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
207 : ${datadir:='${datarootdir}'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
208 : ${sysconfdir:='${prefix}/etc'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
209 : ${sharedstatedir:='${prefix}/com'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
210 : ${localstatedir:='${prefix}/var'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
211 : ${runstatedir:='${localstatedir}/run'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
212 : ${includedir:='${prefix}/include'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
213 : ${infodir:='${datarootdir}/info'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
214 : ${mandir:='${datarootdir}/man'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
215 : ${localedir:='${datarootdir}/locale'}
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217 # 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
218 if [ -n "$CONFIG_SITE" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 # 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
220 for cs in $CONFIG_SITE; do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 printf "loading defaults from $cs... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 . "$cs"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 echo ok
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 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
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/share/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 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
230 printf "loading site defaults... "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231 . "$prefix/etc/config.site"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 echo ok
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
234
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
235
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 # generate vars.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 cat > "$TEMP_DIR/vars.mk" << __EOF__
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
238 prefix=$prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
239 exec_prefix=$exec_prefix
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
240 bindir=$bindir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
241 sbindir=$sbindir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
242 libdir=$libdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
243 libexecdir=$libexecdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
244 datarootdir=$datarootdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
245 datadir=$datadir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
246 sysconfdir=$sysconfdir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
247 sharedstatedir=$sharedstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
248 localstatedir=$localstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
249 runstatedir=$runstatedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
250 includedir=$includedir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
251 infodir=$infodir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
252 mandir=$mandir
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
253 localedir=$localedir
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254 __EOF__
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 # toolchain detection utilities
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 . make/toolchain.sh
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 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
260 # DEPENDENCIES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
261 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
262
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
263 # check languages
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
264 lang_c=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
265 lang_cpp=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
266 if detect_c_compiler ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
267 lang_c=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
268 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
269
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
270 # 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
271 echo > "$TEMP_DIR/make.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
272
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
273 test_pkg_config()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
274 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
275 if "$PKG_CONFIG" --exists "$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 "$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
278 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
279 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
280 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
281 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
282 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
283 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
284 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
285
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
286 print_check_msg()
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
287 {
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
288 if [ -z "$1" ]; then
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
289 shift
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
290 printf "$@"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
291 fi
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
292 }
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
293
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
294 dependency_error_coverage()
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
295 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
296 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
297 # dependency coverage toolchain="gcc"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
298 while true
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
299 do
960
a8a5f3dd5c3d test coverage does not really work with clang
Mike Becker <universe@uap-core.de>
parents: 842
diff changeset
300 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
301 break
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
302 fi
788
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
303 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
304 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
305 print_check_msg "$dep_checked_coverage" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
306 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
307 return 1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
308 done
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
309
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
310 print_check_msg "$dep_checked_coverage" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
311 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
312 return 0
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
313 }
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 dependency_error_pandoc()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
316 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
317 # dependency pandoc
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 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
321 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
324 fi
979
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
325 cat >> $TEMP_DIR/make.mk << __EOF__
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
326 # Dependency: pandoc
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
327 PANDOC=$PANDOC
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
328 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
329 print_check_msg "$dep_checked_pandoc" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
330 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
334 print_check_msg "$dep_checked_pandoc" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
335 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 dependency_error_c()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
340 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
341 # dependency c platform="mingw"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344 if notisplatform "mingw"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
345 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
346 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
347 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
348 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
349 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
350 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
351 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
352 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
353 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
354 STLIB_EXT=.lib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
355 SHLIB_EXT=.dll
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
356 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
357 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
358 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
359 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
360 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
361
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
362 # dependency c platform="macos"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
363 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
364 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
365 if notisplatform "macos"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
368 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
369 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
373 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
374 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 STLIB_EXT=.a
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 SHLIB_EXT=.dylib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
378 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
379 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
380 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
381 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 # dependency c platform="unix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
385 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
386 if notisplatform "unix"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
387 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
388 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
389 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
390 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
392 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
393 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
394 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
395 ARFLAGS=cr
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
396 STLIB_EXT=.a
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397 SHLIB_EXT=.so
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
398 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
399 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
400 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
404 print_check_msg "$dep_checked_c" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
405 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 dependency_error_file_tools()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
409 {
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
410 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
411 # dependency file-tools
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
413 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
414 cat >> $TEMP_DIR/make.mk << __EOF__
821
5e6f15005efd update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 815
diff changeset
415 # Dependency: file_tools
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
416 MKDIR=/bin/mkdir -p
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
417 RMFILE=/bin/rm -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
418 RMDIR=/bin/rm -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
419 COPYFILE=/bin/cp -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
420 COPYALL=/bin/cp -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
421 SYMLINK=/bin/ln -s
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
423 print_check_msg "$dep_checked_file_tools" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
424 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
425 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
428 print_check_msg "$dep_checked_file_tools" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
429 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
430 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
431 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 dependency_error_doxygen()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
434 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
435 # dependency doxygen
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438 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
439 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
440 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
441 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
442 fi
979
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
443 cat >> $TEMP_DIR/make.mk << __EOF__
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
444 # Dependency: doxygen
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
445 DOXYGEN=$DOXYGEN
bbae1ebf309b fix broken docs target after uwproj update
Mike Becker <universe@uap-core.de>
parents: 960
diff changeset
446 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
447 print_check_msg "$dep_checked_doxygen" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
448 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
452 print_check_msg "$dep_checked_doxygen" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
453 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 return 0
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
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 # start collecting dependency information
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
458 echo > "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 DEPENDENCIES_FAILED=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
461 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 # unnamed dependencies
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
464 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
467 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
468 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
469 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
470
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
471 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
472 # library version
759
475335643af4 increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents: 757
diff changeset
473 VERSION=3.1.0
825
3f324ea53152 be honest at least in the lib version
Mike Becker <universe@uap-core.de>
parents: 821
diff changeset
474 LIBVERSION=5.0.0
3f324ea53152 be honest at least in the lib version
Mike Becker <universe@uap-core.de>
parents: 821
diff changeset
475 LIBVERSION_MAJOR=5
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
476
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
477 # 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
478 src_dir=${src_dir}
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
479 build_dir=${src_dir}/build
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
480 docs_dir=${src_dir}/build/docs
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
481 dist_dir=${src_dir}/dist
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
483 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
484 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
485 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
486 done
842
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
487 while true
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
488 do
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
489 if notisplatform "solaris"; then
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
490 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
491 fi
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
492 while true
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
493 do
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
494
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
495 TEMP_LDFLAGS="$TEMP_LDFLAGS -lm"
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
496 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
497 done
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
498 break
b48cbfa109d4 add -lm to ldflags on Solaris
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 825
diff changeset
499 done
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
500
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501 # 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
502 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
503 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
504 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
505 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
506 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
507 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
508 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
510 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
511 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512
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 # OPTION VALUES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 checkopt_with_docs_all()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
519 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
520 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
521 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
522 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
523 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
524 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
525 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
526 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
527 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 checkopt_with_docs_html()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
537 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 checkopt_with_docs_api()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
551 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
552 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
553 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
554 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
555 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
556 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
557 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
558 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
559 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
560 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
561 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
562 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
563 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
564 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
565 checkopt_with_docs_none()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 return 0
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 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 # TARGETS
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
577
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
578 echo >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
579 echo "configuring global target"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580 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
581 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
582 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 if dependency_error_c; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED c "
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 if dependency_error_file_tools; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
591 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
592 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
593
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
594 # Features
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
595 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
596 # check dependency
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
597 if dependency_error_coverage ; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
598 # "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
599 if [ "$FEATURE_COVERAGE" = "auto" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
600 DISABLE_FEATURE_COVERAGE=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
601 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
602 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage "
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
603 ERROR=1
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
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
606 if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
607 unset FEATURE_COVERAGE
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
608 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
609 fi
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
610 if [ -n "$FEATURE_COVERAGE" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
611 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
612 else
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
613 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
614 fi
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
615 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
616 if [ -n "$DISABLE_FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
617 unset FEATURE_SZMUL_BUILTIN
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
618 fi
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
619 fi
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
620 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
621 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
622 else
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
623 :
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
624 TEMP_CFLAGS="$TEMP_CFLAGS -DCX_NO_SZMUL_BUILTIN"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
625 TEMP_CXXFLAGS="$TEMP_CXXFLAGS -DCX_NO_SZMUL_BUILTIN"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
626 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 # Option: --with-docs
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
629 if [ -z "$OPT_WITH_DOCS" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
630 echo "auto-detecting option 'with-docs'"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
631 SAVED_ERROR="$ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
633 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
637 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
638 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
639 break
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 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 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
643 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
644 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
645 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
646 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
647 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
648 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
649 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
651 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 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
653 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
654 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
655 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
656 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
657 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
658 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
659 SAVED_ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
660 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
661 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
662 ERROR="$SAVED_ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
663 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
664 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
665 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
666 if false; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667 false
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
668 elif [ "$OPT_WITH_DOCS" = "all" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
669 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
670 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 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
675 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676 elif [ "$OPT_WITH_DOCS" = "html" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 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
678 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
679 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
680 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
681 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
682 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
683 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
684 elif [ "$OPT_WITH_DOCS" = "api" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
685 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
686 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
687 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
688 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
689 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
690 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
691 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
692 elif [ "$OPT_WITH_DOCS" = "none" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
693 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
694 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
695 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
696 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
697 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
698 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
699 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
700 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
701 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
702
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
703 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
704 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
705 fi
815
b0c4750cecd8 update uwproj and check toolchain dependency for coverage flags - fixes #345
Mike Becker <universe@uap-core.de>
parents: 796
diff changeset
706 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
707 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
708 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
709 if [ "$BUILD_TYPE" = "debug" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
710 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
711 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
712 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
713 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
714 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
715 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
716 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
717 if [ "$BUILD_TYPE" = "release" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
718 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
719 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
720 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
721 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
722 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
723 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
724 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
725 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
726 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
727 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
728
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
729
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
730 # final result
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
731 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
732 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
733 echo "Error: Unresolved dependencies"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
734 echo "$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
735 abort_configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
736 fi
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 echo "configure finished"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
739 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
740 echo "Build Config:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
741 echo " PREFIX: $prefix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
742 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
743 echo "Options:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
744 cat "$TEMP_DIR/options"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
745 echo "Features:"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
746 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
747 echo " coverage: on"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
748 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
749 echo " coverage: off"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
750 fi
987
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
751 if [ -n "$FEATURE_SZMUL_BUILTIN" ]; then
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
752 echo " szmul-builtin: on"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
753 else
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
754 echo " szmul-builtin: off"
53e22f112b11 add configure option for szmul
Mike Becker <universe@uap-core.de>
parents: 982
diff changeset
755 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
756 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
757
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
758 # generate the config.mk file
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
759 cat > "$TEMP_DIR/config.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
760 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
761 # config.mk generated by configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
762 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
763
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
764 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
765 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
766 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
767 rm -Rf "$TEMP_DIR"

mercurial