ccanlint: Allow path to gcov to be overriden
authorDavid Gibson <david@gibson.dropbear.id.au>
Wed, 18 Jan 2017 03:23:51 +0000 (14:23 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Wed, 18 Jan 2017 23:23:33 +0000 (10:23 +1100)
commitd1827b423b5d30c8ecb184a3186d95d9f134f806
treee3af88a1dece1aeb95cb307afc82a6a4ffe2249e
parentbcb956d9afb054a36c4f481900cdbc6587c4a2bf
ccanlint: Allow path to gcov to be overriden

Currently ccanlint always assumes that the coverage tool can be
invoked under the command "gcov".

However, the coverage tool generally needs to be closely matched to
the compiler version.  So, the current behaviour won't work with
compilers other than gcc, like clang.  It won't even work for a gcc
version which isn't the standard system one matching gcov.

To address this, allow the command for the coverage tool to be
overridden on the ccanlint command line with a new --gcov option.  We
also allow it to be overridden for make check with a GCOV make
variable.

Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Makefile
tools/ccanlint/ccanlint.c
tools/gcov.c
tools/tools.h