Otherwise the 'lcov -q --remove' run fails with the following error:
lcov: ERROR: cannot write to coverage.info!
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
$(RM) $(CLEANSUFFIXES)
$(RM) $(CLEANSUFFIXES:%=tools/%)
$(RM) -r coverage-html
- $(RM) -rf coverage.info lcov
+ $(RM) -rf coverage.info coverage.info.in lcov
distclean::
$(RM) $(DISTCLEANSUFFIXES)
coverage.info: TAG = LCOV
coverage.info:
$(M)lcov -q -d $(CURDIR) -b $(patsubst src%,./,$(SRC_LINK)) --capture | \
- sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@
- $(M)lcov -q --remove $@ "/usr*" -o $@
+ sed "s,$(CURDIR)/\./,$(CURDIR)/," > $@.in
+ $(M)lcov -q --remove $@.in "/usr*" > $@
+ $(Q)$(RM) $@.in
lcov: TAG = GENHTML
lcov: coverage.info