Commit 18924ab837 for openssl.org
commit 18924ab837cae4153ad64cd94cb31c25fd0ae397
Author: Jakub Zelenka <jakub.zelenka@openssl.foundation>
Date: Mon May 4 11:50:48 2026 +0200
Add coverage files clean up make targets
Reviewed-by: Nikola Pajkovsky <nikolap@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Thu May 7 07:09:02 2026
(Merged from https://github.com/openssl/openssl/pull/31071)
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index 7cfe7eccfb..f4762e3e6a 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -600,6 +600,12 @@ list-tests: ## List available tests that can be invoked via "make test TESTS=<na
##@ Workspace cleaning
+cov-clean: ## Remove all coverage data files
+ -find . \( -name '*.gcda' -o -name '*.gcno' \) \! -type d | xargs $(RM)
+
+cov-reset: ## Remove runtime coverage counters
+ -find . -name '*.gcda' \! -type d | xargs $(RM)
+
libclean:
@set -e; for s in $(SHLIB_INFO); do \
if [ "$$s" = ";" ]; then continue; fi; \
@@ -642,7 +648,7 @@ clean: libclean ## Clean the workspace, keep the configuration
$(RM) providers/fips*.new
-find . -type l \! -name '.*' \! -path './pkcs11-provider/*' -exec $(RM) {} \;
-distclean: clean ## Clean and remove the configuration
+distclean: clean cov-clean ## Clean and remove the configuration
$(RM) include/openssl/configuration.h
$(RM) configdata.pm
$(RM) Makefile