]> git.zarvox.org Git - crbtree.git/blob - autogen.sh
build: install-tree - move to $builddir
[crbtree.git] / autogen.sh
1 #!/bin/bash
2 set -e
3
4 oldpwd=$(pwd)
5 topdir=$(dirname $0)
6
7 cd $topdir
8 mkdir -p ./build/m4/
9 autoreconf --force --install --symlink
10 cd $oldpwd
11
12 # https://wiki.debian.org/Multiarch/Tuples
13 if [[ "$HOSTTYPE" == "x86_64" ]]; then
14         ARCHITECTURE_TUPLE=x86_64-linux-gnu
15 elif [[ "$HOSTTYPE" == "arm" ]]; then
16         ARCHITECTURE_TUPLE=arm-linux-gnueabihf
17 else
18         echo "Unknown HOSTTYPE"
19         exit 1
20 fi
21
22 if [[ "$1" == "b" ]]; then
23         $topdir/configure --prefix=/usr --libdir=/usr/lib/$ARCHITECTURE_TUPLE
24         make clean
25 elif [[ "$1" = "c" ]]; then
26         $topdir/configure
27         make clean
28 else
29         echo
30         echo "----------------------------------------------------------------"
31         echo "Initialized build system. For a common configuration please run:"
32         echo "----------------------------------------------------------------"
33         echo
34         echo "$topdir/configure"
35         echo
36 fi