Commit 90d6c3b260 for openssl.org
commit 90d6c3b260409101e5be31fedb7677e1c2448e4c
Author: Neil Horman <nhorman@openssl.org>
Date: Wed Jan 14 08:15:36 2026 -0500
Fix make check-format target
With our move to clang-format we no longer have a check-format script,
and so this make target is broken.
Fix it up to use clang-format-diff instead
Fixes #29594
Reviewed-by: Saša NedvÄ›dický <sashan@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Tim Hudson <tjh@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
MergeDate: Fri Jan 16 14:37:09 2026
(Merged from https://github.com/openssl/openssl/pull/29634)
diff --git a/Configurations/unix-Makefile.tmpl b/Configurations/unix-Makefile.tmpl
index b6a7810766..3d8df76989 100644
--- a/Configurations/unix-Makefile.tmpl
+++ b/Configurations/unix-Makefile.tmpl
@@ -1180,10 +1180,18 @@ lint: ## Evaluate C code via "splint"
echo splint -DLINT -posixlib -preproc -D__gnuc_va_list=void \
-I. -Iinclude -Iapps/include $(CRYPTOHEADERS) $(SSLHEADERS) $(SRCS) )
-.PHONY: check-format
-check-format: ## Evaluate C code according to OpenSSL coding standards
- ( cd $(SRCDIR); $(PERL) util/check-format.pl \
- $(SRCS) \$(CRYPTOHEADERS) $(SSLHEADERS) )
+CLANG_FORMAT_DIFF = clang-format-diff
+
+.PHONY: check-format check-clang-format-diff-cmd
+check-clang-format-diff-cmd:
+ @if ! command -v "$(CLANG_FORMAT_DIFF)" >/dev/null; then \
+ echo "Unable to find ${CLANG_FORMAT_DIFF}";\
+ echo "Please set the CLANG_FORMAT_DIFF variable to your clang-format-diff command";\
+ exit 1;\
+ fi
+
+check-format: check-clang-format-diff-cmd ## Evaluate C code according to OpenSSL coding standards
+ ( cd $(SRCDIR); git diff -U0 --no-prefix --no-color | $(CLANG_FORMAT_DIFF) )
generate_apps:
( cd $(SRCDIR); $(PERL) VMS/VMSify-conf.pl \