From 3e8559ad7ba7e9e7b57fac7ea2123803659fcb2c Mon Sep 17 00:00:00 2001 From: Miodrag Milanovic Date: Sat, 16 Apr 2016 17:17:30 +0200 Subject: Always rebuild version.cpp when there is git version change (nw) --- makefile | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'makefile') 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)) -- cgit v1.2.3