configure

Sun, 14 Jan 2024 13:50:17 +0100

author
Mike Becker <universe@uap-core.de>
date
Sun, 14 Jan 2024 13:50:17 +0100
changeset 806
e06249e09f99
parent 796
fec90b848f4b
child 815
b0c4750cecd8
permissions
-rwxr-xr-x

add constant for reading out strstr sbo size - relates to #343

also fixes the related test which was working with the old SBO size of 256 and was broken after increasing it to 512

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"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
166 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
167 if [ "$OS" = "Linux" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
168 PLATFORM="linux unix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
169 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
170 if [ "$OS" = "FreeBSD" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
171 PLATFORM="freebsd bsd unix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
172 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
173 if [ "$OS" = "Darwin" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
174 PLATFORM="macos osx bsd unix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
175 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
176 if echo "$OS" | grep -i "MINGW" > /dev/null; then
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 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
204
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
205
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
206 # generate vars.mk
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
207 cat > "$TEMP_DIR/vars.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
208 prefix="$prefix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
209 exec_prefix="$exec_prefix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
210 bindir="$bindir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
211 sbindir="$sbindir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
212 libdir="$libdir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
213 libexecdir="$libexecdir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
214 datarootdir="$datarootdir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
215 datadir="$datadir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
216 sysconfdir="$sysconfdir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
217 sharedstatedir="$sharedstatedir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
218 localstatedir="$localstatedir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
219 runstatedir="$runstatedir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
220 includedir="$includedir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
221 infodir="$infodir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
222 mandir="$mandir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
223 localedir="$localedir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
224 src_dir="$src_dir"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
225 DOXYGEN="$DOXYGEN"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
226 PANDOC="$PANDOC"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
227 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
228
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
229 # toolchain detection utilities
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
230 . make/toolchain.sh
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
231
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
232 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
233 # DEPENDENCIES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
234 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
235
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
236 # check languages
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
237 lang_c=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
238 lang_cpp=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
239 if detect_c_compiler ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
240 lang_c=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
241 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
242
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
243 # 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
244 echo > "$TEMP_DIR/make.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
245
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
246 test_pkg_config()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
247 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
248 if "$PKG_CONFIG" --exists "$1" ; then :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
249 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
250 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
251 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
252 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
253 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
254 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
255 else return 1 ; fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
256 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
257 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
258
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
259 print_check_msg()
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
260 {
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
261 if [ -z "$1" ]; then
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
262 shift
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
263 printf "$@"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
264 fi
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
265 }
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
266
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
267 dependency_error_coverage()
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
268 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
269 print_check_msg "$dep_checked_coverage" "checking for coverage... "
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
270 # dependency coverage
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
271 while true
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
272 do
788
b34ff44e6433 move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents: 772
diff changeset
273 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
274 TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}"
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
275 print_check_msg "$dep_checked_coverage" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
276 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
277 return 1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
278 done
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
279
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
280 print_check_msg "$dep_checked_coverage" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
281 dep_checked_coverage=1
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
282 return 0
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
283 }
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
284 dependency_error_pandoc()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
285 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
286 print_check_msg "$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
287 # dependency pandoc
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
288 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
289 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
290 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
291 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
292 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
293 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
294 fi
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
295 print_check_msg "$dep_checked_pandoc" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
296 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
297 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
298 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
299
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
300 print_check_msg "$dep_checked_pandoc" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
301 dep_checked_pandoc=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
302 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
303 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
304 dependency_error_c()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
305 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
306 print_check_msg "$dep_checked_c" "checking for c... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
307 # dependency c platform="mingw"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
308 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
309 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
310 if notisplatform "mingw"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
311 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
312 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
313 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
314 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
315 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
316 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
317 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
318 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
319 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
320 STLIB_EXT=.lib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
321 SHLIB_EXT=.dll
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
322
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
323 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
324 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
325 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
326 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
327 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
328
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
329 # dependency c platform="macos"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
330 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
331 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
332 if notisplatform "macos"; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
333 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
334 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
335 if [ -z "$lang_c" ] ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
336 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
337 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
338 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
339 # Dependency: c
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
340 AR=ar
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
341 ARFLAGS=r
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
342 STLIB_EXT=.a
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
343 SHLIB_EXT=.dylib
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
344
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="unix"
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 "unix"; 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=.so
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
366
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
367 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
368 print_check_msg "$dep_checked_c" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
369 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
370 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
371 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
372
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
373 print_check_msg "$dep_checked_c" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
374 dep_checked_c=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
375 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
376 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
377 dependency_error_file_tools()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
378 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
379 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
380 # dependency file-tools
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
381 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
382 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
383 cat >> $TEMP_DIR/make.mk << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
384 # Dependency: file-tools
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
385 MKDIR=/bin/mkdir -p
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
386 RMFILE=/bin/rm -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
387 RMDIR=/bin/rm -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
388 COPYFILE=/bin/cp -f
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
389 COPYALL=/bin/cp -f -R
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
390 SYMLINK=/bin/ln -s
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
391
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
392 __EOF__
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
393 print_check_msg "$dep_checked_file_tools" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
394 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
395 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
396 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
397
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
398 print_check_msg "$dep_checked_file_tools" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
399 dep_checked_file_tools=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
400 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
401 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
402 dependency_error_doxygen()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
403 {
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
404 print_check_msg "$dep_checked_doxygen" "checking for doxygen... "
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
405 # dependency doxygen
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
406 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
407 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
408 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
409 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
410 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
411 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
412 fi
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
413 print_check_msg "$dep_checked_doxygen" "yes\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
414 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
415 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
416 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
417
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
418 print_check_msg "$dep_checked_doxygen" "no\n"
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
419 dep_checked_doxygen=1
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
420 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
421 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
422
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
423 # start collecting dependency information
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
424 echo > "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
425
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
426 DEPENDENCIES_FAILED=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
427 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
428 # unnamed dependencies
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
429 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
430 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
431 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
432 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
433 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
434 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
435 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
436
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
437 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
438 # library version
759
475335643af4 increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents: 757
diff changeset
439 VERSION=3.1.0
475335643af4 increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents: 757
diff changeset
440 LIBVERSION=4.1.0
754
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
441 LIBVERSION_MAJOR=4
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
442
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
443 # 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
444 build_dir=${src_dir}/build
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
445 docs_dir=${src_dir}/build/docs
4bc7d966c9db add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents: 753
diff changeset
446 dist_dir=${src_dir}/dist
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
447
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
448 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
449 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
450 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
451 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
452 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
453
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
454 # 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
455 echo "# general flags" >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
456 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
457 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
458 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
459 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
460 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
461 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
462 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
463 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
464 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
465
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
466 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
467 # OPTION VALUES
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
468 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
469 checkopt_with_docs_all()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
470 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
471 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
472 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
473 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
474 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
475 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
476 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
477 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
478 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
479 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
480 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
481 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
482 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
483 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
484 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
485
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
486 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
487 return 0
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 checkopt_with_docs_html()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
490 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
491 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
492 if dependency_error_pandoc ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
493 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
494 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
495 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
496 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
497 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
498 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
499 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
500 WITH_DOCS_HTML=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
501
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
502 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
503 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
504 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
505 checkopt_with_docs_api()
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
506 {
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
507 VERR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
508 if dependency_error_doxygen ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
509 VERR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
510 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
511 if [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
512 return 1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
513 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
514 cat >> "$TEMP_DIR/make.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
515 # Documentation
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
516 WITH_DOCS_API=yes
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
517
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
518 __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_none()
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 [ $VERR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
525 return 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 return 0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
528 }
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
529
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
530 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
531 # TARGETS
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
532 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
533
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
534 echo >> "$TEMP_DIR/flags.mk"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
535 echo "configuring global target"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
536 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
537 TEMP_CFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
538 TEMP_CXXFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
539 TEMP_LDFLAGS=
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
540
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
541 if dependency_error_c; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
542 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED c "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
543 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
544 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
545 if dependency_error_file_tools; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
546 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools "
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
547 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
548 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
549
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
550 # Features
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
551 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
552 # check dependency
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
553 if dependency_error_coverage ; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
554 # "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
555 if [ "$FEATURE_COVERAGE" = "auto" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
556 DISABLE_FEATURE_COVERAGE=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
557 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
558 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage "
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
559 ERROR=1
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
560 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
561 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
562 if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
563 unset FEATURE_COVERAGE
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
564 fi
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
565 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
566
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
567 # Option: --with-docs
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
568 if [ -z "$OPT_WITH_DOCS" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
569 echo "auto-detecting option 'with-docs'"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
570 SAVED_ERROR="$ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
571 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
572 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
573 while true
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
574 do
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
575 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
576 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
577 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
578 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
579 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
580 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
581 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
582 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
583 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
584 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
585 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
586 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
587 ERROR=0
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
588 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
589 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
590 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
591 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
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 break
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
596 done
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
597 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
598 SAVED_ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
599 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
600 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
601 ERROR="$SAVED_ERROR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
602 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
603 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
604 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
605 if false; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
606 false
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
607 elif [ "$OPT_WITH_DOCS" = "all" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
608 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
609 if checkopt_with_docs_all ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
610 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
611 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
612 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
613 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
614 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
615 elif [ "$OPT_WITH_DOCS" = "html" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
616 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
617 if checkopt_with_docs_html ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
618 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
619 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
620 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
621 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
622 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
623 elif [ "$OPT_WITH_DOCS" = "api" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
624 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
625 if checkopt_with_docs_api ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
626 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
627 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
628 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
629 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
630 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
631 elif [ "$OPT_WITH_DOCS" = "none" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
632 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
633 if checkopt_with_docs_none ; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
634 :
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
635 else
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
636 ERROR=1
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
637 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
638 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
639 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
640 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
641
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
642 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
643 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
644 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
645 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
646 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
647 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
648 if [ "$BUILD_TYPE" = "debug" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
649 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
650 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
651 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
652 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
653 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
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 if [ "$BUILD_TYPE" = "release" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
657 if [ -n "$lang_c" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
658 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
659 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
660 if [ -n "$lang_cpp" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
661 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
662 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
663 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
664 if [ -n "${TEMP_LDFLAGS}" ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
665 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
666 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
667
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
668
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
669 # final result
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
670 if [ $ERROR -ne 0 ]; then
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
671 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
672 echo "Error: Unresolved dependencies"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
673 echo "$DEPENDENCIES_FAILED"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
674 abort_configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
675 fi
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
676
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
677 echo "configure finished"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
678 echo
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
679 echo "Build Config:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
680 echo " PREFIX: $prefix"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
681 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
682 echo "Options:"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
683 cat "$TEMP_DIR/options"
772
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
684 echo "Features:"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
685 if [ -n "$FEATURE_COVERAGE" ]; then
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
686 echo " coverage: on"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
687 else
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
688 echo " coverage: off"
4586a84c0c0b add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents: 766
diff changeset
689 fi
753
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
690 echo
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 # generate the config.mk file
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
693 cat > "$TEMP_DIR/config.mk" << __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
694 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
695 # config.mk generated by configure
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
696 #
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
697
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
698 __EOF__
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
699 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
700 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
701 rm -Rf "$TEMP_DIR"
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
702
24dc84788dee replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff changeset
703
796
fec90b848f4b update uwproj configure template
Mike Becker <universe@uap-core.de>
parents: 788
diff changeset
704

mercurial