diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:53:35 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-06 00:53:35 +0000 |
commit | 69c6a41ffb878ef98c9378ed4b1634a404cfaa7f (patch) | |
tree | b2a4f704565d62fbb129ab9dc3b35977c50e6e7f /Makefile.am | |
parent | Initial commit. (diff) | |
download | knot-69c6a41ffb878ef98c9378ed4b1634a404cfaa7f.tar.xz knot-69c6a41ffb878ef98c9378ed4b1634a404cfaa7f.zip |
Adding upstream version 2.7.6.upstream/2.7.6upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r-- | Makefile.am | 97 |
1 files changed, 97 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am new file mode 100644 index 0000000..b97a74b --- /dev/null +++ b/Makefile.am @@ -0,0 +1,97 @@ +ACLOCAL_AMFLAGS = -I m4 +SUBDIRS = src tests tests-fuzz python samples distro doc + +.PHONY: singlehtml install-singlehtml +singlehtml install-singlehtml: + $(MAKE) -C doc $@ + +.PHONY: check-compile +check-compile: + $(MAKE) $(AM_MAKEFLAGS) -C tests $@ + $(MAKE) $(AM_MAKEFLAGS) -C tests-fuzz $@ + +AM_DISTCHECK_CONFIGURE_FLAGS = + +CODE_COVERAGE_INFO = coverage.info +CODE_COVERAGE_HTML = coverage.html +CODE_COVERAGE_DIRS = \ + src/contrib \ + src/knot \ + src/libdnssec \ + src/libknot \ + src/libzscanner + +code_coverage_quiet = --quiet + +check-code-coverage: +if CODE_COVERAGE_ENABLED + $(MAKE) $(AM_MAKEFLAGS) code-coverage-initial + -$(MAKE) $(AM_MAKEFLAGS) -k check + $(MAKE) $(AM_MAKEFLAGS) code-coverage-capture + $(MAKE) $(AM_MAKEFLAGS) code-coverage-html + $(MAKE) $(AM_MAKEFLAGS) code-coverage-summary +else + @echo "You need to run configure with --enable-code-coverage to enable code coverage" +endif + +code-coverage-initial: +if CODE_COVERAGE_ENABLED + $(LCOV) $(code_coverage_quiet) \ + --no-external \ + $(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(top_builddir)/$(dir)) \ + --capture --initial \ + --ignore-errors source \ + --no-checksum \ + --compat-libtool \ + --output-file $(CODE_COVERAGE_INFO) +else + @echo "You need to run configure with --enable-code-coverage to enable code coverage" +endif + +code-coverage-capture: +if CODE_COVERAGE_ENABLED + $(LCOV) $(code_coverage_quiet) \ + --no-external \ + $(foreach dir, $(CODE_COVERAGE_DIRS), --directory $(builddir)/$(dir)) \ + --capture \ + --ignore-errors source \ + --no-checksum \ + --compat-libtool \ + --output-file $(CODE_COVERAGE_INFO) +else + @echo "You need to run configure with --enable-code-coverage to enable code coverage" +endif + +code-coverage-html: +if CODE_COVERAGE_ENABLED + @echo "Generating code coverage HTML report (this might take a while)" + LANG=C $(GENHTML) $(code_coverage_quiet) \ + --output-directory $(CODE_COVERAGE_HTML) \ + --title "Knot DNS $(PACKAGE_VERSION) Code Coverage" \ + --legend --show-details \ + --ignore-errors source \ + $(CODE_COVERAGE_INFO) +else + @echo "You need to run configure with --enable-code-coverage to enable code coverage" +endif + +code-coverage-summary: +if CODE_COVERAGE_ENABLED + $(LCOV) \ + --summary $(CODE_COVERAGE_INFO) +else + @echo "You need to run configure with --enable-code-coverage to enable code coverage" +endif + +if CODE_COVERAGE_ENABLED +clean-local: code-coverage-clean + -find . -name "*.gcno" -delete +code-coverage-clean: + -$(LCOV) --directory $(top_builddir) -z + -rm -rf $(CODE_COVERAGE_INFO) $(CODE_COVERAGE_HTML) + -find . -name "*.gcda" -o -name "*.gcov" -delete +endif + + +.PHONY: check-code-coverage code-coverage-initial code-coverage-capture code-coverage-html code-coverage-summary code-coverage-clean +.NOTPARALLEL: clean |