1#!/bin/sh
2
3tupConfigurePhase() {
4 runHook preConfigure
5
6 echo -n CONFIG_TUP_ARCH= >> tup.config
7 case "$system" in
8 "i686-*") echo i386 >> tup.config;;
9 "x86_64-*") echo x86_64 >> tup.config;;
10 "powerpc-*") echo powerpc >> tup.config;;
11 "powerpc64-*") echo powerpc64 >> tup.config;;
12 "ia64-*") echo ia64 >> tup.config;;
13 "alpha-*") echo alpha >> tup.config;;
14 "sparc-*") echo sparc >> tup.config;;
15 "aarch64-*") echo arm64 >> tup.config;;
16 "arm*") echo arm >> tup.config;;
17 esac
18
19 echo "${tupConfig-}" >> tup.config
20
21 tup init
22 tup generate --verbose tupBuild.sh
23
24 runHook postConfigure
25}
26
27if [ -z "${dontUseTupConfigure-}" -a -z "${configurePhase-}" ]; then
28 configurePhase=tupConfigurePhase
29fi
30
31
32tupBuildPhase() {
33 runHook preBuild
34
35 pushd .
36 ./tupBuild.sh
37 popd
38
39 runHook postBuild
40}
41
42if [ -z "${dontUseTupBuild-}" -a -z "${buildPhase-}" ]; then
43 buildPhase=tupBuildPhase
44fi