Browse Source

update include/version.h only when content changes

pull/1028/head
Jonas Jelten 3 years ago
committed by Rachel Mant
parent
commit
8afaedda37
  1. 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…
Cancel
Save