summaryrefslogtreecommitdiff
path: root/librewolf/debian/dh
blob: 5b43536dd49f0d1cd38d10a705d15f566bf0a7b8 (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
#!/bin/sh

# Wrapper around dh to enable parallelism in debian/rules if not already
# enabled.

case "$MAKEFLAGS" in
*-j*)
    # Already enabled, do nothing.
    ;;
*)
    parallel=
    for opt in "$DEB_BUILD_OPTIONS"; do
        case "$opt" in
        parallel=*)
            parallel=${opt#parallel=}
            ;;
        esac
    done
    if [ -n "$parallel" ]; then
        export MAKEFLAGS="-j$parallel${MAKEFLAGS:+ $MAKEFLAGS}"
    fi
    ;;
esac

exec dh "$@"
bgstack15