From 993717127039160835f673e434dcd67b4fff73d0 Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Sat, 15 Mar 2025 18:45:33 +0800 Subject: Generate VERSION from git describe --- Makefile | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'Makefile') diff --git a/Makefile b/Makefile index 7c71e4f..a36e9de 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,10 @@ -forge: templates.ha *.ha +forge: .version.ha .templates.ha *.ha hare build $(HAREFLAGS) -o $@ . -templates.ha: templates/*.htmpl +.templates.ha: templates/*.htmpl htmplgen -o $@ $^ + +.version.ha: + printf 'def VERSION="%s";\n' $(shell git describe --tags --always --dirty) > $@ + +.PHONY: version.ha -- cgit v1.2.3