Commit 7224b681 authored by erwan's avatar erwan
Browse files

Chore: generate version file via a dune rule (instead of a make rule)

parent 1fc2562b
Pipeline #71201 passed with stages
in 3 minutes and 34 seconds
all:build man
build: lib/lv6version.ml
build:
dune build @install
-include ./Makefile.version
......@@ -17,7 +17,6 @@ reinstall:
clean:
dune clean
rm -f lib/lv6version.ml
man:
cd lv6-ref-man && make || echo "*** ref manual building failed"
......
......@@ -64,7 +64,7 @@ amend:
# opam-ing
NAME=lustre-v6
SRC=lib bin LICENSE Makefile Makefile.version *.opam
SRC=lib bin LICENSE Makefile Makefile.version *.opam dune-project
$(NAME).$(VERSION).tgz: $(SRC)
git archive --prefix=$(NAME).$(VERSION)/ -o $@ HEAD $(SRC) test
......@@ -80,10 +80,9 @@ 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)
echo "yaka lancer ca"
echo "opam publish $(TGZ) ."
......@@ -11,3 +11,8 @@
)
(ocamllex lv6lexer)
(ocamlyacc lv6parser)
(rule
(targets lv6version.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 || basename `pwd` | cut -d '.' -f2-4)
BRANCH=$(git branch | grep "*" | cut -d ' ' -f 2 || basename `pwd` | echo "opam")
echo "(** Automatically generated from lib/generate-version.sh *) " > lv6version.ml
echo "let tool = \"lv6\"" >> lv6version.ml
echo "let str=\"${VERSION}\"" >> lv6version.ml
echo "let sha=\"${SHA}\"" >> lv6version.ml
echo "let branch=\"${BRANCH}\"" >> lv6version.ml
echo "let maintainer = \"erwan.jahier@univ-grenoble-alpes.fr\"">> lv6version.ml
opam-version: "2.0"
synopsis: "The Lustre V6 Verimag compiler"
description: """
description: """\
This package contains:
- lv6: the (current) name of the compiler (and interpreter via -exec)
- the lustre-v6 ocaml lib: allows to call the Lustre v6 interpreter from ocaml
- the lustre-v6 rdbg plugin: allows to debug Lustre v6 program wth rdbg.
"""
- the lustre-v6 rdbg plugin: allows to debug Lustre v6 program wth rdbg."""
maintainer: "erwan.jahier@univ-grenoble-alpes.fr"
authors: "Erwan Jahier and Pascal Raymond"
license: "CeCILL"
license: "CeCILL-2.1"
homepage: "http://www-verimag.imag.fr/lustre-v6.html"
dev-repo: "https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lustre-v6"
bug-reports: "https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lustre-v6/issues"
bug-reports:
"https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lustre-v6/issues"
depends: [
"ocaml" {>= "4.05"}
"base-unix"
"extlib" {build} | "extlib-compat" {build}
"dune"
"dune" {>= "2.0"}
"ocamlfind"
"lutils" {>= "1.49"}
"rdbg" {> "1.184"}
"rdbg" {>= "1.196.9"}
"num" {>= "1.4"}
]
build: [
[make "build"]
]
install: [make "install"]
build: ["dune" "build" "-p" name "-j" jobs]
post-messages:
"The last version can be obtained via (opam repo add) http://www-verimag.imag.fr/DIST-TOOLS/SYNCHRONE/opam-repository/"
dev-repo:
"https://gricad-gitlab.univ-grenoble-alpes.fr/verimag/synchrone/lustre-v6"
==> lus2lic0.sum <==
Test run by jahier on Thu Jul 1 10:56:43
Test run by jahier on Mon Jul 5 17:32:08
Native configuration is x86_64-pc-linux-gnu
=== lus2lic0 tests ===
......@@ -66,7 +66,7 @@ XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/lecte
XFAIL: Test bad programs (assert): test_lus2lic_no_node should_fail/assert/s.lus
==> lus2lic1.sum <==
Test run by jahier on Thu Jul 1 10:56:43
Test run by jahier on Mon Jul 5 17:32:08
Native configuration is x86_64-pc-linux-gnu
=== lus2lic1 tests ===
......@@ -414,7 +414,7 @@ PASS: ./lus2lic {-2c multipar.lus -n multipar}
PASS: sh multipar.sh
==> lus2lic2.sum <==
Test run by jahier on Thu Jul 1 10:57:07
Test run by jahier on Mon Jul 5 17:32:32
Native configuration is x86_64-pc-linux-gnu
=== lus2lic2 tests ===
......@@ -754,7 +754,7 @@ PASS: sh zzz2.sh
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c zzz2.lus {}
==> lus2lic3.sum <==
Test run by jahier on Thu Jul 1 10:57:39
Test run by jahier on Mon Jul 5 17:33:03
Native configuration is x86_64-pc-linux-gnu
=== lus2lic3 tests ===
......@@ -793,11 +793,11 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node FillFollowedByRed.
PASS: ./lus2lic {} {-lic -o Gyroscope.lic Gyroscope.lus -n Gyroscope}
PASS: ./lus2lic {-ec -o Gyroscope.ec Gyroscope.lus -n Gyroscope}
PASS: ./myec2c {-o Gyroscope.c Gyroscope.ec}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node Gyroscope.lus {}
FAIL: Try to compare lus2lic -exec and ecexe: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node Gyroscope.lus {}
PASS: ./lus2lic {} {-lic -o Gyroscope2.lic Gyroscope2.lus -n Gyroscope2}
PASS: ./lus2lic {-ec -o Gyroscope2.ec Gyroscope2.lus -n Gyroscope2}
PASS: ./myec2c {-o Gyroscope2.c Gyroscope2.ec}
PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node Gyroscope2.lus {}
FAIL: Try to compare lus2lic -exec and ecexe: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node Gyroscope2.lus {}
PASS: ./lus2lic {} {-lic -o aa.lic aa.lus -n aa}
PASS: ./lus2lic {-ec -o aa.ec aa.lus -n aa}
PASS: ./myec2c {-o aa.c aa.ec}
......@@ -1269,7 +1269,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node multipar.lus {}
==> lus2lic4.sum <==
Test run by jahier on Thu Jul 1 10:58:21
Test run by jahier on Mon Jul 5 17:33:45
Native configuration is x86_64-pc-linux-gnu
=== lus2lic4 tests ===
......@@ -1761,7 +1761,7 @@ PASS: /home/jahier/lus2lic/test/../utils/test_lus2lic_no_node zzz2.lus {}
# of expected failures 54
==> lus2lic1.sum <==
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 39847 {}
PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 34087 {}
=== lus2lic1 Summary ===
......@@ -1777,8 +1777,8 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 39847
==> lus2lic3.sum <==
=== lus2lic3 Summary ===
# of expected passes 498
# of unexpected failures 3
# of expected passes 496
# of unexpected failures 5
# of unresolved testcases 1
==> lus2lic4.sum <==
......@@ -1788,15 +1788,15 @@ PASS: /home/jahier/lus2lic/test/../utils/compare_exec_and_2c multipar.lus 39847
# of expected passes 468
# of unexpected failures 6
===============================
# Total number of failures: 10
# Total number of failures: 12
lus2lic0.log:testcase ./lus2lic.tests/test0.exp completed in 0 seconds
lus2lic1.log:testcase ./lus2lic.tests/test1.exp completed in 24 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 32 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 41 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 23 seconds
lus2lic2.log:testcase ./lus2lic.tests/test2.exp completed in 31 seconds
lus2lic3.log:testcase ./lus2lic.tests/test3.exp completed in 42 seconds
lus2lic4.log:testcase ./lus2lic.tests/test4.exp completed in 21 seconds
* Ref time:
72.65user 16.39system 2:01.61elapsed 73%CPU (0avgtext+0avgdata 42048maxresident)k
0inputs+142488outputs (0major+8285622minor)pagefaults 0swaps
70.07user 16.26system 1:57.78elapsed 73%CPU (0avgtext+0avgdata 42024maxresident)k
0inputs+141784outputs (0major+8289671minor)pagefaults 0swaps
* Quick time (-j 4):
94.72user 19.23system 0:48.77elapsed 233%CPU (0avgtext+0avgdata 42156maxresident)k
8inputs+120384outputs (1major+7050488minor)pagefaults 0swaps
103.03user 21.61system 0:49.46elapsed 251%CPU (0avgtext+0avgdata 42204maxresident)k
0inputs+139656outputs (0major+8238341minor)pagefaults 0swaps
Supports Markdown
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