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