summaryrefslogtreecommitdiffstatshomepage
path: root/makefile
diff options
context:
space:
mode:
author Miodrag Milanovic <mmicko@gmail.com>2016-04-16 17:17:30 +0200
committer Miodrag Milanovic <mmicko@gmail.com>2016-04-16 17:18:17 +0200
commit3e8559ad7ba7e9e7b57fac7ea2123803659fcb2c (patch)
tree656a0ad2fa4f9832befe6edc1807b9a2d2bb66e6 /makefile
parent37718e8602904d51f9132be80e2977f27cd956f5 (diff)
Always rebuild version.cpp when there is git version change (nw)
Diffstat (limited to 'makefile')
-rw-r--r--makefile11
1 files changed, 11 insertions, 0 deletions
diff --git a/makefile b/makefile
index 3488a7a106d..40eab7364c3 100644
--- a/makefile
+++ b/makefile
@@ -876,6 +876,17 @@ ifeq ($(wildcard .git/*),)
PARAMS += --IGNORE_GIT='1'
endif
+ifeq ($(GIT_AVAILABLE),git)
+NEW_GIT_VERSION := $(shell git describe)
+OLD_GIT_VERSION := $(shell cat .mame_version)
+
+ifneq ($(NEW_GIT_VERSION),$(OLD_GIT_VERSION))
+$(shell git describe > .mame_version)
+$(shell touch $(SRC)/version.cpp)
+endif
+endif
+
+
GENIE := 3rdparty/genie/bin/$(GENIEOS)/genie$(EXE)
ifeq ($(TARGET),$(SUBTARGET))