1#!/bin/sh
2
3set -e
4
5objdir=$1
6suffix=$2
7shift 2
8objs=$@
9
10gcov -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.
14for f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do
15  mv "${f}" "${f}.${suffix}"
16done
17