Skip to content
Snippets Groups Projects
Makefile.version 614 B
Newer Older

# can oasis do all this stuff?
SHA:=`git log -1 --pretty=format:"%h"`
COMMIT_NB:=`git log --pretty=oneline  | wc -l`

VERSION:=1.0.$(COMMIT_NB)

gen_version:
	rm -f src/lv6version.ml


src/lv6version.ml: Makefile
	echo "(** Automatically generated from Makefile *) " > $@
	echo "let tool = \"lus2lic\"" >> $@
	echo "let branch = \"$(shell utils/get_branch_name)\"" >> $@
	echo "let commit = \"$(shell utils/get_commit_number)\"" >> $@
	echo "let sha_1 = \"$(shell utils/get_sha_1)"\">> $@
	echo "let str = (branch ^ \".\" ^ commit ^ \" (\" ^ sha_1 ^ \")\")">> $@
	echo "let maintainer = \"jahier@imag.fr\"">> $@