update include/version.h only when content changes
This commit is contained in:
parent
0a0f5a9dd7
commit
8afaedda37
10
src/Makefile
10
src/Makefile
|
@ -162,7 +162,13 @@ all_platforms:
|
|||
|
||||
command.c: include/version.h
|
||||
|
||||
GIT_VERSION := $(shell git describe --always --dirty --tags)
|
||||
VERSION_HEADER := \#define FIRMWARE_VERSION "$(GIT_VERSION)"
|
||||
|
||||
include/version.h: FORCE
|
||||
$(Q)echo " GIT include/version.h"
|
||||
$(Q)echo "#define FIRMWARE_VERSION \"$(shell git describe --always --dirty --tags)\"" > $@
|
||||
ifneq ($(file <include/version.h), $(VERSION_HEADER))
|
||||
@echo " GEN GIT $@"
|
||||
$(Q)$(file >$@,$(VERSION_HEADER))
|
||||
endif
|
||||
|
||||
-include *.d
|
||||
|
|
Loading…
Reference in New Issue