summaryrefslogtreecommitdiffstats
path: root/make/test/build.matrix.darwin
blob: 7620707b520f5811bba1c2b96ca3f3f2976dcce3 (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
#!/bin/bash
#

## This script is used to launch a wide variety of builds for darwin.
## It is unsupported and is meant for use only with build-system testing.

if [ -z "$1" ]; then
    echo "usage: $0 BUILDPREFIX"
    exit 1
fi

set -e
buildprefix=$1

term_make() {
    eval $1="make"
    eval $2="'--disable-xcode'"
}

term_xcode() {
    eval $1="make"
    eval $2=""
}

launch_make() {
    eval $1="launch"
    eval $2="'--launch --launch-jobs=0 --launch-quiet --disable-xcode'"
}

launch_xcode() {
    eval $1="launch"
    eval $2="'--launch --launch-jobs=0 --launch-quiet'"
}

for debug in none max; do
for arch in i386 ppc ppc64 x86_64; do
    for method in launch_make launch_xcode term_make term_xcode; do
        dir=$buildprefix.$arch.$debug.$method
        if [ -d $dir ]; then
            echo "skipping $dir"
            continue
        fi

        $method mode args

        cmd="./configure --arch=$arch --debug=$debug --build=$dir $args"
        echo $cmd | awk '{ \
            trail = ""; \
            for( i = 4; i <= NF; i++ ) \
                trail = trail " " $i; \
            printf("%-11s %-13s %-30s%s\n", $1, $2, $3, trail) }'

        $cmd
        if [ "$mode" = "make" ]; then
            (set -x; cd $dir && make -j8 >& log/build.txt)
        fi
    done
done
done