1748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans#!/bin/sh 2748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans 3748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansset -e 4748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans 5748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansobjdir=$1 6748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evanssuffix=$2 7748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansshift 2 8748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansobjs=$@ 9748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans 10748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansgcov -b -p -f -o "${objdir}" ${objs} 11748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans 12748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans# Move gcov outputs so that subsequent gcov invocations won't clobber results 13748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans# for the same sources with different compilation flags. 14748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansfor f in `find . -maxdepth 1 -type f -name '*.gcov'` ; do 15748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evans mv "${f}" "${f}.${suffix}" 16748dfac7788e3cbc2fc6d36196a81d3f002669f6Jason Evansdone 17