fix "make" build style
[matrix.git] / scripts / run.sh
1 #!/bin/sh
2 #
3 # Copyright (C) 2008 Movial Oy
4 # Authors: Timo Savola <tsavola@movial.fi>
5
6 if [ x"$MAKE" = x ]
7 then
8         MAKE="make"
9 fi
10
11 MAKEFILE="$MATRIX_SCRIPTDIR/matrix.mk"
12 TARGET="__matrix_$MATRIX_ACTION"
13
14 if [ x"$MATRIX_VERBOSE" = x1 ]
15 then
16         "$MAKE" \
17                 --no-print-directory \
18                 -j "$MATRIX_JOBS" \
19                 -C "$MATRIX_WORKDIR" \
20                 -f "$MAKEFILE" \
21                 "$TARGET" \
22                 2>&1 | tee $MATRIX_LOG
23 else
24         exec "$MAKE" \
25                 --no-print-directory \
26                 -j "$MATRIX_JOBS" \
27                 -C "$MATRIX_WORKDIR" \
28                 -f "$MAKEFILE" \
29                 "$TARGET" \
30                 > $MATRIX_LOG 2>&1
31 fi