#! /bin/sh
# $Id$
+renice +19 -p $$; ionice -c3 -p $$
+
args=""
if [ "$1" = "-a" ];then
args="$args $1"
shift
fi
+out=errs2
+if [ "$1" = "-n" ];then
+ out="$2"
+ shift 2
+fi
+j=""
+cpus="`getconf _NPROCESSORS_ONLN`"
+if [ -n "$cpus" ];then
+ j="-j$[$cpus*3/2]"
+fi
+rm -f $out.ok
(
set -ex
- make "$@"
- ) 2>&1|tee $args errs2
+ time nice make $j "$@"
+ touch $out.ok
+ ) 2>&1|tee $args $out
+test -f $out.ok
+rc=$?
+rm -f $out.ok
+exit $rc