summaryrefslogtreecommitdiffstats
path: root/bin/p
blob: 033050330d6f13f963d4dc97b000f6e7edb4af84 (plain) (blame)
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
#!/bin/bash

_configure () {
    ./Configure -des -Dusedevel -DDEBUGGING -Dusethreads -Uversiononly -Accflags="-Wall -Wextra" -Doptimize="-g -O0 -ggdb3"
}

_make () {
    make -j9
}

_test () {
    export TEST_JOBS=9
    if [ -n "$*" ]; then
        make test_harness TEST_FILES="$*"
    else
        make test_harness
    fi
}

cmd=$1
shift

case $cmd in
    configure)
        _configure $@
        ;;
    make)
        _make $@
        ;;
    test)
        _test $@
        ;;
    *)
        echo "Usage: p <command> [args...]" 1>&2
        exit 1
        ;;
esac