#!/bin/bash shift # get rid of the '-c' supplied by make. log=/tmp/make-cmds.log echo running "$*" >> $log time /bin/bash -c "$*" 2>&1 | tee -a $log