Newer
Older
Erwan Jahier
committed
# can oasis do all this stuff?
SHA:=$(shell git log -1 --pretty=format:"%h")
COMMIT_NB:=$(shell git log --pretty=oneline | wc -l)
Erwan Jahier
committed
VERSION:=1.$(COMMIT_NB)
Erwan Jahier
committed
del_version:
rm -f lutils/src/lutilsVersion.ml
gen_version: del_version src/lutilsVersion.ml
Erwan Jahier
committed
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