]> git.sesse.net Git - stockfish/commitdiff
Follow up Makefile changes for clang-format
authorJoost VandeVondele <Joost.VandeVondele@gmail.com>
Mon, 23 Oct 2023 17:42:08 +0000 (19:42 +0200)
committerDisservin <disservin.social@gmail.com>
Mon, 23 Oct 2023 18:39:48 +0000 (20:39 +0200)
as reported on various OS, these changes help portability

closes https://github.com/official-stockfish/Stockfish/pull/4844

No functional change.

src/Makefile

index 76ef6fdeb8d6865c5b6a99deed861e5872aa488e..59ea7bfe7b5fa768f977ca1b21cdbc153b9be206 100644 (file)
@@ -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: