Commit 9989e565 authored by erwan's avatar erwan
Browse files

Chore: rely more on dune and less on make for the build

parent 43aa7c0e
Pipeline #70917 passed with stages
in 4 minutes and 32 seconds
......@@ -13,11 +13,11 @@ lib/lutin/lutinUtils.ml: lib/lutin/lutinUtils.idl
cd lib/lutin/; make
###################################################
build: lib/lutin/version.ml lib/lutin/lutinUtils.ml lib/polka/vector.ml
build:
dune build @install
man:
cd doc/lutin-man/ && make || echo "cannot build the doc";exit 0
doc: doc/version.tex
cd doc/lutin-man/ && make
install:
......@@ -31,9 +31,6 @@ reinstall:
clean:
dune clean
cd lib/polka; make clean
cd lib/lutin; make clean
rm -f lib/lutin/version.ml
.PHONY: test slink
test: # cpcomp
......
......@@ -58,7 +58,7 @@ tags:
NAME=lutin
SRC=lib bin stdlib examples doc/lutin-man/ LICENSE Makefile Makefile.version *.opam
SRC=lib bin stdlib examples doc/lutin-man/ LICENSE Makefile Makefile.version *.opam dune-project
.PHONY:$(NAME).$(VERSION).tgz
$(NAME).$(VERSION).tgz: $(SRC)
......@@ -72,12 +72,11 @@ opam-test : $(NAME).$(VERSION).tgz
###############################
# 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)
opam-dune-lint
echo "opam publish $(TGZ) ."
.PHONY:install $(WWW)/pool/$(PACKNAME).tgz $(WWWTEST)/pool/$(PACKNAME).tgz
......
......@@ -6,13 +6,12 @@ BRANCH:=$(shell git branch | grep "*" | cut -d ' ' -f 2 || echo "opam")
VERSION=$(shell git describe --tags || basename `pwd` | cut -d '.' -f2-4)
lib/lutin/version.ml:
echo "let str=\"$(VERSION)\"" > lib/lutin/version.ml ; \
echo "let sha=\"$(SHA)\"" >> lib/lutin/version.ml ; \
echo "\\\newcommand{\\\version}{$(VERSION)}" > doc/version.tex ; \
echo "\\\newcommand{\\\sha}{$(SHA)}" >> doc/version.tex ; \
echo "\\\newcommand{\\\versionname}{Trilby}" >> doc/version.tex ; \
echo "\\\newcommand{\\\versiondate}{`date +%d-%m-%y`}" >> doc/version.tex ;\
.PHONY: doc/version.tex
doc/version.tex:
echo "\\\newcommand{\\\version}{$(VERSION)}" > $@ ; \
echo "\\\newcommand{\\\sha}{$(SHA)}" >> $@ ; \
echo "\\\newcommand{\\\versionname}{Trilby}" >> $@ ; \
echo "\\\newcommand{\\\versiondate}{`date +%d-%m-%y`}" >> $@ ;\
[ -d doc/lutin-man/objs ] || mkdir doc/lutin-man/objs; \
cp doc/version.tex doc/lutin-man/objs/ ;\
cp doc/version.tex doc/lutin-man/
ifndef LUTINSRC
LUTINSRC=~/lurette/lib/lutin
endif
ifndef LUT2TEX
LUT2TEX=~/rdbg/utils/lutintolatex
endif
LUTINSRC=../../lutin/src
LUT2TEX=~/rdbg/utils/lutintolatex
SRCS=./commands.tex \
./language.tex \
./objs/lutin.tex ./objs/gnuplotrif.tex ./objs/checkrif.tex \
......
......@@ -29,11 +29,6 @@
\usepackage[dvips]{graphicx}
\else
\usepackage[pdftex]{graphicx}
\pdfinfo{
/Title (The {\sc Lutin} language Reference Manual)
/Creator (latex)
/Author (Pascal Raymond, Erwan Jahier)
}
\fi
......
......@@ -2,20 +2,18 @@ opam-version: "2.0"
synopsis: "The Verimag bdd library"
description: "A BDD library in C + an ocaml wrapper"
maintainer: "erwan.jahier@univ-grenoble-alpes.fr"
authors: [
"Pascal Raymond"
]
authors: "Pascal Raymond"
license: "CeCILL"
homepage: "http://www-verimag.imag.fr/"
bug-reports: "https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutin"
bug-reports:
"https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutin"
depends: [
"ocaml" {>= "4.05"}
"base-unix" {build}
"dune" {build & >= "1.11"}
]
build: [
[make "build"]
"dune" {build & >= "1.11"}
"camlidl" {>= "1.09"}
]
build: [make "build"]
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/"
......@@ -17,3 +17,13 @@
)
(ocamllex lutLexer)
(ocamlyacc lutParser)
(rule
(targets version.ml)
(deps generate-version.sh)
(action (run ./generate-version.sh)))
(rule
(targets lutinUtils.mli lutinUtils.ml lutinUtils_stubs.c)
(deps Makefile lutinUtils.idl)
(action (run make)))
#!/bin/sh
set -e
SHA=$(git log -1 --pretty=format:"%h" || echo "opam")
VERSION=$(git describe --tags || basename `pwd` | cut -d '.' -f2-4)
echo "let str=\"${VERSION}\"" > version.ml
echo "let sha=\"${SHA}\"" >> version.ml
\ No newline at end of file
......@@ -13,3 +13,8 @@
(ocamllex polka_lexer)
(ocamlyacc polka_parser)
(ocamlyacc libpolka_stubs)
(rule
(targets poly_caml.c poly.ml poly.mli vector.mli vector.ml poly.mli poly.ml matrix.mli matrix.ml matrix_caml.c vector_caml.c)
(deps Makefile vector.idl matrix.idl poly.idl)
(action (run make)))
......@@ -9,7 +9,7 @@ maintainer: "erwan.jahier@univ-grenoble-alpes.fr"
authors: [
"Erwan Jahier" "Pascal Raymond" "Yvan Roux"
]
license: "CeCILL"
license: "CeCILL-2.1"
tags: ["clib:stdc" "clib:camlidl"]
homepage: "http://www-verimag.imag.fr/Lutin.html"
dev-repo: "https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lutin"
......@@ -27,12 +27,14 @@ depends: [
"lustre-v6"
"lutils" {>= "1.49"}
"mlgmpidl"
"dune" {build & >= "2.0"}
"dune" {>= "2.0"}
"ocamlfind"
"rdbg" {>= "1.196.9"}
]
build: [
[make "build"]
[make "lib/lutin/lutinUtils.ml"]
[make "lib/polka/vector.ml"]
["dune" "build" "-p" name "-j" jobs]
]
install: [make "install"]
post-messages:
......
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