Fix with cmd.exe shell

This commit is contained in:
Vas Crabb 2016-06-10 01:27:00 +10:00
parent 15fdafadd2
commit bd4f90db2e

View File

@ -900,7 +900,11 @@ ifeq ($(wildcard .git/*),)
IGNORE_GIT := 1
endif
OLD_GIT_VERSION := $(file <$(GENDIR)/git_desc)
ifeq (posix,$(SHELLTYPE))
OLD_GIT_VERSION := $(shell cat $(GENDIR)/git_desc 2> /dev/null)
else
OLD_GIT_VERSION := $(shell cat $(GENDIR)/git_desc 2> NUL)
endif
ifneq ($(IGNORE_GIT),1)
NEW_GIT_VERSION := $(shell git describe --dirty)
else
@ -1489,7 +1493,7 @@ $(GENDIR)/version.cpp: $(GENDIR)/git_desc | $(GEN_FOLDERS)
@echo 'const char build_version[] = BARE_BUILD_VERSION " ($(NEW_GIT_VERSION))";' >> $@
else
$(GENDIR)/version.cpp: $(GENDIR)/git_desc
@echo \#define BARE_BUILD_VERSION "0.174" > $@
@echo #define BARE_BUILD_VERSION "0.174" > $@
@echo extern const char bare_build_version[]; >> $@
@echo extern const char build_version[]; >> $@
@echo const char bare_build_version[] = BARE_BUILD_VERSION; >> $@