From 49ece9f791b84a261f2a8865d2de51c20a520bc6 Mon Sep 17 00:00:00 2001 From: Joost VandeVondele Date: Mon, 23 Oct 2023 19:42:08 +0200 Subject: [PATCH] Follow up Makefile changes for clang-format as reported on various OS, these changes help portability closes https://github.com/official-stockfish/Stockfish/pull/4844 No functional change. --- src/Makefile | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Makefile b/src/Makefile index 76ef6fdeb8d..59ea7bfe7b5 100644 --- a/src/Makefile +++ b/src/Makefile @@ -153,7 +153,7 @@ dotprod = no arm_version = 0 STRIP = strip -ifneq ($(shell command -v clang-format-17),) +ifneq ($(shell which clang-format-17 2> /dev/null),) CLANG-FORMAT = clang-format-17 else CLANG-FORMAT = clang-format @@ -854,7 +854,8 @@ endif objclean profileclean config-sanity \ icx-profile-use icx-profile-make \ gcc-profile-use gcc-profile-make \ - clang-profile-use clang-profile-make FORCE + clang-profile-use clang-profile-make FORCE \ + format analyze analyze: net config-sanity objclean $(MAKE) -k ARCH=$(ARCH) COMP=$(COMP) $(OBJS) @@ -951,7 +952,7 @@ net: netvariables fi; \ format: - $(CLANG-FORMAT) -i $(SRCS) $(HEADERS) -style=file:../.clang-format + $(CLANG-FORMAT) -i $(SRCS) $(HEADERS) -style=file # default target default: