| | @@ -15,12 +15,13 @@ |
| 15 | 15 | mkdir -p build/src |
| 16 | 16 | printf 'module Version;\nconst Text* = "%s";\nend Version.\n' "$$(tr -d "'" < build/version.inc)" >$@ |
| 17 | 17 | |
| 18 | | -# The version is git's name for the commit, or VERSION where it is given |
| 18 | +# The version is git's name for the commit (a tag's, or with no tag, as in a |
| 19 | +# shallow fetch, the commit's hash), or VERSION where it is given |
| 19 | 20 | # (make dist REV=... VERSION=0.20.0 packs a release before its tag is |
| 20 | 21 | # pushed, as the tag will); the file changes only when that does, so |
| 21 | 22 | # raz isn't rebuilt for nothing. |
| 22 | 23 | build/version.inc: FORCE | build |
| 23 | | - @v=$(if $(VERSION),$(VERSION),$$(git describe --tags --dirty 2>/dev/null || echo unknown)); \ |
| 24 | + @v=$(if $(VERSION),$(VERSION),$$(git describe --tags --always --dirty 2>/dev/null || echo unknown)); \ |
| 24 | 25 | v="'$${v#v}'"; echo "$$v" | cmp -s - $@ || echo "$$v" >$@ |
| 25 | 26 | |
| 26 | 27 | FORCE: |