mirror of
https://github.com/madler/zlib
synced 2025-03-28 21:13:15 +00:00
Disable make cover if no gcov was found.
This commit is contained in:
parent
039c3610e5
commit
e677f1f1c7
@ -121,9 +121,13 @@ infcover: infcover.o libz.a
|
||||
$(CC) $(CFLAGS) -coverage -o $@ infcover.o libz.a
|
||||
|
||||
cover: infcover
|
||||
ifdef $(GCOV)
|
||||
rm -f *.gcda
|
||||
${QEMU_RUN} ./infcover
|
||||
${GCOV} ${LLVM_GCOV_FLAG} inf*.c -o ./infcover.gcda
|
||||
else
|
||||
@echo 'cover disabled as no suitable gcov was found'
|
||||
endif
|
||||
|
||||
libz.a: $(OBJS)
|
||||
$(AR) $(ARFLAGS) $@ $(OBJS)
|
||||
|
14
configure
vendored
14
configure
vendored
@ -200,25 +200,27 @@ esac
|
||||
|
||||
if test "$clang" -eq 1; then
|
||||
if test "$cc" = "clang"; then
|
||||
if `llvm-cov --version > /dev/null`; then
|
||||
GCOV="llvm-cov-${clangV}"
|
||||
if which -s llvm-cov; then
|
||||
GCOV="llvm-cov"
|
||||
LLVM_GCOV_FLAG="gcov"
|
||||
GCOV="llvm-cov"
|
||||
LLVM_GCOV_FLAG="gcov"
|
||||
echo "Using ${GCOV} for coverage"
|
||||
else
|
||||
cover=0
|
||||
GCOV=""
|
||||
LLVM_GCOV_FLAG=""
|
||||
echo "Deactivating cover as no suitable gcov can be found"
|
||||
fi
|
||||
GCOV="llvm-cov"
|
||||
LLVM_GCOV_FLAG="gcov"
|
||||
echo "Using ${GCOV} for coverage"
|
||||
else
|
||||
clangV=`echo "$cc" | sed -e 's/^.*-//'`
|
||||
if `llvm-cov-${clangV} --version > /dev/null`; then
|
||||
if which -s llvm-cov-${clangV}; then
|
||||
GCOV="llvm-cov-${clangV}"
|
||||
LLVM_GCOV_FLAG="gcov"
|
||||
echo "Using ${GCOV} for coverage"
|
||||
else
|
||||
cover=0
|
||||
GCOV=""
|
||||
LLVM_GCOV_FLAG=""
|
||||
echo "Deactivating cover as no suitable gcov can be found"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user