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
This commit is contained in:
Niklas Fiekas
2026-04-09 21:53:08 +02:00
committed by Disservin
parent 93ba8fb35e
commit 20b61d2fd4
+1 -9
View File
@@ -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) \