Commit 70741ee62a for openssl.org
commit 70741ee62a50a34322818712f390e24fa085c637
Author: Nikola Pajkovsky <nikolap@openssl.org>
Date: Tue May 5 10:20:57 2026 +0200
Configurations/unix-Makefile.tmpl: make cleanup faster
Walk the source tree once instead of thrice when removing generated
dependency files, object files, and symlinks; avoid descending into
submodules.
Co-Authored-by: Eugene Syromiatnikov <esyr@openssl.org>
Signed-off-by: Nikola Pajkovsky <nikolap@openssl.org>
Signed-off-by: Eugene Syromiatnikov <esyr@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.foundation>
MergeDate: Thu May 21 09:02:44 2026
(Merged from https://github.com/openssl/openssl/pull/31212)
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index f4762e3e6a..de345a5e8a 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -640,13 +640,30 @@ clean: libclean ## Clean the workspace, keep the configuration
$(RM) $(MANDOCS7)
$(RM) $(PROGRAMS) $(TESTPROGS) $(MODULES) $(FIPSMODULE) $(SCRIPTS)
$(RM) $(GENERATED_MANDATORY) $(GENERATED)
- -find . -name '*{- platform->depext() -}' \! -name '.*' \! -type d -exec $(RM) {} \;
- -find . -name '*{- platform->objext() -}' \! -name '.*' \! -type d -exec $(RM) {} \;
$(RM) core
$(RM) tags TAGS doc-nits md-nits
$(RM) -r $(RESULT_D)
$(RM) providers/fips*.new
- -find . -type l \! -name '.*' \! -path './pkcs11-provider/*' -exec $(RM) {} \;
+ # Remove the generated dependency files, object files, and symlinks
+ # in a single pass, avoid descending into submodules.
+ -find . \( -path './cloudflare-quiche' \
+ -o -path './fuzz/corpora' \
+ -o -path './gost-engine' \
+ -o -path './krb5' \
+ -o -path './oqs-provider' \
+ -o -path './pkcs11-provider' \
+ -o -path './pyca-cryptography' \
+ -o -path './python-ecdsa' \
+ -o -path './tlsfuzzer' \
+ -o -path './tlslite-ng' \
+ -o -path './wycheproof' \
+ -prune \) \
+ -o \! -type d \
+ \( -name '*{- platform->depext() -}' \
+ -o -name '*{- platform->objext() -}' \
+ -o -type l \) \
+ \! -name '.*' \
+ -exec $(RM) '{}' +
distclean: clean cov-clean ## Clean and remove the configuration
$(RM) include/openssl/configuration.h