Skip to content
Snippets Groups Projects
Commit 4f6f011b authored by Erwan Jahier's avatar Erwan Jahier
Browse files

Generate version number automatically for _oasis (and thus opam) too.

parent 3d1950fa
No related branches found
No related tags found
No related merge requests found
......@@ -12,6 +12,7 @@ build: setup.data src/lutilsVersion.ml
setup.ml:_oasis
oasis setup
setup.data:configure
configure: setup.ml
ocaml setup.ml -configure --exec-prefix $(BIN_INSTALL)
......@@ -29,6 +30,7 @@ reinstall:
clean:
ocaml setup.ml -clean
rm setup.data
rm src/lutilsVersion.ml
distclean:
ocaml setup.ml -distclean
......@@ -43,5 +45,26 @@ NO_TAGS=gnuplotRif.ml
tags:
$(OTAGS) -v $(shell ocamlc -where)/*.mli $(shell ls src/*.ml | grep -v $(NO_TAGS))
###############################
# opam-ing
NAME=lutils
PACKNAME=$(NAME).$(VERSION)
WWW=/import/www/DIST-TOOLS/SYNCHRONE
HTTP=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE
$(PACKNAME).tgz:
git archive --prefix=$(PACKNAME)/ -o $(PACKNAME).tgz HEAD
$(WWW)/pool/$(PACKNAME).tgz: $(PACKNAME).tgz
mv $^ $@
opam : $(WWW)/pool/$(PACKNAME).tgz
cd $(WWW)/opam-repository/packages && \
oasis2opam $(HTTP)/pool/$(PACKNAME).tgz && \
cd .. ; opam-admin check && opam-admin make -g
-include ./Makefile.local
# can oasis do all this stuff?
SHA:=`git log -1 --pretty=format:"%h"`
COMMIT_NB:=`git log --pretty=oneline | wc -l`
SHA:=$(shell git log -1 --pretty=format:"%h")
COMMIT_NB:=$(shell git log --pretty=oneline | wc -l)
VERSION:=1.0.$(COMMIT_NB)
VERSION:=1.$(COMMIT_NB)
del_version:
rm -f lutils/src/lutilsVersion.ml
gen_version: del_version src/lutilsVersion.ml
gen_version: del_version src/lutilsVersion.ml
src/lutilsVersion.ml:
echo "let str=\"$(VERSION)\"" > src/lutilsVersion.ml ; \
......
OASISFormat: 0.4
Name: lutils
Version: 1.0
Version: 1.4
Authors: Erwan Jahier
Maintainers: erwan.jahier@imag.fr
License: GPL-3
......@@ -36,3 +36,9 @@ Library lutils
Modules: RifIO,Data,LocalGenlex,GnuplotRif,Mypervasives,Luciole,LutilsVersion
Install: true
XMETAEnable: true
SourceRepository "master"
Type: git
Location: https://forge.imag.fr/anonscm/git/lutils/lutils.git
Branch: master
Browser: https://forge.imag.fr/projects/lutils/
# OASIS_START
# DO NOT EDIT (digest: 1fc8fa2a99309239571ced5b0d82b828)
# DO NOT EDIT (digest: 921e300846e9ed7b61c55c01b929ae28)
# Ignore VCS directories, you can use the same kind of rule outside
# OASIS_START/STOP if you want to exclude directories that contains
# useless stuff for the build process
......@@ -15,16 +15,16 @@ true: annot, bin_annot
"_darcs": -traverse
"_darcs": not_hygienic
# Executable gnuplot-rif
"src/gnuplotrif.native": package(camlp4)
"src/gnuplotrif.native": package(num)
"src/gnuplotrif.native": package(str)
"src/gnuplotrif.native": package(unix)
"src/gnuplotrif.native": pkg_camlp4
"src/gnuplotrif.native": pkg_num
"src/gnuplotrif.native": pkg_str
"src/gnuplotrif.native": pkg_unix
# Library lutils
"src/lutils.cmxs": use_lutils
<src/*.ml{,i,y}>: package(camlp4)
<src/*.ml{,i,y}>: package(num)
<src/*.ml{,i,y}>: package(str)
<src/*.ml{,i,y}>: package(unix)
<src/*.ml{,i,y}>: pkg_camlp4
<src/*.ml{,i,y}>: pkg_num
<src/*.ml{,i,y}>: pkg_str
<src/*.ml{,i,y}>: pkg_unix
# OASIS_STOP
"src/gnuplotRif.ml": syntax_camlp4o
......
\newcommand{\version}{1.4}
\newcommand{\sha}{f76bf61}
\newcommand{\versionname}{none}
\newcommand{\versiondate}{28-01-16}
let str="1.0.0"
let sha="0"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment