Sun, 24 Sep 2023 18:43:58 +0200
use uwproj for build config generation
72
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
1 | #!/bin/sh |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
2 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
3 | # create temporary directory |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
4 | TEMP_DIR=".tmp-`uname -n`" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
5 | rm -Rf "$TEMP_DIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
6 | if mkdir -p "$TEMP_DIR"; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
7 | : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
8 | else |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
9 | echo "Cannot create tmp dir $TEMP_DIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
10 | echo "Abort" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
11 | exit 1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
12 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
13 | touch "$TEMP_DIR/options" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
14 | touch "$TEMP_DIR/features" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
15 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
16 | # define standard variables |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
17 | PREFIX=/usr |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
18 | EPREFIX= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
19 | BINDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
20 | SBINDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
21 | LIBDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
22 | LIBEXECDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
23 | DATADIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
24 | SYSCONFDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
25 | SHAREDSTATEDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
26 | LOCALSTATEDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
27 | INCLUDEDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
28 | INFODIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
29 | MANDIR= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
30 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
31 | # custom variables |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
32 | MKDIR="mkdir -p" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
33 | RMDIR="rm -fR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
34 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
35 | # features |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
36 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
37 | # clean abort |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
38 | abort_configure() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
39 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
40 | rm -Rf "$TEMP_DIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
41 | exit 1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
42 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
43 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
44 | # help text |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
45 | printhelp() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
46 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
47 | echo "Usage: $0 [OPTIONS]..." |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
48 | cat << __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
49 | Installation directories: |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
50 | --prefix=PREFIX path prefix for architecture-independent files |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
51 | [/usr] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
52 | --exec-prefix=EPREFIX path prefix for architecture-dependent files |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
53 | [PREFIX] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
54 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
55 | --bindir=DIR user executables [EPREFIX/bin] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
56 | --sbindir=DIR system admin executables [EPREFIX/sbin] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
57 | --libexecdir=DIR program executables [EPREFIX/libexec] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
58 | --sysconfdir=DIR system configuration files [PREFIX/etc] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
59 | --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
60 | --localstatedir=DIR modifiable single-machine data [PREFIX/var] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
61 | --libdir=DIR object code libraries [EPREFIX/lib] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
62 | --includedir=DIR C header files [PREFIX/include] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
63 | --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
64 | --datadir=DIR read-only architecture-independent data [DATAROOTDIR] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
65 | --infodir=DIR info documentation [DATAROOTDIR/info] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
66 | --mandir=DIR man documentation [DATAROOTDIR/man] |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
67 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
68 | __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
69 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
70 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
71 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
72 | # parse arguments |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
73 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
74 | BUILD_TYPE="default" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
75 | for ARG in "$@" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
76 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
77 | case "$ARG" in |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
78 | "--prefix="*) PREFIX=${ARG#--prefix=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
79 | "--exec-prefix="*) EPREFIX=${ARG#--exec-prefix=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
80 | "--bindir="*) BINDIR=${ARG#----bindir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
81 | "--sbindir="*) SBINDIR=${ARG#--sbindir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
82 | "--libdir="*) LIBDIR=${ARG#--libdir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
83 | "--libexecdir="*) LIBEXECDIR=${ARG#--libexecdir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
84 | "--datadir="*) DATADIR=${ARG#--datadir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
85 | "--sysconfdir="*) SYSCONFDIR=${ARG#--sysconfdir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
86 | "--sharedstatedir="*) SHAREDSTATEDIR=${ARG#--sharedstatedir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
87 | "--localstatedir="*) LOCALSTATEDIR=${ARG#--localstatedir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
88 | "--includedir="*) INCLUDEDIR=${ARG#--includedir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
89 | "--infodir="*) INFODIR=${ARG#--infodir=} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
90 | "--mandir"*) MANDIR=${ARG#--mandir} ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
91 | "--help"*) printhelp; abort_configure ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
92 | "--debug") BUILD_TYPE="debug" ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
93 | "--release") BUILD_TYPE="release" ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
94 | "-"*) echo "unknown option: $ARG"; abort_configure ;; |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
95 | esac |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
96 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
97 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
98 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
99 | # set dir variables |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
100 | : ${EPREFIX:="$PREFIX"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
101 | : ${BINDIR:="$EPREFIX/bin"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
102 | : ${SBINDIR:="$EPREFIX/sbin"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
103 | : ${LIBDIR:="$EPREFIX/lib"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
104 | : ${LIBEXECDIR:="$EPREFIX/libexec"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
105 | : ${DATADIR:="$PREFIX/share"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
106 | : ${SYSCONFDIR:="$PREFIX/etc"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
107 | : ${SHAREDSTATEDIR:="$PREFIX/com"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
108 | : ${LOCALSTATEDIR:="$PREFIX/var"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
109 | : ${INCLUDEDIR:="$PREFIX/include"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
110 | : ${INFODIR:="$PREFIX/info"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
111 | : ${MANDIR:="$PREFIX/man"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
112 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
113 | # Test for availability of pkg-config |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
114 | PKG_CONFIG=`command -v pkg-config` |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
115 | : ${PKG_CONFIG:="false"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
116 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
117 | # Simple uname based platform detection |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
118 | # $PLATFORM is used for platform dependent dependency selection |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
119 | OS=`uname -s` |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
120 | OS_VERSION=`uname -r` |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
121 | printf "detect platform... " |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
122 | if [ "$OS" = "SunOS" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
123 | PLATFORM="solaris sunos unix svr4" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
124 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
125 | if [ "$OS" = "Linux" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
126 | PLATFORM="linux unix" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
127 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
128 | if [ "$OS" = "FreeBSD" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
129 | PLATFORM="freebsd bsd unix" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
130 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
131 | if [ "$OS" = "Darwin" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
132 | PLATFORM="macos osx bsd unix" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
133 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
134 | if echo "$OS" | grep -i "MINGW" > /dev/null; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
135 | PLATFORM="windows mingw" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
136 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
137 | : ${PLATFORM:="unix"} |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
138 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
139 | PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -` |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
140 | echo "$PLATFORM_NAME" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
141 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
142 | isplatform() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
143 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
144 | for p in $PLATFORM |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
145 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
146 | if [ "$p" = "$1" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
147 | return 0 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
148 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
149 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
150 | return 1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
151 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
152 | notisplatform() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
153 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
154 | for p in $PLATFORM |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
155 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
156 | if [ "$p" = "$1" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
157 | return 1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
158 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
159 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
160 | return 0 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
161 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
162 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
163 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
164 | # generate vars.mk |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
165 | cat > "$TEMP_DIR/vars.mk" << __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
166 | PREFIX="$PREFIX" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
167 | EPREFIX="$EPREFIX" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
168 | BINDIR="$BINDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
169 | SBINDIR="$SBINDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
170 | LIBDIR="$LIBDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
171 | LIBEXECDIR="$LIBEXECDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
172 | DATADIR="$DATADIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
173 | SYSCONFDIR="$SYSCONFDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
174 | SHAREDSTATEDIR="$SHAREDSTATEDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
175 | LOCALSTATEDIR="$LOCALSTATEDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
176 | INCLUDEDIR="$INCLUDEDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
177 | INFODIR="$INFODIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
178 | MANDIR="$MANDIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
179 | MKDIR=$MKDIR |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
180 | RMDIR=$RMDIR |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
181 | __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
182 | sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
183 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
184 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
185 | # toolchain detection utilities |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
186 | . make/toolchain.sh |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
187 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
188 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
189 | # DEPENDENCIES |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
190 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
191 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
192 | # check languages |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
193 | lang_c= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
194 | lang_cpp= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
195 | if detect_c_compiler ; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
196 | lang_c=1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
197 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
198 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
199 | # create buffer for make variables required by dependencies |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
200 | echo > "$TEMP_DIR/make.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
201 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
202 | test_pkg_config() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
203 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
204 | if "$PKG_CONFIG" --exists "$1" ; then : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
205 | else return 1 ; fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
206 | if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
207 | else return 1 ; fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
208 | if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
209 | else return 1 ; fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
210 | if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
211 | else return 1 ; fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
212 | return 0 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
213 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
214 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
215 | dependency_error_ucx() |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
216 | { |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
217 | printf "checking for ucx... " |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
218 | # dependency ucx |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
219 | while true |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
220 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
221 | if check_lib ucx cx/list.h > /dev/null ; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
222 | : |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
223 | else |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
224 | break |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
225 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
226 | TEMP_LDFLAGS="$TEMP_LDFLAGS -lucx" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
227 | echo yes |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
228 | return 1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
229 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
230 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
231 | echo no |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
232 | return 0 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
233 | } |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
234 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
235 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
236 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
237 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
238 | # start collecting dependency information |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
239 | echo > "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
240 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
241 | DEPENDENCIES_FAILED= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
242 | ERROR=0 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
243 | # unnamed dependencies |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
244 | TEMP_CFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
245 | TEMP_CXXFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
246 | TEMP_LDFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
247 | while true |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
248 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
249 | while true |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
250 | do |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
251 | if [ -z "$lang_c" ] ; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
252 | ERROR=1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
253 | break |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
254 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
255 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
256 | break |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
257 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
258 | break |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
259 | done |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
260 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
261 | # add general dependency flags to flags.mk |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
262 | echo "# general flags" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
263 | if [ -n "${TEMP_CFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
264 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
265 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
266 | if [ -n "${TEMP_CXXFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
267 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
268 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
269 | if [ -n "${TEMP_LDFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
270 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
271 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
272 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
273 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
274 | # OPTION VALUES |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
275 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
276 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
277 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
278 | # TARGETS |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
279 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
280 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
281 | echo >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
282 | # Target: default |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
283 | echo "# flags for target default" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
284 | TEMP_CFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
285 | TEMP_CXXFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
286 | TEMP_LDFLAGS= |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
287 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
288 | if dependency_error_ucx; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
289 | DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ucx " |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
290 | ERROR=1 |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
291 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
292 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
293 | # Features |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
294 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
295 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
296 | if [ -n "${TEMP_CFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
297 | echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
298 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
299 | if [ -n "${TEMP_CXXFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
300 | echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
301 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
302 | if [ "$BUILD_TYPE" = "debug" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
303 | echo 'CFLAGS += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
304 | echo 'CXXFLAGS += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
305 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
306 | if [ "$BUILD_TYPE" = "release" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
307 | echo 'CFLAGS += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
308 | echo 'CXXFLAGS += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
309 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
310 | if [ -n "${TEMP_LDFLAGS}" ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
311 | echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
312 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
313 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
314 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
315 | # final result |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
316 | if [ $ERROR -ne 0 ]; then |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
317 | echo |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
318 | echo "Error: Unresolved dependencies" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
319 | echo "$DEPENDENCIES_FAILED" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
320 | abort_configure |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
321 | fi |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
322 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
323 | echo "configure finished" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
324 | echo |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
325 | echo "Build Config:" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
326 | echo " PREFIX: $PREFIX" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
327 | echo " TOOLCHAIN: $TOOLCHAIN_NAME" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
328 | echo |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
329 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
330 | # generate the config.mk file |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
331 | cat > "$TEMP_DIR/config.mk" << __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
332 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
333 | # config.mk generated by configure |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
334 | # |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
335 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
336 | __EOF__ |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
337 | write_toolchain_defaults "$TEMP_DIR/toolchain.mk" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
338 | cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
339 | rm -Rf "$TEMP_DIR" |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
340 | |
b533da8e7411
use uwproj for build config generation
Mike Becker <universe@uap-core.de>
parents:
diff
changeset
|
341 |