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
|
command.c: include/version.h
|
||||||
|
|
||||||
|
GIT_VERSION := $(shell git describe --always --dirty --tags)
|
||||||
|
VERSION_HEADER := \#define FIRMWARE_VERSION "$(GIT_VERSION)"
|
||||||
|
|
||||||
include/version.h: FORCE
|
include/version.h: FORCE
|
||||||
$(Q)echo " GIT include/version.h"
|
ifneq ($(file <include/version.h), $(VERSION_HEADER))
|
||||||
$(Q)echo "#define FIRMWARE_VERSION \"$(shell git describe --always --dirty --tags)\"" > $@
|
@echo " GEN GIT $@"
|
||||||
|
$(Q)$(file >$@,$(VERSION_HEADER))
|
||||||
|
endif
|
||||||
|
|
||||||
-include *.d
|
-include *.d
|
||||||
|
|
Loading…
Reference in New Issue