Commit be454b72 authored by NY00123's avatar NY00123
Browse files

Common.mak: Check if .git exists before setting REVFLAG

parent 9741acb5
......@@ -1007,20 +1007,22 @@ VC_HASH :=
VC_BRANCH :=
-include EDUKE32_REVISION.mak
ifeq (,$(VC_REV))
VC_REV := $(shell git rev-list --count HEAD 2>&1)
endif
ifeq (,$(VC_HASH))
VC_HASH := $(shell git rev-parse --short=9 HEAD 2>&1)
endif
ifeq (,$(VC_BRANCH))
VC_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>&1)
ifneq (master,$(VC_BRANCH))
VC_REV := $(VC_REV)[$(VC_BRANCH)]
ifeq (.git,$(wildcard .git))
ifeq (,$(VC_REV))
VC_REV := $(shell git rev-list --count HEAD 2>&1)
endif
ifeq (,$(VC_HASH))
VC_HASH := $(shell git rev-parse --short=9 HEAD 2>&1)
endif
ifeq (,$(VC_BRANCH))
VC_BRANCH := $(shell git rev-parse --abbrev-ref HEAD 2>&1)
ifneq (master,$(VC_BRANCH))
VC_REV := $(VC_REV)[$(VC_BRANCH)]
endif
endif
ifneq (,$(VC_REV)$(VC_HASH)$(VC_REV_CUSTOM))
REVFLAG := -DREV="r$(VC_REV)-$(VC_HASH)$(VC_REV_CUSTOM)"
endif
endif
ifneq (,$(VC_REV)$(VC_HASH)$(VC_REV_CUSTOM))
REVFLAG := -DREV="r$(VC_REV)-$(VC_HASH)$(VC_REV_CUSTOM)"
endif
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment