Skip to content

Commit

Permalink
Even when coverage is not configured, clean up old coverage files dur…
Browse files Browse the repository at this point in the history
…ing 'make

distclean'.
  • Loading branch information
PhilipHazel committed Aug 30, 2014
1 parent 9c3deeb commit bff503f
Showing 1 changed file with 17 additions and 3 deletions.
20 changes: 17 additions & 3 deletions Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -145,9 +145,11 @@ dist_noinst_SCRIPTS =
bin_PROGRAMS =
noinst_PROGRAMS =

# Additional files to delete on 'make clean' and 'make maintainer-clean'.
# Additional files to delete on 'make clean', 'make distclean',
# and 'make maintainer-clean'.

CLEANFILES =
DISTCLEANFILES = src/config.h.in~
MAINTAINERCLEANFILES =

# Additional files to bundle with the distribution, over and above what
Expand Down Expand Up @@ -268,13 +270,13 @@ COMMON_SOURCES = \
src/pcre2_context.c \
src/pcre2_dfa_match.c \
src/pcre2_error.c \
src/pcre2_match.c \
src/pcre2_internal.h \
src/pcre2_intmodedep.h \
src/pcre2_jit_compile.c \
src/pcre2_jit_match.c \
src/pcre2_jit_misc.c \
src/pcre2_maketables.c \
src/pcre2_match.c \
src/pcre2_match_data.c \
src/pcre2_newline.c \
src/pcre2_ord2utf.c \
Expand Down Expand Up @@ -589,9 +591,12 @@ EXTRA_DIST += \
CLEANFILES += \
testsavedregex \
teststderr \
teststderrgrep \
testtemp* \
testtry \
testNinput
testtrygrep \
testNinput \
testNinputgrep

## ------------ End of testing -------------

Expand Down Expand Up @@ -704,10 +709,19 @@ distclean-local: coverage-distclean

.PHONY: coverage coverage-baseline coverage-check coverage-report coverage-reset coverage-clean-report coverage-clean-data coverage-clean coverage-distclean

# Without coverage support, still arrange for 'make distclean' to get rid of
# any coverage files that may have been left from a different configuration.

else

coverage:
@echo "Configuring with --enable-coverage is required to generate code coverage report."

DISTCLEANFILES += src/*.gcda src/*.gcno

distclean-local:
rm -rf $(PACKAGE)-$(VERSION)-coverage*

endif # WITH_GCOV

## CMake support
Expand Down

0 comments on commit bff503f

Please sign in to comment.