Mon, 01 Jan 2024 15:33:20 +0100
move coverage flags to make/*.mk files - relates to #345
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 | |
772
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
259 | dependency_error_coverage() |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
260 | { |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
261 | printf "checking for coverage... " |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
262 | # dependency coverage |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
263 | while true |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
264 | do |
788
b34ff44e6433
move coverage flags to make/*.mk files - relates to #345
Mike Becker <universe@uap-core.de>
parents:
772
diff
changeset
|
265 | 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
|
266 | TEMP_LDFLAGS="$TEMP_LDFLAGS \${COVERAGE_LDFLAGS}" |
772
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
267 | echo yes |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
268 | return 1 |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
269 | done |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
270 | |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
271 | echo no |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
272 | return 0 |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
273 | } |
753
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
274 | dependency_error_pandoc() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
275 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
276 | printf "checking for pandoc... " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
277 | # dependency pandoc |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
278 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
279 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
280 | 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
|
281 | : |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
282 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
283 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
284 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
285 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
286 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
287 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
288 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
289 | echo no |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
290 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
291 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
292 | dependency_error_c() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
293 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
294 | printf "checking for c... " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
295 | # dependency c platform="mingw" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
296 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
297 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
298 | if notisplatform "mingw"; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
299 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
300 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
301 | if [ -z "$lang_c" ] ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
302 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
303 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
304 | cat >> $TEMP_DIR/make.mk << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
305 | # Dependency: c |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
306 | AR=ar |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
307 | ARFLAGS=r |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
308 | STLIB_EXT=.lib |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
309 | SHLIB_EXT=.dll |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
310 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
311 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
312 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
313 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
314 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
315 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
316 | # dependency c platform="macos" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
317 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
318 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
319 | if notisplatform "macos"; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
320 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
321 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
322 | if [ -z "$lang_c" ] ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
323 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
324 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
325 | cat >> $TEMP_DIR/make.mk << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
326 | # Dependency: c |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
327 | AR=ar |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
328 | ARFLAGS=r |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
329 | STLIB_EXT=.a |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
330 | SHLIB_EXT=.dylib |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
331 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
332 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
333 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
334 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
335 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
336 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
337 | # dependency c platform="unix" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
338 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
339 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
340 | if notisplatform "unix"; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
341 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
342 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
343 | if [ -z "$lang_c" ] ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
344 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
345 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
346 | cat >> $TEMP_DIR/make.mk << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
347 | # Dependency: c |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
348 | AR=ar |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
349 | ARFLAGS=r |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
350 | STLIB_EXT=.a |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
351 | SHLIB_EXT=.so |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
352 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
353 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
354 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
355 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
356 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
357 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
358 | echo no |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
359 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
360 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
361 | dependency_error_file_tools() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
362 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
363 | printf "checking for file-tools... " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
364 | # dependency file-tools |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
365 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
366 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
367 | cat >> $TEMP_DIR/make.mk << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
368 | # Dependency: file-tools |
754
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
369 | MKDIR=/bin/mkdir -p |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
370 | RMFILE=/bin/rm -f |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
371 | RMDIR=/bin/rm -f -R |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
372 | COPYFILE=/bin/cp -f |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
373 | COPYALL=/bin/cp -f -R |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
374 | SYMLINK=/bin/ln -s |
753
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
375 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
376 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
377 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
378 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
379 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
380 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
381 | echo no |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
382 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
383 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
384 | dependency_error_doxygen() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
385 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
386 | printf "checking for doxygen... " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
387 | # dependency doxygen |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
388 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
389 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
390 | if test -n "$DOXYGEN" > /dev/null ; then |
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 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
393 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
394 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
395 | echo yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
396 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
397 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
398 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
399 | echo no |
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 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
403 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
404 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
405 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
406 | # start collecting dependency information |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
407 | echo > "$TEMP_DIR/flags.mk" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
408 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
409 | DEPENDENCIES_FAILED= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
410 | ERROR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
411 | # unnamed dependencies |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
412 | TEMP_CFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
413 | TEMP_CXXFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
414 | TEMP_LDFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
415 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
416 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
417 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
418 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
419 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
420 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
421 | # library version |
759
475335643af4
increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents:
757
diff
changeset
|
422 | VERSION=3.1.0 |
475335643af4
increase version number to 3.1
Mike Becker <universe@uap-core.de>
parents:
757
diff
changeset
|
423 | LIBVERSION=4.1.0 |
754
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
424 | LIBVERSION_MAJOR=4 |
753
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 | # 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
|
427 | build_dir=${src_dir}/build |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
428 | docs_dir=${src_dir}/build/docs |
4bc7d966c9db
add an uwproj based install target
Mike Becker <universe@uap-core.de>
parents:
753
diff
changeset
|
429 | dist_dir=${src_dir}/dist |
753
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
430 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
431 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
432 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
433 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
434 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
435 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
436 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
437 | # 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
|
438 | 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
|
439 | 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
|
440 | 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
|
441 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
442 | 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
|
443 | 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
|
444 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
445 | if [ -n "${TEMP_LDFLAGS}" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
446 | 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
|
447 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
448 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
449 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
450 | # OPTION VALUES |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
451 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
452 | checkopt_with_docs_all() |
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 | VERR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
455 | if dependency_error_pandoc ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
456 | VERR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
457 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
458 | if dependency_error_doxygen ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
459 | VERR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
460 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
461 | if [ $VERR -ne 0 ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
462 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
463 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
464 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
465 | # Documentation |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
466 | WITH_DOCS_API=yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
467 | WITH_DOCS_HTML=yes |
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 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
470 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
471 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
472 | checkopt_with_docs_html() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
473 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
474 | VERR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
475 | if dependency_error_pandoc ; 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_HTML=yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
484 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
485 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
486 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
487 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
488 | checkopt_with_docs_api() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
489 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
490 | VERR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
491 | if dependency_error_doxygen ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
492 | VERR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
493 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
494 | if [ $VERR -ne 0 ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
495 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
496 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
497 | cat >> "$TEMP_DIR/make.mk" << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
498 | # Documentation |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
499 | WITH_DOCS_API=yes |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
500 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
501 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
502 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
503 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
504 | checkopt_with_docs_none() |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
505 | { |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
506 | VERR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
507 | if [ $VERR -ne 0 ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
508 | return 1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
509 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
510 | return 0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
511 | } |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
512 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
513 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
514 | # TARGETS |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
515 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
516 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
517 | echo >> "$TEMP_DIR/flags.mk" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
518 | echo "configuring global target" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
519 | 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
|
520 | TEMP_CFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
521 | TEMP_CXXFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
522 | TEMP_LDFLAGS= |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
523 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
524 | if dependency_error_c; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
525 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED c " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
526 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
527 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
528 | if dependency_error_file_tools; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
529 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED file_tools " |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
530 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
531 | fi |
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 | # Features |
772
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
534 | if [ -n "$FEATURE_COVERAGE" ]; then |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
535 | # check dependency |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
536 | if dependency_error_coverage ; then |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
537 | # "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
|
538 | if [ "$FEATURE_COVERAGE" = "auto" ]; then |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
539 | DISABLE_FEATURE_COVERAGE=1 |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
540 | else |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
541 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED coverage " |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
542 | ERROR=1 |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
543 | fi |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
544 | fi |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
545 | if [ -n "$DISABLE_FEATURE_COVERAGE" ]; then |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
546 | unset FEATURE_COVERAGE |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
547 | fi |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
548 | fi |
753
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 | # Option: --with-docs |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
551 | if [ -z "$OPT_WITH_DOCS" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
552 | echo "auto-detecting option 'with-docs'" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
553 | SAVED_ERROR="$ERROR" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
554 | SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
555 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
556 | while true |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
557 | do |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
558 | if checkopt_with_docs_all ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
559 | 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
|
560 | ERROR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
561 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
562 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
563 | if checkopt_with_docs_html ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
564 | 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
|
565 | ERROR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
566 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
567 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
568 | if checkopt_with_docs_api ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
569 | 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
|
570 | ERROR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
571 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
572 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
573 | if checkopt_with_docs_none ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
574 | 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
|
575 | ERROR=0 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
576 | break |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
577 | fi |
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 | done |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
580 | if [ $ERROR -ne 0 ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
581 | SAVED_ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
582 | 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
|
583 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
584 | ERROR="$SAVED_ERROR" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
585 | DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
586 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
587 | 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
|
588 | if false; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
589 | false |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
590 | elif [ "$OPT_WITH_DOCS" = "all" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
591 | echo " with-docs: $OPT_WITH_DOCS" >> $TEMP_DIR/options |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
592 | if checkopt_with_docs_all ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
593 | : |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
594 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
595 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
596 | 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
|
597 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
598 | elif [ "$OPT_WITH_DOCS" = "html" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
599 | 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
|
600 | if checkopt_with_docs_html ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
601 | : |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
602 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
603 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
604 | 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
|
605 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
606 | elif [ "$OPT_WITH_DOCS" = "api" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
607 | 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
|
608 | if checkopt_with_docs_api ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
609 | : |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
610 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
611 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
612 | 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
|
613 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
614 | elif [ "$OPT_WITH_DOCS" = "none" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
615 | 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
|
616 | if checkopt_with_docs_none ; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
617 | : |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
618 | else |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
619 | ERROR=1 |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
620 | 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
|
621 | fi |
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 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
624 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
625 | 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
|
626 | 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
|
627 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
628 | 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
|
629 | 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
|
630 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
631 | if [ "$BUILD_TYPE" = "debug" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
632 | if [ -n "$lang_c" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
633 | 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
|
634 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
635 | if [ -n "$lang_cpp" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
636 | 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
|
637 | fi |
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 | if [ "$BUILD_TYPE" = "release" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
640 | if [ -n "$lang_c" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
641 | 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
|
642 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
643 | if [ -n "$lang_cpp" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
644 | 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
|
645 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
646 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
647 | if [ -n "${TEMP_LDFLAGS}" ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
648 | 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
|
649 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
650 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
651 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
652 | # final result |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
653 | if [ $ERROR -ne 0 ]; then |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
654 | echo |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
655 | echo "Error: Unresolved dependencies" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
656 | echo "$DEPENDENCIES_FAILED" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
657 | abort_configure |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
658 | fi |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
659 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
660 | echo "configure finished" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
661 | echo |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
662 | echo "Build Config:" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
663 | echo " PREFIX: $prefix" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
664 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
665 | echo "Options:" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
666 | cat "$TEMP_DIR/options" |
772
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
667 | echo "Features:" |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
668 | if [ -n "$FEATURE_COVERAGE" ]; then |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
669 | echo " coverage: on" |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
670 | else |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
671 | echo " coverage: off" |
4586a84c0c0b
add coverage feature - relates to #342
Mike Becker <universe@uap-core.de>
parents:
766
diff
changeset
|
672 | fi |
753
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
673 | echo |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
674 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
675 | # generate the config.mk file |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
676 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
677 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
678 | # config.mk generated by configure |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
679 | # |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
680 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
681 | __EOF__ |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
682 | 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
|
683 | 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
|
684 | rm -Rf "$TEMP_DIR" |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
685 | |
24dc84788dee
replace most of the build system with uwproj
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
686 |