summaryrefslogtreecommitdiff
path: root/verify.sh
blob: c189f2da80d9967c15e8334b577831484254b528 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
#!/bin/bash

if [ -d $HOME/tmp ]; then
    TMPDIR=$HOME/tmp
else
    TMPDIR=/tmp
fi

if [ -d $TMPDIR/ledger ]; then
    sudo rm -fr $TMPDIR/ledger || exit 1
fi

if [ -d $HOME/src/ledger/.git ]; then
    LEDGER_GIT=$HOME/src/ledger
else
    LEDGER_GIT=http://newartisans.com/ledger.git
fi

cd $TMPDIR || exit 1
mkdir ledger || exit 1
cd ledger || exit 1
git clone $LEDGER_GIT local_git || exit 1

function build_distcheck() {
    git clone -l local_git distcheck || exit 1
    cd distcheck || exit 1
    ./acprep --local || exit 1
    make CPPFLAGS="-I/usr/local/include -I/usr/local/include/boost -I/sw/include" \
         LDFLAGS="-L/usr/local/lib -L/sw/lib" distcheck || exit 1
}

function build_ledger() {
    name=$1
    shift 1

    cd $TMPDIR/ledger || exit 1
    git clone -l local_git $name || exit 1
    cd $name || exit 1

    ./acprep --local "$@" || exit 1

    (cd gdtoa && make) || exit 1
    make || exit 1
    make fullcheck || exit 1
}

#build_distcheck

build_ledger normal
build_ledger devel --devel
build_ledger python --python

build_ledger debug --debug
#build_ledger boost_debug --debug --boost d
build_ledger debug_python --debug --python

build_ledger optimized --opt
build_ledger opt_python --opt --python

exit 0