configure

Sun, 18 Feb 2024 21:12:28 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 18 Feb 2024 21:12:28 +0100
changeset 834
04c53b3c8378
parent 825
3f324ea53152
child 842
b48cbfa109d4
permissions
-rwxr-xr-x

capitalize cx_array_declare()

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

mercurial