From 20b61d2fd49008f6431ace0f7d4886f70a502331 Mon Sep 17 00:00:00 2001 From: Niklas Fiekas Date: Thu, 9 Apr 2026 21:42:57 +0200 Subject: [PATCH] Fix shell escaping in misc.o rule After 415f2ef1. Now works again with CXX paths like `A:\path\to\g++` under MSYS2. The cache files are no longer read in the rule itself and only used as markers for change detection. closes https://github.com/official-stockfish/Stockfish/pull/6699 No functional change --- src/Makefile | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/Makefile b/src/Makefile index c46505d88..f5d0d3c03 100644 --- a/src/Makefile +++ b/src/Makefile @@ -1143,16 +1143,8 @@ $(EXE): $(OBJS) %.o: %.cpp $(strip $(CXX) $(CPPFLAGS) $(CXXFLAGS)) -c -o $@ $< -# Cache git metadata when available, otherwise cache the compiler date. misc.o: misc.cpp $(BUILD_SHA_FILE) $(BUILD_DATE_FILE) - @sha="$$(cat $(BUILD_SHA_FILE))"; \ - set -- $(CXX) $(CPPFLAGS) $(CXXFLAGS); \ - test -n "$$sha" && set -- "$$@" -DGIT_SHA=$$sha; \ - test -n "$(GIT_DATE)" && set -- "$$@" -DGIT_DATE=$(GIT_DATE); \ - set -- "$$@" -c $< -o $@; \ - printf '%s ' "$$@"; \ - printf '\n'; \ - "$$@" + $(strip $(CXX) $(CPPFLAGS) $(CXXFLAGS) $(if $(GIT_SHA),-DGIT_SHA=$(GIT_SHA)) $(if $(GIT_DATE),-DGIT_DATE=$(GIT_DATE))) -c -o $@ $< clang-profile-make: $(MAKE) ARCH=$(ARCH) COMP=$(COMP) \