mirror of
https://github.com/HChaZZY/Stockfish.git
synced 2025-12-25 11:36:51 +08:00
Stringify the git info passed
avoid escaping the string in the Makefile. Alternative to https://github.com/official-stockfish/Stockfish/pull/4476 closes https://github.com/official-stockfish/Stockfish/pull/4481 No functional change.
This commit is contained in:
@@ -705,13 +705,13 @@ endif
|
||||
### 3.7.1 Try to include git commit sha for versioning
|
||||
GIT_SHA = $(shell git rev-parse --short HEAD 2>/dev/null)
|
||||
ifneq ($(GIT_SHA), )
|
||||
CXXFLAGS += -DGIT_SHA=\"$(GIT_SHA)\"
|
||||
CXXFLAGS += -DGIT_SHA=$(GIT_SHA)
|
||||
endif
|
||||
|
||||
### 3.7.2 Try to include git commit date for versioning
|
||||
GIT_DATE = $(shell git show -s --date=format:'%Y%m%d' --format=%cd HEAD 2>/dev/null)
|
||||
ifneq ($(GIT_DATE), )
|
||||
CXXFLAGS += -DGIT_DATE=\"$(GIT_DATE)\"
|
||||
CXXFLAGS += -DGIT_DATE=$(GIT_DATE)
|
||||
endif
|
||||
|
||||
### 3.8 Link Time Optimization
|
||||
|
||||
Reference in New Issue
Block a user