From: Ralph Ronnquist Date: Wed, 12 May 2021 05:02:21 +0000 (+1000) Subject: added auto-versioning X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=3260137f947f79448a6167123d28dfbdc67d6db0;p=rrq%2Frrqforth.git added auto-versioning --- diff --git a/Makefile b/Makefile index 012248a..39e68f2 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,14 @@ BINARY = rrqforth -rrqforth: main.fasm +default: rrqforth + +version: main.fasm + git log --pretty=format:"msg db 'RRQ Forth version %h at %aI'" $< > $@ + echo "\ndb 10" >> $@ + +rrqforth: main.fasm | version fasm $^ $@ + chmod a+x $@ +clean: + rm -f version rrqforth diff --git a/main.fasm b/main.fasm index 6bd525a..dd4f30d 100644 --- a/main.fasm +++ b/main.fasm @@ -3,8 +3,7 @@ entry main segment readable executable - msg db 'hello world.' - db 10 + include 'version' length = $ - msg main: