Commit c8f0b1d9 authored by Richard Gobeille's avatar Richard Gobeille
Browse files

Makefile: don't bother trying to fill VC_REV, VC_HASH, and VC_BRANCH if we...

Makefile: don't bother trying to fill VC_REV, VC_HASH, and VC_BRANCH if we don't even have a .git directory
parent 6e1c3839
......@@ -1007,22 +1007,23 @@ 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)]
ifneq (,$(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
##### Allow standard environment variables to take precedence, to help package maintainers.
......
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