Jason Evans | 748dfac | 2013-12-06 18:27:33 -0800 | [diff] [blame] | 1 | #!/bin/sh |
2 | |||||
3 | set -e | ||||
4 | |||||
5 | objdir=$1 | ||||
6 | suffix=$2 | ||||
7 | shift 2 | ||||
8 | objs=$@ | ||||
9 | |||||
10 | gcov -b -p -f -o "${objdir}" ${objs} | ||||
11 | |||||
12 | # Move gcov outputs so that subsequent gcov invocations won't clobber results | ||||
13 | # for the same sources with different compilation flags. | ||||
14 | for f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do | ||||
15 | mv "${f}" "${f}.${suffix}" | ||||
16 | done |