vanhofen
6 years ago
1 changed files with 19 additions and 0 deletions
@ -0,0 +1,19 @@ |
|||
#!/bin/bash |
|||
|
|||
# makelog - Redirect make's output into logfile |
|||
|
|||
usage() { |
|||
echo "Usage: makelog <target>..." |
|||
} |
|||
|
|||
test "$1" == "--help" && { usage; exit 0; } |
|||
test -z "$1" && { usage; exit 1; } |
|||
|
|||
logfile=$(mktemp makelog.XXXXXX) |
|||
trap "rm -f $logfile" EXIT |
|||
|
|||
time make S=1 $* 2>&1 | tee $logfile |
|||
|
|||
mkdir -p build_tmp |
|||
echo -e "\nmake $*:\n" >> build_tmp/make.log |
|||
cat $logfile >> build_tmp/make.log |
Loading…
Reference in new issue