Makefile.version.hide 1.64 KB
Newer Older
Erwan Jahier's avatar
Erwan Jahier committed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#
# When incrementing that version number, please don't forget to
# fill-in the RELEASE-NOTES file (using the git history).
#
# In order to put it on the web site, from the source dir, do
# $ make install (to update the version number used in -version options of command-line tools)
# $ make test (as usual)
# $ make rel (to build the various tgz)
# $ make test-rel (to test them)
# $ make www (to copy the tgz on the web site)
# $ make verimag (to install that version in /usr/local/tools/lustre-misc/)
#
# Then, once everything is done, tag the current git HEAD:
# $ git tag 1.42


Erwan Jahier's avatar
Erwan Jahier committed
17
18

# the sha is still automatic tough!
19
SHA:=`git log -1 --pretty=format:"%h"`
20
COMMIT_NB:=$(shell git log --pretty=oneline  | wc -l | sed 's/.*/\0 - 522/' | bc)
Erwan Jahier's avatar
Erwan Jahier committed
21
22


23
24
25
26
27
# I've move from 1 to 2 at commit 253
PRE_COMMIT_NB:=$(shell echo $(COMMIT_NB) - 1 | bc)
PRE_VERSION:=2.$(PRE_COMMIT_NB)
VERSION:=2.$(COMMIT_NB)

28
29
30
echover:
	echo "VERSION=$(VERSION)"
	echo "PRE_VERSION=$(PRE_VERSION)"
31
32

lutin/src/version.ml:
Erwan Jahier's avatar
Erwan Jahier committed
33
	cd $(LURETTE_PATH) ; \
34
35
	echo "let str=\"$(VERSION)\"" > lutin/src/version.ml ; \
	echo "let sha=\"$(SHA)\"" >> lutin/src/version.ml ; \
Erwan Jahier's avatar
Erwan Jahier committed
36
37
	rm -f version.tex ; \
	date +VERSION_DATE=%d-%m-%y > version.tex ; \
38
	echo "\\\newcommand{\\\version}{$(VERSION)}" > doc/version.tex ; \
39
40
	echo "\\\newcommand{\\\sha}{$(SHA)}" >> doc/version.tex ; \
	echo "\\\newcommand{\\\versionname}{Trilby}" >> doc/version.tex ; \
Erwan Jahier's avatar
Erwan Jahier committed
41
	echo "\\\newcommand{\\\commitnb}{$(COMMIT_NB)}" >> doc/version.tex ; \
42
	echo "\\\newcommand{\\\versiondate}{`date +%d-%m-%y`}" >> doc/version.tex ;\
43
	[ -d doc/lutin-man/objs ] || mkdir doc/lutin-man/objs; \
44
   cp doc/version.tex doc/lutin-man/objs/ ;\
45
   cp doc/version.tex doc/lutin-man/