makefile: Properly detect building with uncommitted changes
This commit is contained in:
parent
076c1ef094
commit
73be1953ee
1 changed files with 4 additions and 4 deletions
8
makefile
8
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
|
||||
|
|
Loading…
Add table
Reference in a new issue