From 8ac5d77d1ca043ee07660b3cccf432ab5c363630 Mon Sep 17 00:00:00 2001 From: Daniel McCarney Date: Thu, 4 Apr 2024 12:12:47 -0400 Subject: [PATCH] Makefile: limit scope of format/format-check We don't want `.git` or `target/` or other misc dirs to be subject to these phony targets. --- Makefile | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 0f708639..1ae8e3df 100644 --- a/Makefile +++ b/Makefile @@ -62,17 +62,15 @@ clean: rm -rf target format: - find . \ + find src tests \ -name '*.[c|h]' \ - ! -path "./target/*" \ - ! -wholename './src/rustls.h' | \ + ! -wholename 'src/rustls.h' | \ xargs clang-format -i format-check: - find . \ + find src tests \ -name '*.[c|h]' \ - ! -path "./target/*" \ - ! -wholename './src/rustls.h' | \ + ! -wholename 'src/rustls.h' | \ xargs clang-format --dry-run -Werror -i .PHONY: all clean test integration format format-check