Commit 7dada304 authored by erwan's avatar erwan
Browse files

Chore: generate the lib/lutilsVersion.ml directly via dune (thanks kit-ty-kate)

parent c6fdb0a7
Pipeline #70778 passed with stages
in 1 minute and 21 seconds
......@@ -2,7 +2,7 @@
all:build
-include ./Makefile.version
build: lib/lutilsVersion.ml
build:
dune build @install
install:
......@@ -13,7 +13,6 @@ uninstall:
clean:
dune clean
rm -f lib/lutilsVersion.ml
odoc:
dune build @doc
......
......@@ -40,20 +40,12 @@ test:
test-batch:
cd test ; make test-batch
#############################
# tags
OTAGS=otags
# otags don't manage to parse gnuplotRif.ml
NO_TAGS=gnuplotRif.ml
tags:
$(OTAGS) -v $(shell ocamlc -where)/*.mli $(shell ls src/*.ml | grep -v $(NO_TAGS))
###############################
# opam-ing
NAME=lutils
SRC=lib bin emacs README.org LICENSE Makefile Makefile.version *.opam
SRC=lib bin emacs README.org LICENSE Makefile Makefile.version *.opam dune-project
$(NAME).$(VERSION).tgz: $(SRC)
......@@ -65,13 +57,9 @@ opam-rel : $(NAME).$(VERSION).tgz
opam-test : $(NAME).$(VERSION).tgz
make-opam-pack $(NAME).$(VERSION) $(NAME) -test
###############################
# pushing onto the official repo
WWW="/import/www/DIST-TOOLS/SYNCHRONE"
OPAM_FILE=$(shell find $(WWW)/opam-repository/packages/$(NAME) -name opam -cnewer opam | head -1 | sed -e 's/^./\U&/')
OPAM_DIR=`dirname $(OPAM_FILE)`
TGZ=http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/pool/$(NAME).$(VERSION).tgz
opam-pr:
cp -r $(OPAM_DIR) /home/jahier/local/opam-repository/packages/$(NAME)
echo "opam publish $(TGZ) ."
......@@ -3,12 +3,3 @@
SHA:=$(shell git log -1 --pretty=format:"%h" || echo "opam")
BRANCH:=$(shell git branch | grep "*" | cut -d ' ' -f 2 || basename `pwd` | echo "opam")
VERSION=$(shell git describe --tags || basename `pwd` | cut -d '.' -f2-4)
del_version:
rm -f lib/lutilsVersion.ml
gen_version: del_version src/lutilsVersion.ml
lib/lutilsVersion.ml:
echo "let str=\"$(VERSION)\"" > lib/lutilsVersion.ml ; \
echo "let sha=\"$(SHA)\"" >> lib/lutilsVersion.ml
(library
(name lutils)
(public_name lutils)
(libraries unix str num)
(wrapped false)
(synopsis "A lib shared by Verimag/synchronous tools (lustre-v6, lutin, rdbg).")
)
(name lutils)
(public_name lutils)
(libraries unix str num)
(wrapped false)
(synopsis "A lib shared by Verimag/synchronous tools (lustre-v6, lutin, rdbg).")
)
(rule
(targets lutilsVersion.ml)
(deps generate-version.sh)
(action (run ./generate-version.sh)))
#!/bin/sh
set -e
SHA=$(git log -1 --pretty=format:"%h" || echo "opam")
VERSION=$(git describe --tags || echo "${1}")
echo "let str=\"${VERSION}\"" > lutilsVersion.ml
echo "let sha=\"${SHA}\"" >> lutilsVersion.ml
\ No newline at end of file
opam-version: "2.0"
maintainer: "erwan.jahier@imag.fr"
authors: "Erwan Jahier"
license: "CeCILL"
license: "CeCILL-2.1"
homepage:
"https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutils/"
bug-reports:
......@@ -16,14 +16,15 @@ depends: [
"num"
]
build: [
[make "build"]
]
[make "lib/lutilsVersion.ml"]
["dune" "build" "-p" name "-j" jobs]
]
install: [make "install"]
post-messages:
"The last version can be obtained via (opam repo add) http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository/"
dev-repo:
"git+https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutils.git"
synopsis: "Tools and libs shared by Verimag/synchronous tools (lustre, lutin, rdbg)."
synopsis: "Tools and libs shared by Verimag/synchronous tools (lustre, lutin, rdbg)"
description: """
The lutils library contains various modules shared between tools developped at
Verimag in the synchronous group. Those modules deal with:
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment