test/make/configure.vm

Fri, 06 Oct 2023 20:22:19 +0200

author
Mike Becker <universe@uap-core.de>
date
Fri, 06 Oct 2023 20:22:19 +0200
changeset 83
868e0d4b0a57
parent 82
85f5188acc21
child 88
0a663c3692a0
permissions
-rw-r--r--

fix missing error reporting when all option defaults fail - fixes #299

0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
3 # create temporary directory
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
4 TEMP_DIR=".tmp-`uname -n`"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
5 rm -Rf "$TEMP_DIR"
58
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
6 if mkdir -p "$TEMP_DIR"; then
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
7 :
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
8 else
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
9 echo "Cannot create tmp dir $TEMP_DIR"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
10 echo "Abort"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
11 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
12 fi
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
13 touch "$TEMP_DIR/options"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
14 touch "$TEMP_DIR/features"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
15
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
16 # define standard variables
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
17 PREFIX=/usr
75
b49869bd2a0a fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
18 EPREFIX=
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
19 BINDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
20 SBINDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
21 LIBDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
22 LIBEXECDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
23 DATADIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
24 SYSCONFDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
25 SHAREDSTATEDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
26 LOCALSTATEDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
27 INCLUDEDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
28 INFODIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
29 MANDIR=
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
30
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
31 # custom variables
7
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
32 #foreach( $var in $vars )
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
33 #if( $var.exec )
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
34 ${var.varName}=`${var.value}`
7
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
35 #else
76
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
36 ${var.varName}="${var.value}"
7
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
37 #end
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
38 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40 # features
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
41 #foreach( $feature in $features )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
42 #if( ${feature.auto} )
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
43 ${feature.varName}=auto
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
47 # clean abort
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
48 abort_configure()
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
49 {
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
50 rm -Rf "$TEMP_DIR"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
51 exit 1
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
52 }
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
53
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54 # help text
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 printhelp()
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 {
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
57 echo "Usage: $0 [OPTIONS]..."
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
58 cat << __EOF__
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 Installation directories:
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 --prefix=PREFIX path prefix for architecture-independent files
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 [/usr]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 --exec-prefix=EPREFIX path prefix for architecture-dependent files
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63 [PREFIX]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 --bindir=DIR user executables [EPREFIX/bin]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 --sbindir=DIR system admin executables [EPREFIX/sbin]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 --libexecdir=DIR program executables [EPREFIX/libexec]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 --sysconfdir=DIR system configuration files [PREFIX/etc]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 --libdir=DIR object code libraries [EPREFIX/lib]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 --includedir=DIR C header files [PREFIX/include]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 --infodir=DIR info documentation [DATAROOTDIR/info]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 --mandir=DIR man documentation [DATAROOTDIR/man]
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 #if( $options.size() > 0 )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 Options:
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
80 --debug add extra compile flags for debug builds
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
81 --release add extra compile flags for release builds
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 #foreach( $opt in $options )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
83 --${opt.argument}=${opt.valuesString}
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 #if( $features.size() > 0 )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 Optional Features:
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 #foreach( $feature in $features )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
90 #if( $feature.auto )
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 --disable-${feature.arg}
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 #else
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 --enable-${feature.arg}
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 __EOF__
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99 }
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 #
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
102 # parse arguments
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 #
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
104 BUILD_TYPE="default"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105 #set( $D = '$' )
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
106 for ARG in "$@"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
107 do
16
4fac0e25ee04 improve posix shell compatibility
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 15
diff changeset
108 case "$ARG" in
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
109 "--prefix="*) PREFIX=${D}{ARG#--prefix=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
110 "--exec-prefix="*) EPREFIX=${D}{ARG#--exec-prefix=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
111 "--bindir="*) BINDIR=${D}{ARG#----bindir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
112 "--sbindir="*) SBINDIR=${D}{ARG#--sbindir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
113 "--libdir="*) LIBDIR=${D}{ARG#--libdir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
114 "--libexecdir="*) LIBEXECDIR=${D}{ARG#--libexecdir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
115 "--datadir="*) DATADIR=${D}{ARG#--datadir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
116 "--sysconfdir="*) SYSCONFDIR=${D}{ARG#--sysconfdir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
117 "--sharedstatedir="*) SHAREDSTATEDIR=${D}{ARG#--sharedstatedir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
118 "--localstatedir="*) LOCALSTATEDIR=${D}{ARG#--localstatedir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
119 "--includedir="*) INCLUDEDIR=${D}{ARG#--includedir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
120 "--infodir="*) INFODIR=${D}{ARG#--infodir=} ;;
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
121 "--mandir"*) MANDIR=${D}{ARG#--mandir} ;;
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
122 "--help"*) printhelp; abort_configure ;;
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
123 "--debug") BUILD_TYPE="debug" ;;
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
124 "--release") BUILD_TYPE="release" ;;
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
125 #foreach( $opt in $options )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
126 "--${opt.argument}="*) ${opt.varName}=${D}{ARG#--${opt.argument}=} ;;
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 #end
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
128 #foreach( $feature in $features )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
129 "--enable-${feature.arg}") ${feature.varName}=on ;;
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
130 "--disable-${feature.arg}") unset ${feature.varName} ;;
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
131 #end
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
132 "-"*) echo "unknown option: $ARG"; abort_configure ;;
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
133 esac
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 done
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
136 ## Begin unparsed content. **
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
137 #[[
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 # set dir variables
75
b49869bd2a0a fix wrong EPREFIX when PREFIX is overridden
Mike Becker <universe@uap-core.de>
parents: 71
diff changeset
139 : ${EPREFIX:="$PREFIX"}
59
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
140 : ${BINDIR:="$EPREFIX/bin"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
141 : ${SBINDIR:="$EPREFIX/sbin"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
142 : ${LIBDIR:="$EPREFIX/lib"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
143 : ${LIBEXECDIR:="$EPREFIX/libexec"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
144 : ${DATADIR:="$PREFIX/share"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
145 : ${SYSCONFDIR:="$PREFIX/etc"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
146 : ${SHAREDSTATEDIR:="$PREFIX/com"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
147 : ${LOCALSTATEDIR:="$PREFIX/var"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
148 : ${INCLUDEDIR:="$PREFIX/include"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
149 : ${INFODIR:="$PREFIX/info"}
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
150 : ${MANDIR:="$PREFIX/man"}
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
151
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
152 # Test for availability of pkg-config
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
153 PKG_CONFIG=`command -v pkg-config`
59
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
154 : ${PKG_CONFIG:="false"}
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
155
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
156 # Simple uname based platform detection
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
157 # $PLATFORM is used for platform dependent dependency selection
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
158 OS=`uname -s`
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
159 OS_VERSION=`uname -r`
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160 printf "detect platform... "
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
161 if [ "$OS" = "SunOS" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
162 PLATFORM="solaris sunos unix svr4"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
163 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
164 if [ "$OS" = "Linux" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
165 PLATFORM="linux unix"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
166 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
167 if [ "$OS" = "FreeBSD" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
168 PLATFORM="freebsd bsd unix"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
170 if [ "$OS" = "Darwin" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
171 PLATFORM="macos osx bsd unix"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 fi
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
173 if echo "$OS" | grep -i "MINGW" > /dev/null; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
174 PLATFORM="windows mingw"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
175 fi
59
410e4f942ce7 simplify parameter substitution
Mike Becker <universe@uap-core.de>
parents: 58
diff changeset
176 : ${PLATFORM:="unix"}
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
177
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
178 PLATFORM_NAME=`echo "$PLATFORM" | cut -f1 -d' ' -`
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
179 echo "$PLATFORM_NAME"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
180
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
181 isplatform()
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
182 {
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
183 for p in $PLATFORM
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
184 do
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
185 if [ "$p" = "$1" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
186 return 0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
187 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188 done
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
189 return 1
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190 }
56
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
191 notisplatform()
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
192 {
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
193 for p in $PLATFORM
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
194 do
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
195 if [ "$p" = "$1" ]; then
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
196 return 1
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
197 fi
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
198 done
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
199 return 0
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
200 }
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
201 ]]#
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
202 ## End of unparsed content **
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
203
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
204 # generate vars.mk
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
205 cat > "$TEMP_DIR/vars.mk" << __EOF__
76
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
206 PREFIX="$PREFIX"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
207 EPREFIX="$EPREFIX"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
208 BINDIR="$BINDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
209 SBINDIR="$SBINDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
210 LIBDIR="$LIBDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
211 LIBEXECDIR="$LIBEXECDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
212 DATADIR="$DATADIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
213 SYSCONFDIR="$SYSCONFDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
214 SHAREDSTATEDIR="$SHAREDSTATEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
215 LOCALSTATEDIR="$LOCALSTATEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
216 INCLUDEDIR="$INCLUDEDIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
217 INFODIR="$INFODIR"
620358ea3a0b fix missing double-quote - fixes #306
Mike Becker <universe@uap-core.de>
parents: 75
diff changeset
218 MANDIR="$MANDIR"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
219 #foreach( $var in $vars )
82
85f5188acc21 use ${D} instead of hoping for $$ to always work
Mike Becker <universe@uap-core.de>
parents: 79
diff changeset
220 ${var.varName}="${D}${var.varName}"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
221 #end
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
222 __EOF__
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
223 sort -u -o "$TEMP_DIR/vars.mk" "$TEMP_DIR/vars.mk"
7
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
224
686991ae6e2f add configureable make variables
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 6
diff changeset
225
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
226 # toolchain detection utilities
13
cdf8bf4549c4 fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 12
diff changeset
227 . make/toolchain.sh
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
228
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
229 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
230 # DEPENDENCIES
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
231 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
232
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
233 # check languages
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
234 lang_c=
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
235 lang_cpp=
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
236 #foreach( $lang in $languages )
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
237 if detect_${lang}_compiler ; then
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
238 lang_${lang}=1
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
239 fi
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
240 #end
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
241
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
242 # create buffer for make variables required by dependencies
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
243 echo > "$TEMP_DIR/make.mk"
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
244
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
245 test_pkg_config()
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
246 {
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
247 if "$PKG_CONFIG" --exists "$1" ; then :
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
248 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
249 if [ -z "$2" ] || "$PKG_CONFIG" --atleast-version="$2" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
250 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
251 if [ -z "$3" ] || "$PKG_CONFIG" --exact-version="$3" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
252 else return 1 ; fi
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
253 if [ -z "$4" ] || "$PKG_CONFIG" --max-version="$4" "$1" ; then :
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
254 else return 1 ; fi
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
255 return 0
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
256 }
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
257
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
258 #foreach( $dependency in $namedDependencies )
78
c3a62e0baa9e fix special chars in dependency names are breaking configure - fixes #312
Mike Becker <universe@uap-core.de>
parents: 77
diff changeset
259 dependency_error_${dependency.id}()
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
260 {
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
261 printf "checking for ${dependency.name}... "
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
262 #foreach( $sub in $dependency.subdependencies )
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
263 # dependency $sub.fullName
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
264 while true
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
265 do
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
266 #if( $sub.platform )
56
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
267 if notisplatform "${sub.platform}"; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
268 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
269 fi
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
270 #end
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
271 #foreach( $np in $sub.notList )
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
272 if isplatform "${np}"; then
3
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
273 break
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
274 fi
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
275 #end
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
276 #foreach( $lang in $sub.lang )
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
277 if [ -z "$lang_${lang}" ] ; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
278 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
279 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
280 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
281 #if( $sub.pkgconfig.size() > 0 )
9
ebdecbbb2f79 fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 7
diff changeset
282 if [ -z "$PKG_CONFIG" ]; then
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
283 break
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
284 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
285 #end
33
b77d51b3c9bb dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents: 32
diff changeset
286 #foreach( $test in $sub.tests )
58
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
287 if $test > /dev/null ; then
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
288 :
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
289 else
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
290 break
33
b77d51b3c9bb dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents: 32
diff changeset
291 fi
b77d51b3c9bb dependency tests executed too late - fixes #282
Mike Becker <universe@uap-core.de>
parents: 32
diff changeset
292 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
293 #foreach( $pkg in $sub.pkgconfig )
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
294 if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then
58
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
295 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`"
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
296 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`"
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
297 else
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
298 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
299 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
300 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
301 #foreach( $flags in $sub.flags )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
302 #if( $flags.exec )
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
303 if tmp_flags=`$flags.value` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
304 TEMP_$flags.varName="$TEMP_$flags.varName $tmp_flags"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
305 else
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
306 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
307 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
308 #else
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
309 TEMP_$flags.varName="$TEMP_$flags.varName $flags.value"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
310 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
311 #end
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
312 #if ( $sub.make.length() > 0 )
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
313 cat >> $TEMP_DIR/make.mk << __EOF__
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
314 # Dependency: $dependency.name
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1
diff changeset
315 $sub.make
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1
diff changeset
316 __EOF__
3
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
317 #end
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
318 echo yes
57
df03772f7429 invert logic of dependency check
Mike Becker <universe@uap-core.de>
parents: 56
diff changeset
319 return 1
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
320 done
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
321
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
322 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
323 echo no
57
df03772f7429 invert logic of dependency check
Mike Becker <universe@uap-core.de>
parents: 56
diff changeset
324 return 0
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
325 }
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
326 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
327
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
328
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
329
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
330
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
331 # start collecting dependency information
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
332 echo > "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
333
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
334 DEPENDENCIES_FAILED=
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
335 ERROR=0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
336 #if( $dependencies.size() > 0 )
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
337 # unnamed dependencies
30
d4c38bb71fa0 don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 19
diff changeset
338 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
339 TEMP_CXXFLAGS=
30
d4c38bb71fa0 don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 19
diff changeset
340 TEMP_LDFLAGS=
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
341 #foreach( $dependency in $dependencies )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
342 while true
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
343 do
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
344 #if( $dependency.platform )
56
d9e8fdfc08f6 bring back notisplatform
Mike Becker <universe@uap-core.de>
parents: 54
diff changeset
345 if notisplatform "${dependency.platform}"; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
346 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
347 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
348 #end
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
349 #foreach( $np in $dependency.notList )
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
350 if isplatform "${np}"; then
3
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
351 break
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
352 fi
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
353 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
354 while true
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
355 do
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
356 #foreach( $lang in $dependency.lang )
67
e43d30273f74 check compilers before any dependency checks
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 66
diff changeset
357 if [ -z "$lang_${lang}" ] ; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
358 ERROR=1
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
359 break
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
360 fi
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
361 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
362 #if( $dependency.pkgconfig.size() > 0 )
9
ebdecbbb2f79 fix incompatibility with some unix systems
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 7
diff changeset
363 if [ -z "$PKG_CONFIG" ]; then
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
364 ERROR=1
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
365 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
366 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
367 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
368 #foreach( $pkg in $dependency.pkgconfig )
41
75ee588d5d9e some more code cleanup
Mike Becker <universe@uap-core.de>
parents: 40
diff changeset
369 printf "checking for pkg-config package $pkg.name... "
63
ac47c2fb2c4a fix bogus version constraint test - relates to #294
Mike Becker <universe@uap-core.de>
parents: 59
diff changeset
370 if test_pkg_config "$pkg.name" "$pkg.atleast" "$pkg.exact" "$pkg.max" ; then
58
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
371 echo yes
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
372 TEMP_CFLAGS="$TEMP_CFLAGS `"$PKG_CONFIG" --cflags $pkg.name`"
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
373 TEMP_LDFLAGS="$TEMP_LDFLAGS `"$PKG_CONFIG" --libs $pkg.name`"
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
374 else
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
375 echo no
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
376 ERROR=1
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
377 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
378 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
379 #end
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
380
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
381 #foreach( $flags in $dependency.flags )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
382 #if( $flags.exec )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
383 $flags.value > /dev/null
53
704368f1bb23 revert command substitution syntax change (relates to #283)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 52
diff changeset
384 if tmp_flags=`$flags.value` ; then
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
385 TEMP_$flags.varName="$TEMP_$flags.varName $tmp_flags"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
386 else
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
387 ERROR=1
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
388 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
389 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
390 #else
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
391 TEMP_$flags.varName="$TEMP_$flags.varName $flags.value"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
392 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
393 #end
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
394 #if ( $dependency.make.length() > 0 )
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
395 cat >> "$TEMP_DIR/make.mk" << __EOF__
6
d4363f69fd97 fix unnamed dependency make code template
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 3
diff changeset
396 $dependency.make
2
14a4b7f0bc74 add element for adding make code for dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 1
diff changeset
397 __EOF__
3
9d60baefa4ed add option for excluding dependencies on specific platforms
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 2
diff changeset
398 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
399 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
400 done
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
401 break
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
402 done
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
403 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
404
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
405 # add general dependency flags to flags.mk
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
406 echo "# general flags" >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
407 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
408 echo "CFLAGS += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
409 fi
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
410 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
411 echo "CXXFLAGS += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
412 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
413 if [ -n "${TEMP_LDFLAGS}" ]; then
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
414 echo "LDFLAGS += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
415 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
416 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
417
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
418 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
419 # OPTION VALUES
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
420 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
421 #foreach( $opt in $options )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
422 #foreach( $val in $opt.values )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
423 ${val.func}()
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
424 {
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
425 VERR=0
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
426 #foreach( $dep in $val.dependencies )
57
df03772f7429 invert logic of dependency check
Mike Becker <universe@uap-core.de>
parents: 56
diff changeset
427 if dependency_error_$dep ; then
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
428 VERR=1
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
429 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
430 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
431 if [ $VERR -ne 0 ]; then
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
432 return 1
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
433 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
434 #foreach( $def in $val.defines )
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
435 TEMP_CFLAGS="$TEMP_CFLAGS ${def.toFlags()}"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
436 TEMP_CXXFLAGS="$TEMP_CXXFLAGS ${def.toFlags()}"
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
437 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
438 #if( $val.hasMake() )
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
439 cat >> "$TEMP_DIR/make.mk" << __EOF__
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
440 $val.make
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
441 __EOF__
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
442 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
443 return 0
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
444 }
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
445 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
446 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
447
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
448 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
449 # TARGETS
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
450 #
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
451
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
452 #foreach( $target in $targets )
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
453 echo >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
454 #if ( $target.name )
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
455 echo "configuring target: $target.name"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
456 echo "# flags for target $target.name" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
457 #else
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
458 echo "configuring global target"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
459 echo "# flags for unnamed target" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
460 #end
30
d4c38bb71fa0 don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 19
diff changeset
461 TEMP_CFLAGS=
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
462 TEMP_CXXFLAGS=
30
d4c38bb71fa0 don't use cflags/ldflags directly in the configure script - fixes #281
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 19
diff changeset
463 TEMP_LDFLAGS=
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
464
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
465 #foreach( $dependency in $target.dependencies )
57
df03772f7429 invert logic of dependency check
Mike Becker <universe@uap-core.de>
parents: 56
diff changeset
466 if dependency_error_$dependency; then
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
467 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
468 ERROR=1
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
469 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
470 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
471
14
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
472 # Features
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
473 #foreach( $feature in $target.features )
82
85f5188acc21 use ${D} instead of hoping for $$ to always work
Mike Becker <universe@uap-core.de>
parents: 79
diff changeset
474 if [ -n "${D}${feature.varName}" ]; then
14
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
475 #foreach( $dependency in $feature.dependencies )
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
476 # check dependency
57
df03772f7429 invert logic of dependency check
Mike Becker <universe@uap-core.de>
parents: 56
diff changeset
477 if dependency_error_$dependency ; then
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
478 # "auto" features can fail and are just disabled in this case
82
85f5188acc21 use ${D} instead of hoping for $$ to always work
Mike Becker <universe@uap-core.de>
parents: 79
diff changeset
479 if [ "${D}${feature.varName}" = "auto" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
480 DISABLE_${feature.varName}=1
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
481 else
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
482 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
483 ERROR=1
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
484 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
485 fi
14
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
486 #end
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
487 if [ -n "$DISABLE_${feature.varName}" ]; then
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
488 unset ${feature.varName}
68
c997c0978665 fix automatic feature disabling failed when more than one dependency is missing
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 67
diff changeset
489 fi
14
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
490 fi
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
491 #end
87fea7ab27de implement optional (feature) dependencies
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 13
diff changeset
492
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
493 #foreach( $opt in $target.options )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
494 # Option: --${opt.argument}
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
495 if [ -z "${D}${opt.varName}" ]; then
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
496 echo "auto-detecting option '${opt.argument}'"
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
497 SAVED_ERROR="$ERROR"
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
498 SAVED_DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
499 ERROR=1
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
500 while true
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
501 do
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
502 #foreach( $optdef in $opt.defaults )
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
503 #if( $optdef.platform )
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
504 if isplatform "$optdef.platform"; then
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
505 #end
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
506 if $optdef.func ; then
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
507 echo " ${opt.argument}: ${optdef.valueName}" >> "$TEMP_DIR/options"
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
508 ERROR=0
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
509 break
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
510 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
511 #if( $optdef.platform )
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
512 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
513 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
514 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
515 break
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
516 done
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
517 if [ $ERROR -ne 0 ]; then
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
518 SAVED_ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
519 SAVED_DEPENDENCIES_FAILED="option '${opt.argument}' $SAVED_DEPENDENCIES_FAILED"
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
520 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
521 ERROR="$SAVED_ERROR"
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
522 DEPENDENCIES_FAILED="$SAVED_DEPENDENCIES_FAILED"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
523 else
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
524 echo "checking option ${opt.argument} = ${D}${opt.varName}"
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
525 if false; then
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
526 false
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
527 #foreach( $optval in $opt.values )
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
528 elif [ "${D}${opt.varName}" = "${optval.value}" ]; then
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
529 echo " ${opt.argument}: ${D}${opt.varName}" >> $TEMP_DIR/options
58
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
530 if $optval.func ; then
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
531 :
362998dbe619 removal of failed function in favor what the ancients actually did
Mike Becker <universe@uap-core.de>
parents: 57
diff changeset
532 else
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
533 ERROR=1
83
868e0d4b0a57 fix missing error reporting when all option defaults fail - fixes #299
Mike Becker <universe@uap-core.de>
parents: 82
diff changeset
534 DEPENDENCIES_FAILED="option '${opt.argument}' $DEPENDENCIES_FAILED"
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
535 fi
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
536 #end
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
537 fi
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
538 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
539 #end
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
540
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
541 if [ -n "${TEMP_CFLAGS}" -a -n "$lang_c" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
542 echo "${target.cFlags} += $TEMP_CFLAGS" >> "$TEMP_DIR/flags.mk"
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
543 fi
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
544 if [ -n "${TEMP_CXXFLAGS}" -a -n "$lang_cpp" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
545 echo "${target.cxxFlags} += $TEMP_CXXFLAGS" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
546 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
547 if [ "$BUILD_TYPE" = "debug" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
548 if [ -n "$lang_c" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
549 echo '${target.cFlags} += ${DEBUG_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
550 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
551 if [ -n "$lang_cpp" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
552 echo '${target.cxxFlags} += ${DEBUG_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
553 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
554 fi
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
555 if [ "$BUILD_TYPE" = "release" ]; then
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
556 if [ -n "$lang_c" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
557 echo '${target.cFlags} += ${RELEASE_CC_FLAGS}' >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
558 fi
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
559 if [ -n "$lang_cpp" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
560 echo '${target.cxxFlags} += ${RELEASE_CXX_FLAGS}' >> "$TEMP_DIR/flags.mk"
77
439902ff0af3 do not generate flags when lang is not required - fixes #311
Mike Becker <universe@uap-core.de>
parents: 76
diff changeset
561 fi
51
5c12e9e29733 add debug/release options - fixes #285
Mike Becker <universe@uap-core.de>
parents: 47
diff changeset
562 fi
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
563 if [ -n "${TEMP_LDFLAGS}" ]; then
79
ef0635b78b7b remove explicit calls of getters in velocity template
Mike Becker <universe@uap-core.de>
parents: 78
diff changeset
564 echo "${target.ldFlags} += $TEMP_LDFLAGS" >> "$TEMP_DIR/flags.mk"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
565 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
566
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
567 #end
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
568
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
569 # final result
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
570 if [ $ERROR -ne 0 ]; then
32
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
571 echo
c3132f7f19da fix mix of spaces and tabs
Mike Becker <universe@uap-core.de>
parents: 30
diff changeset
572 echo "Error: Unresolved dependencies"
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
573 echo "$DEPENDENCIES_FAILED"
52
afcb57893858 major evolution of configure template - fixes #283
Mike Becker <universe@uap-core.de>
parents: 51
diff changeset
574 abort_configure
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
575 fi
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
576
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
577 echo "configure finished"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
578 echo
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
579 echo "Build Config:"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
580 echo " PREFIX: $PREFIX"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
581 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
582 #if ( $options.size() > 0 )
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
583 echo "Options:"
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
584 cat "$TEMP_DIR/options"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
585 #end
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
586 #if ( $features.size() > 0 )
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
587 echo "Features:"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
588 #foreach( $feature in $features )
82
85f5188acc21 use ${D} instead of hoping for $$ to always work
Mike Becker <universe@uap-core.de>
parents: 79
diff changeset
589 if [ -n "${D}${feature.varName}" ]; then
47
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
590 echo " $feature.name: on"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
591 else
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
592 echo " $feature.name: off"
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
593 fi
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
594 #end
78ee95836412 automatically disable default-features if dependencies fail
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 46
diff changeset
595 #end
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
596 echo
66
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
597
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
598 # generate the config.mk file
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
599 cat > "$TEMP_DIR/config.mk" << __EOF__
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
600 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
601 # config.mk generated by configure
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
602 #
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
603
dc758dcd4645 add basic support for the lang element - fixes #284
Mike Becker <universe@uap-core.de>
parents: 63
diff changeset
604 __EOF__
71
b8d06f7b617c fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
605 write_toolchain_defaults "$TEMP_DIR/toolchain.mk"
b8d06f7b617c fix vars.mk never appended to config.mk
Mike Becker <universe@uap-core.de>
parents: 68
diff changeset
606 cat "$TEMP_DIR/vars.mk" "$TEMP_DIR/toolchain.mk" "$TEMP_DIR/flags.mk" "$TEMP_DIR/make.mk" > config.mk
34
4486849e6a6c fixes several minor potential issues in configure script
Mike Becker <universe@uap-core.de>
parents: 33
diff changeset
607 rm -Rf "$TEMP_DIR"
0
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
608
38775db5fdf5 add existing source
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
609

mercurial