build: improve 'coverage' target

Ensure we compile everything first.
This commit is contained in:
Dirk-Jan C. Binnema 2023-07-18 20:10:24 +03:00
parent e8462e0204
commit 5efd0a61aa
1 changed files with 2 additions and 1 deletions

View File

@ -116,8 +116,9 @@ $(BUILDDIR_COVERAGE):
covfile:=$(BUILDDIR_COVERAGE)/meson-logs/coverage.info
# generate by hand, meson's built-ins are unflexible
# generate by hand, meson's built-ins are rather inflexible
coverage: $(BUILDDIR_COVERAGE)
@$(MESON) compile -C $(BUILDDIR_COVERAGE)
@$(MESON) test -C $(BUILDDIR_COVERAGE) $(VERBOSE)
$(LCOV) --capture --directory . --output-file $(covfile)
@$(LCOV) --remove $(covfile) '/usr/*' '*guile*' '*thirdparty*' '*/tests/*' '*mime-object*' --output $(covfile)