make/configure.vm

Tue, 25 Aug 2020 12:07:56 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Tue, 25 Aug 2020 12:07:56 +0200
branch
webdav
changeset 259
0b8692959d37
parent 250
f4d93355b054
child 260
4779a6fb4fbe
permissions
-rw-r--r--

merge branch config into webdav

204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
1 #!/bin/sh
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
2
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
3 #foreach( $var in $vars )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
4 #if( $var.exec )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
5 ${var.name}=`${var.value}`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
6 #else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
7 ${var.name}=${var.value}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
8 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
9 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
10
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
11 #if ( ! $project.hasVar("PREFIX") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
12 PREFIX=/usr
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
13 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
14 #if ( ! $project.hasVar("EPREFIX") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
15 EPREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
16 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
17
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
18 #if ( ! $project.hasVar("BINDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
19 BINDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
20 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
21 #if ( ! $project.hasVar("SBINDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
22 SBINDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
23 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
24 #if ( ! $project.hasVar("LIBDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
25 LIBDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
26 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
27 #if ( ! $project.hasVar("LIBEXECDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
28 LIBEXECDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
29 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
30 #if ( ! $project.hasVar("DATADIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
31 DATADIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
32 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
33 #if ( ! $project.hasVar("SYSCONFDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
34 SYSCONFDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
35 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
36 #if ( ! $project.hasVar("SHAREDSTATEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
37 SHAREDSTATEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
38 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
39 #if ( ! $project.hasVar("LOCALSTATEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
40 LOCALSTATEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
41 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
42 #if ( ! $project.hasVar("INCLUDEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
43 INCLUDEDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
44 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
45 #if ( ! $project.hasVar("INFODIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
46 INFODIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
47 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
48 #if ( ! $project.hasVar("MANDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
49 MANDIR=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
50 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
51
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
52 OS=`uname -s`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
53 OS_VERSION=`uname -r`
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
54
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
55 TEMP_DIR=".tmp-`uname -n`"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
56 mkdir -p $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
57 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
58 echo "Cannot create tmp dir"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
59 echo "Abort"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
60 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
61 touch $TEMP_DIR/options
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
62 touch $TEMP_DIR/features
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
63
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
64 # features
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
65 #foreach( $feature in $features )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
66 #if( ${feature.isDefault()} )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
67 ${feature.getVarName()}=on
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
68 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
69 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
70
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
71 # help text
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
72 printhelp()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
73 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
74 echo "Usage: $0 [OPTIONS]..."
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
75 cat << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
76 Installation directories:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
77 --prefix=PREFIX path prefix for architecture-independent files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
78 [/usr]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
79 --exec-prefix=EPREFIX path prefix for architecture-dependent files
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
80 [PREFIX]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
81
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
82 --bindir=DIR user executables [EPREFIX/bin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
83 --sbindir=DIR system admin executables [EPREFIX/sbin]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
84 --libexecdir=DIR program executables [EPREFIX/libexec]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
85 --sysconfdir=DIR system configuration files [PREFIX/etc]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
86 --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
87 --localstatedir=DIR modifiable single-machine data [PREFIX/var]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
88 --libdir=DIR object code libraries [EPREFIX/lib]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
89 --includedir=DIR C header files [PREFIX/include]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
90 --datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
91 --datadir=DIR read-only architecture-independent data [DATAROOTDIR]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
92 --infodir=DIR info documentation [DATAROOTDIR/info]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
93 --mandir=DIR man documentation [DATAROOTDIR/man]
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
94
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
95 #if( $options.size() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
96 Options:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
97 #foreach( $opt in $options )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
98 --${opt.getArgument()}=${opt.getValuesString()}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
99 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
100
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
101 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
102 #if( $features.size() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
103 Optional Features:
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
104 #foreach( $feature in $features )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
105 #if( $feature.default )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
106 --disable-${feature.arg}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
107 #else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
108 --enable-${feature.arg}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
109 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
110 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
111
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
112 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
113 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
114 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
115
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
116 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
117 # parse arguments
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
118 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
119 #set( $D = '$' )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
120 for ARG in $@
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
121 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
122 if [[ $ARG == --prefix=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
123 PREFIX=${D}{ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
124 elif [[ $ARG = --exec-prefix=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
125 EPREFIX=${D}{ARG:14}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
126 elif [[ $ARG = --bindir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
127 BINDIR=${D}{ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
128 elif [[ $ARG = --sbindir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
129 SBINDIR=${D}{ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
130 elif [[ $ARG = --libdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
131 LIBDIR=${D}{ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
132 elif [[ $ARG = --libexecdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
133 LIBEXECDIR=${D}{ARG:13}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
134 elif [[ $ARG = --datadir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
135 DATADIR=${D}{ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
136 elif [[ $ARG = --sysconfdir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
137 SYSCONFDIR=${D}{ARG:13}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
138 elif [[ $ARG = --sharedstatedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
139 SHAREDSTATEDIR=${D}{ARG:17}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
140 elif [[ $ARG = --localstatedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
141 LOCALSTATEDIR=${D}{ARG:16}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
142 elif [[ $ARG = --includedir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
143 INCLUDEDIR=${D}{ARG:12}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
144 elif [[ $ARG = --infodir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
145 INFODIR=${D}{ARG:10}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
146 elif [[ $ARG = --mandir=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
147 MANDIR=${D}{ARG:9}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
148 elif [ $ARG = "--help" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
149 printhelp
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
150 exit 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
151 #foreach( $opt in $options )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
152 elif [[ $ARG == --${opt.getArgument()}=* ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
153 ${opt.getVarName()}=${opt.getArgValue()}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
154 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
155 #foreach( $feature in $features )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
156 elif [[ $ARG == --enable-${feature.arg} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
157 ${feature.getVarName()}=on
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
158 elif [[ $ARG == --disable-${feature.arg} ]]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
159 unset ${feature.getVarName()}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
160 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
161 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
162 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
163
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
164 # set dir variables
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
165 if [ -z "$BINDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
166 BINDIR=$EPREFIX/bin
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
167 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
168 if [ -z "$SBINDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
169 SBINDIR=$EPREFIX/sbin
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
170 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
171 if [ -z "$LIBDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
172 LIBDIR=$EPREFIX/lib
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
173 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
174 if [ -z "$LIBEXEC" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
175 LIBEXECDIR=$EPREFIX/libexec
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
176 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
177 if [ -z "$DATADIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
178 DATADIR=$PREFIX/share
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
179 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
180 if [ -z "$SYSCONFDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
181 SYSCONFDIR=$PREFIX/etc
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
182 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
183 if [ -z "$SHAREDSTATEDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
184 SHAREDSTATEDIR=$PREFIX/com
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
185 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
186 if [ -z "$LOCALSTATEDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
187 LOCALSTATEDIR=$PREFIX/var
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
188 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
189 if [ -z "$INCLUDEDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
190 INCLUDEDIR=$PREFIX/include
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
191 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
192 if [ -z "$INFODIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
193 INFODIR=$PREFIX/info
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
194 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
195 if [ -z "$MANDIR" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
196 MANDIR=$PREFIX/man
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
197 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
198
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
199 which pkg-config > /dev/null
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
200 if [ $? -eq 0 ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
201 PKG_CONFIG=pkg-config
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
202 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
203 PKG_CONFIG=false
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
204 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
205
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
206 # Simple uname based platform detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
207 # $PLATFORM is used for platform dependent dependency selection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
208 printf "detect platform... "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
209 if [ $OS = SunOS ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
210 PLATFORM="solaris sunos unix svr4"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
211 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
212 if [ $OS = Linux ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
213 PLATFORM="linux unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
214 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
215 if [ $OS = FreeBSD ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
216 PLATFORM="freebsd bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
217 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
218 if [ $OS = Darwin ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
219 PLATFORM="macos osx bsd unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
220 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
221 echo $OS | grep "MINGW" > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
222 if [ $? -eq 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
223 PLATFORM="windows mingw"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
224 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
225
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
226 if [ -z "$PLATFORM" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
227 PLATFORM="unix"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
228 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
229
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
230 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
231 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
232 PLATFORM_NAME=$p
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
233 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
234 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
235 echo $PLATFORM_NAME
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
236
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
237 isplatform()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
238 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
239 for p in $PLATFORM
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
240 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
241 if [ $p = $1 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
242 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
243 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
244 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
245 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
246 }
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
247 isnotplatform()
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
248 {
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
249 for p in $PLATFORM
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
250 do
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
251 if [ $p = $1 ]; then
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
252 return 1
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
253 fi
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
254 done
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
255 return 0
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
256 }
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
257
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
258 # generate config.mk and config.h
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
259 cat > $TEMP_DIR/config.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
260 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
261 # config.mk generated by configure
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
262 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
263
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
264 # general vars
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
265 #foreach( $var in $vars )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
266 ${var.name}=$${var.name}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
267 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
268
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
269 #if ( ! $project.hasVar("PREFIX") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
270 PREFIX=$PREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
271 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
272 #if ( ! $project.hasVar("EPREFIX") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
273 EPREFIX=$EPREFIX
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
274 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
275
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
276 #if ( ! $project.hasVar("BINDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
277 BINDIR=$BINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
278 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
279 #if ( ! $project.hasVar("SBINDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
280 SBINDIR=$SBINDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
281 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
282 #if ( ! $project.hasVar("LIBDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
283 LIBDIR=$LIBDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
284 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
285 #if ( ! $project.hasVar("LIBEXECDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
286 LIBEXECDIR=$LIBEXECDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
287 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
288 #if ( ! $project.hasVar("DATADIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
289 DATADIR=$DATADIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
290 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
291 #if ( ! $project.hasVar("SYSCONFDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
292 SYSCONFDIR=$SYSCONFDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
293 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
294 #if ( ! $project.hasVar("SHAREDSTATEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
295 SHAREDSTATEDIR=$SHAREDSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
296 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
297 #if ( ! $project.hasVar("LOCALSTATEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
298 LOCALSTATEDIR=$LOCALSTATEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
299 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
300 #if ( ! $project.hasVar("INCLUDEDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
301 INCLUDEDIR=$INCLUDEDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
302 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
303 #if ( ! $project.hasVar("INFODIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
304 INFODIR=$INFODIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
305 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
306 #if ( ! $project.hasVar("MANDIR") )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
307 MANDIR=$MANDIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
308 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
309
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
310 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
311
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
312 echo > $TEMP_DIR/make.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
313
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
314 ENV_CFLAGS=$CFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
315 ENV_LDFLAGS=$LDFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
316 ENV_CXXFLAGS=$CXXFLAGS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
317
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
318 # Toolchain detection
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
319 # this will insert make vars to config.mk
209
a6d8181a8127 replace source with . in configure script and fix toolchain detection
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 208
diff changeset
320 . make/toolchain.sh
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
321
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
322 # add user specified flags to config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
323 echo >> $TEMP_DIR/config.mk
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
324 if [ ! -z "${ENV_CFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
325 echo "CFLAGS += $ENV_CFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
326 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
327 if [ ! -z "${ENV_CXXFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
328 echo "CXXFLAGS += $ENV_CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
329 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
330 if [ ! -z "${ENV_LDFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
331 echo "LDFLAGS += $ENV_LDFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
332 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
333
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
334 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
335 # DEPENDENCIES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
336 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
337
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
338 #foreach( $dependency in $namedDependencies )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
339 dependency_${dependency.name}()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
340 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
341 printf "checking for ${dependency.name}... "
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
342 #foreach( $sub in $dependency.getSubdependencies() )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
343 # dependency $sub.name $sub.getPlatformString()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
344 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
345 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
346 #if( $sub.platform )
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
347 if isnotplatform "${sub.platform}"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
348 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
349 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
350 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
351 #foreach( $not in $sub.getNotList() )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
352 if isplatform "${not}"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
353 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
354 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
355 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
356 #if( $sub.pkgconfig.size() > 0 )
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
357 if [ -z "$PKG_CONFIG" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
358 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
359 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
360 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
361 #foreach( $pkg in $sub.pkgconfig )
208
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
362 $PKG_CONFIG $pkg.getPkgConfigParam()
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
363 if [ $? -ne 0 ] ; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
364 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
365 fi
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
366 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`"
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
367 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
368 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
369 #foreach( $flags in $sub.flags )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
370 #if( $flags.exec )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
371 $flags.value > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
372 if [ $? -eq 0 ]; then
210
21274e5950af fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 209
diff changeset
373 $flags.varName="$$flags.varName `$flags.value`"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
374 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
375 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
376 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
377 #else
210
21274e5950af fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 209
diff changeset
378 $flags.varName="$$flags.varName $flags.value"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
379 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
380 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
381 #foreach( $test in $sub.tests )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
382 $test > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
383 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
384 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
385 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
386 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
387 #if ( $sub.make.length() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
388 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
389 # Dependency: $dependency.name
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
390 $sub.make
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
391 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
392 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
393 echo yes
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
394 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
395 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
396
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
397 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
398 echo no
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
399 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
400 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
401 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
402
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
403 DEPENDENCIES_FAILED=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
404 ERROR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
405 #if( $dependencies.size() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
406 # general dependencies
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
407 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
408 LDFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
409 #foreach( $dependency in $dependencies )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
410 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
411 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
412 #if( $dependency.platform )
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
413 if isnotplatform "${dependency.platform}"; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
414 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
415 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
416 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
417 #foreach( $not in $dependency.getNotList() )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
418 if isplatform "${not}"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
419 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
420 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
421 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
422 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
423 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
424 #if( $dependency.pkgconfig.size() > 0 )
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
425 if [ -z "$PKG_CONFIG" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
426 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
427 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
428 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
429 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
430 #foreach( $pkg in $dependency.pkgconfig )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
431 printf "checking for pkg-config package $pkg.getPkgConfigParam()... "
208
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
432 $PKG_CONFIG $pkg.getPkgConfigParam()
fedd0f957c31 yet another compatibility fix
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 207
diff changeset
433 if [ $? -ne 0 ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
434 echo no
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
435 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
436 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
437 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
438 echo yes
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
439 CFLAGS="$CFLAGS `$PKG_CONFIG --cflags $pkg.getPkgConfigParam()`"
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
440 LDFLAGS="$LDFLAGS `$PKG_CONFIG --libs $pkg.getPkgConfigParam()`"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
441 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
442
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
443 #foreach( $flags in $dependency.flags )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
444 #if( $flags.exec )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
445 $flags.value > /dev/null
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
446 if [ $? -ne 0 ]; then
210
21274e5950af fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 209
diff changeset
447 $flags.varName="$$flags.varName `$flags.value`"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
448 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
449 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
450 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
451 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
452 #else
210
21274e5950af fix compiler flag generation
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 209
diff changeset
453 $flags.varName="$$flags.varName $flags.value"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
454 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
455 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
456 #if ( $dependency.make.length() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
457 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
458 $dependency.make
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
459 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
460 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
461
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
462 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
463 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
464
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
465 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
466 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
467 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
468
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
469 # add general dependency flags to config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
470 echo >> $TEMP_DIR/config.mk
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
471 if [ ! -z "${CFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
472 echo "CFLAGS += $CFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
473 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
474 if [ ! -z "${CXXFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
475 echo "CXXFLAGS += $CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
476 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
477 if [ ! -z "${LDFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
478 echo "LDFLAGS += $LDFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
479 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
480 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
481
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
482 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
483 # OPTION VALUES
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
484 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
485 #foreach( $opt in $options )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
486 #foreach( $val in $opt.values )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
487 ${val.func}()
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
488 {
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
489 VERR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
490 #foreach( $dep in $val.dependencies )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
491 dependency_$dep
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
492 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
493 VERR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
494 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
495 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
496 if [ $VERR -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
497 return 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
498 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
499 #foreach( $def in $val.defines )
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
500 CFLAGS="$CFLAGS ${def.toFlags()}"
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
501 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
502 #if( $val.hasMake() )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
503 cat >> $TEMP_DIR/make.mk << __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
504 $val.make
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
505 __EOF__
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
506 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
507 return 0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
508 }
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
509 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
510 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
511
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
512 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
513 # TARGETS
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
514 #
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
515 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
516 CXXFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
517 LDFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
518
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
519 #foreach( $target in $targets )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
520 #if ( $target.name )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
521 # Target: $target.name
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
522 #else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
523 # Target
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
524 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
525 CFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
526 LDFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
527 CXXFLAGS=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
528
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
529 #foreach( $dependency in $target.dependencies )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
530 dependency_$dependency
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
531 if [ $? -ne 0 ]; then
207
27f8a41882a7 more buildsystem fixes
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 206
diff changeset
532 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
533 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
534 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
535 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
536
250
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
537 # Features
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
538 #foreach( $feature in $target.features )
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
539 if [ ! -z "$${feature.getVarName()}" ]; then
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
540 #foreach( $dependency in $feature.dependencies )
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
541 # check dependency
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
542 dependency_$dependency
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
543 if [ $? -ne 0 ]; then
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
544 # "auto" features can fail and are just disabled in this case
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
545 if [ $${feature.getVarName()} != "auto" ]; then
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
546 DEPENDENCIES_FAILED="$DEPENDENCIES_FAILED ${dependency} "
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
547 ERROR=1
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
548 fi
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
549 fi
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
550 #end
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
551 fi
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
552 #end
f4d93355b054 update configure script
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 210
diff changeset
553
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
554 #foreach( $opt in $target.options )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
555 # Option: --${opt.argument}
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
556 if [ -z ${D}${opt.getVarName()} ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
557 SAVED_ERROR=$ERROR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
558 SAVED_DEPENDENCIES_FAILED=$DEPENDENCIES_FAILED
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
559 ERROR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
560 while true
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
561 do
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
562 #foreach( $optdef in $opt.defaults )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
563 #if( $optdef.platform )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
564 if isplatform "$optdef.platform"; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
565 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
566 $optdef.func
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
567 if [ $? -eq 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
568 echo " ${opt.argument}: ${optdef.valueName}" >> $TEMP_DIR/options
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
569 ERROR=0
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
570 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
571 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
572 #if( $optdef.platform )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
573 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
574 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
575 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
576 break
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
577 done
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
578 if [ $ERROR -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
579 SAVED_ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
580 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
581 ERROR=$SAVED_ERROR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
582 DEPENDENCIES_FAILED=$SAVED_DEPENDENCIES_FAILED=
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
583 else
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
584 if false; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
585 false
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
586 #foreach( $optval in $opt.values )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
587 elif [ ${D}${opt.getVarName()} = "${optval.value}" ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
588 echo " ${opt.argument}: ${D}${opt.getVarName()}" >> $TEMP_DIR/options
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
589 $optval.func
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
590 if [ $? -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
591 ERROR=1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
592 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
593 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
594 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
595 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
596 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
597
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
598 echo >> $TEMP_DIR/config.mk
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
599 if [ ! -z "${CFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
600 echo "${target.getCFlags()} += $CFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
601 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
602 if [ ! -z "${CXXFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
603 echo "${target.getCXXFlags()} += $CXXFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
604 fi
206
f5bdca63bbe7 fix some incompabilities in configure
Olaf Wintermann <olaf.wintermann@gmail.com>
parents: 204
diff changeset
605 if [ ! -z "${LDFLAGS}" ]; then
204
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
606 echo "${target.getLDFlags()} += $LDFLAGS" >> $TEMP_DIR/config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
607 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
608
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
609 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
610 if [ $ERROR -ne 0 ]; then
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
611 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
612 echo "Error: Unresolved dependencies"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
613 echo $DEPENCIES_FAILED
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
614 rm -Rf $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
615 exit 1
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
616 fi
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
617
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
618 echo "configure finished"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
619 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
620 echo "Build Config:"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
621 echo " PREFIX: $PREFIX"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
622 echo " TOOLCHAIN: $TOOLCHAIN_NAME"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
623 #if ( $options.size() > 0 )
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
624 echo "Options:"
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
625 cat $TEMP_DIR/options
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
626 #end
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
627 echo
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
628 cat $TEMP_DIR/config.mk $TEMP_DIR/make.mk > config.mk
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
629 rm -Rf $TEMP_DIR
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
630
e870a7c8f223 replace old build system with uwproj
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
diff changeset
631

mercurial