Makefile: git-describe using --tags

Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
Hector Martin 2022-03-17 16:22:13 +09:00
parent d4635f60e2
commit b64a6b9321

View file

@ -172,7 +172,7 @@ build/$(NAME).bin: build/$(NAME)-raw.elf
update_tag: update_tag:
@mkdir -p build @mkdir -p build
@echo "#define BUILD_TAG \"$$(git describe --always --dirty)\"" > build/build_tag.tmp @echo "#define BUILD_TAG \"$$(git describe --tags --always --dirty)\"" > build/build_tag.tmp
@cmp -s build/build_tag.h build/build_tag.tmp 2>/dev/null || \ @cmp -s build/build_tag.h build/build_tag.tmp 2>/dev/null || \
( mv -f build/build_tag.tmp build/build_tag.h && echo " TAG build/build_tag.h" ) ( mv -f build/build_tag.tmp build/build_tag.h && echo " TAG build/build_tag.h" )