Skip to content
Snippets Groups Projects
Makefile.version 733 B
Newer Older
SHA:=$(shell git log -1 --pretty=format:"%h")
COMMIT_NB:=$(shell git log --pretty=oneline  | wc -l)
gen_version: del_version src/lutilsVersion.ml 

src/lutilsVersion.ml:
	echo "let str=\"$(VERSION)\"" > src/lutilsVersion.ml ; \
	echo "let sha=\"$(SHA)\"" >> src/lutilsVersion.ml ; \
	rm -f version.tex ; \
	date +VERSION_DATE=%d-%m-%y > version.tex ; \
	echo "\\\newcommand{\\\version}{$(VERSION)}" > doc/version.tex ; \
	echo "\\\newcommand{\\\sha}{$(SHA)}" >> doc/version.tex ; \
	echo "\\\newcommand{\\\versionname}{none}" >> doc/version.tex ; \
	echo "\\\newcommand{\\\versiondate}{`date +%d-%m-%y`}" >> doc/version.tex