# 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) del_version: rm -f lib/lutilsVersion.ml gen_version: del_version src/lutilsVersion.ml lib/lutilsVersion.ml: echo "let str=\"$(VERSION)\"" > lib/lutilsVersion.ml ; \ echo "let sha=\"$(SHA)\"" >> lib/lutilsVersion.ml