diff --git a/makefile b/makefile index 93f21eb0..dc48830b 100644 --- a/makefile +++ b/makefile @@ -290,10 +290,10 @@ ifeq (${WIN32},) #*nix Environments (&& cygwin) else NEED_COMMIT_ID = need-commit-id endif - ifeq (need-commit-id,$(NEED_COMMIT_ID)) - ifneq (,$(shell git update-index --refresh --)) - GIT_EXTRA_FILES=+uncommitted-changes - endif + ifneq (,$(shell git update-index --refresh --)) + GIT_EXTRA_FILES=+uncommitted-changes + endif + ifneq (,$(or $(NEED_COMMIT_ID),$(GIT_EXTRA_FILES))) isodate=$(shell git log -1 --pretty="%ai"|sed -e 's/ /T/'|sed -e 's/ //') $(shell git log -1 --pretty="SIM_GIT_COMMIT_ID %H$(GIT_EXTRA_FILES)%nSIM_GIT_COMMIT_TIME $(isodate)" >.git-commit-id) endif