Make Makefile compatible with builds on Windows

This commit is contained in:
phl0 2017-04-17 23:01:19 +02:00
parent 8b31a53e4e
commit 1d6ca99df9
No known key found for this signature in database
GPG Key ID: 48EA1E640798CA9A
1 changed files with 6 additions and 0 deletions

View File

@ -188,8 +188,14 @@ endif
# Export the current git version if the index file exists, else 000... # Export the current git version if the index file exists, else 000...
GitVersion.h: GitVersion.h:
ifdef SYSTEMROOT
echo #define GITVERSION "0000000" > $@
else ifdef SystemRoot
echo #define GITVERSION "0000000" > $@
else
ifneq ("$(wildcard .git/index)","") ifneq ("$(wildcard .git/index)","")
echo "#define GITVERSION \"$(shell git rev-parse --short HEAD)\"" > $@ echo "#define GITVERSION \"$(shell git rev-parse --short HEAD)\"" > $@
else else
echo "#define GITVERSION \"0000000\"" > $@ echo "#define GITVERSION \"0000000\"" > $@
endif endif
endif