File tree Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Expand file tree Collapse file tree 2 files changed +11
-5
lines changed Original file line number Diff line number Diff line change 1
1
---
2
- refs/heads/master: 2e64a718ea7db51f79a46441907bf659cb761e9c
2
+ refs/heads/master: 4fd7f852e131ad8c9935fd9577c071be5b4635ec
3
3
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4
4
refs/heads/snap-stage3: 6c08cc2db4f98e9f07ae7d50338396c4123c2f0a
5
5
refs/heads/try: 70152ff55722878cde684ee6462c14c65f2c4729
Original file line number Diff line number Diff line change @@ -147,11 +147,17 @@ CFG_VERSION = $(CFG_RELEASE)
147
147
# numbers and dots here
148
148
CFG_VERSION_WIN = 0.9
149
149
150
- ifneq ($(wildcard $(CFG_GIT ) ) ,)
151
- ifneq ($(wildcard $(CFG_GIT_DIR ) ) ,)
152
- CFG_VERSION += $(shell git --git-dir=$(CFG_GIT_DIR ) log -1 \
150
+ # since $(CFG_GIT) may contain spaces (especially on Windows),
151
+ # we need to escape them. (" " to r"\ ")
152
+ # Note that $(subst ...) ignores space after `subst`,
153
+ # so we use a hack: define $(SPACE) which contains space character.
154
+ SPACE :=
155
+ SPACE +=
156
+ ifneq ($(wildcard $(subst $(SPACE ) ,\$(SPACE ) ,$(CFG_GIT ) ) ) ,)
157
+ ifneq ($(wildcard $(subst $(SPACE ) ,\$(SPACE ) ,$(CFG_GIT_DIR ) ) ) ,)
158
+ CFG_VERSION += $(shell git --git-dir='$(CFG_GIT_DIR ) ' log -1 \
153
159
--pretty=format:'(% h % ci) ')
154
- CFG_VER_HASH = $(shell git --git-dir=$(CFG_GIT_DIR ) rev-parse HEAD)
160
+ CFG_VER_HASH = $(shell git --git-dir=' $(CFG_GIT_DIR ) ' rev-parse HEAD)
155
161
endif
156
162
endif
157
163
You can’t perform that action at this time.
0 commit comments