make/configure.vm

Mon, 04 Feb 2019 14:46:11 +0100

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 04 Feb 2019 14:46:11 +0100
changeset 156
62f1a55535e7
child 158
4bde241c49b1
permissions
-rw-r--r--

new build system

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

mercurial