aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile11
1 files changed, 8 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index df09cae..a36e9de 100644
--- a/Makefile
+++ b/Makefile
@@ -1,5 +1,10 @@
-forge: templates.ha *.ha
- hare build -o $@ .
+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