Skip to content
Snippets Groups Projects
Makefile.version 508 B
Newer Older
# if it is not a git version, it has to be an opam version!
SHA:=$(shell git log -1 --pretty=format:"%h" || echo "opam")
BRANCH:=$(shell git branch | grep "*" | cut -d ' ' -f 2 || basename `pwd` | echo "opam")
VERSION=$(shell git describe --tags || basename `pwd` | cut -d '.' -f2-4)
erwan's avatar
erwan committed
	rm -f lib/lutilsVersion.ml
erwan's avatar
erwan committed
lib/lutilsVersion.ml:
	echo "let str=\"$(VERSION)\"" > lib/lutilsVersion.ml ; \
	echo "let sha=\"$(SHA)\"" >> lib/lutilsVersion.ml