configure

Thu, 11 Jul 2024 20:05:21 +0200

author
Mike Becker <universe@uap-core.de>
date
Thu, 11 Jul 2024 20:05:21 +0200
changeset 80
0f1c55d2a90a
parent 74
831928419249
permissions
-rwxr-xr-x

hotfix: ampersand not escaped in html output

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

mercurial