mirror of
https://github.com/c-cube/iter.git
synced 2025-12-07 11:45:33 -05:00
chore: migrate to dune and opam2
This commit is contained in:
parent
ef45c8a500
commit
85fd4baf69
10 changed files with 69 additions and 71 deletions
15
Makefile
15
Makefile
|
|
@ -2,27 +2,24 @@
|
||||||
all: build test
|
all: build test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
jbuilder build @install
|
@dune build @install
|
||||||
|
|
||||||
test:
|
test:
|
||||||
jbuilder runtest --no-buffer --force
|
@dune runtest --no-buffer --force
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
jbuilder clean
|
@dune clean
|
||||||
|
|
||||||
doc:
|
doc:
|
||||||
jbuilder build @doc
|
@dune build @doc
|
||||||
|
|
||||||
BENCH_TARGETS=bench_persistent_read.exe bench_persistent.exe
|
BENCH_TARGETS=bench_persistent_read.exe bench_persistent.exe
|
||||||
|
|
||||||
benchs:
|
benchs:
|
||||||
jbuilder build $(addprefix bench/, $(BENCH_TARGETS))
|
dune build $(addprefix bench/, $(BENCH_TARGETS))
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
jbuilder build examples/test_sexpr.exe
|
dune build examples/test_sexpr.exe
|
||||||
|
|
||||||
push_doc: all doc
|
|
||||||
scp -r sequence.docdir/* cedeela.fr:~/simon/root/software/sequence/
|
|
||||||
|
|
||||||
VERSION=$(shell awk '/^version:/ {print $$2}' sequence.opam)
|
VERSION=$(shell awk '/^version:/ {print $$2}' sequence.opam)
|
||||||
|
|
||||||
|
|
|
||||||
1
dune-project
Normal file
1
dune-project
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(lang dune 1.0)
|
||||||
22
qtest/dune
Normal file
22
qtest/dune
Normal file
|
|
@ -0,0 +1,22 @@
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(targets run_qtest.ml)
|
||||||
|
(deps Makefile (source_tree ../src)) ; (glob_files ../src/**/*.ml{,i})))
|
||||||
|
(mode fallback)
|
||||||
|
;(libraries (qtest qcheck))
|
||||||
|
(action
|
||||||
|
(run make qtest-gen))
|
||||||
|
)
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(name run_qtest)
|
||||||
|
(flags :standard -warn-error -a+8 -safe-string -w -33)
|
||||||
|
(libraries sequence qcheck)
|
||||||
|
)
|
||||||
|
|
||||||
|
(alias
|
||||||
|
(name runtest)
|
||||||
|
(deps run_qtest.exe)
|
||||||
|
(action (run %{deps}))
|
||||||
|
)
|
||||||
|
|
||||||
21
qtest/jbuild
21
qtest/jbuild
|
|
@ -1,21 +0,0 @@
|
||||||
|
|
||||||
(rule
|
|
||||||
((targets (run_qtest.ml))
|
|
||||||
(deps ((file Makefile) (files_recursively_in ../src))) ; (glob_files ../src/**/*.ml{,i})))
|
|
||||||
(fallback)
|
|
||||||
;(libraries (qtest qcheck))
|
|
||||||
(action
|
|
||||||
(run make qtest-gen))
|
|
||||||
))
|
|
||||||
|
|
||||||
(executable
|
|
||||||
((name run_qtest)
|
|
||||||
(libraries (sequence qcheck))
|
|
||||||
))
|
|
||||||
|
|
||||||
(alias
|
|
||||||
((name runtest)
|
|
||||||
(deps (run_qtest.exe))
|
|
||||||
(action (run ${<}))
|
|
||||||
))
|
|
||||||
|
|
||||||
|
|
@ -1,25 +1,23 @@
|
||||||
opam-version: "1.2"
|
opam-version: "2.0"
|
||||||
name: "sequence"
|
name: "sequence"
|
||||||
version: "1.1"
|
version: "1.1"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
license: "BSD-2-clauses"
|
license: "BSD-2-clauses"
|
||||||
|
synopsis: "Simple sequence abstract datatype, intended to iterate efficiently
|
||||||
|
on collections while performing some transformations"
|
||||||
build: [
|
build: [
|
||||||
[make "build"]
|
["dune" "build" "@install" "-p" name "-j" jobs]
|
||||||
]
|
["dune" "build" "@doc" "-p" name] {with-doc}
|
||||||
build-doc: [
|
["dune" "runtest" "-p" name] {with-test}
|
||||||
[make "doc"]
|
|
||||||
]
|
|
||||||
build-test: [
|
|
||||||
[make "test"]
|
|
||||||
]
|
]
|
||||||
depends: [
|
depends: [
|
||||||
"base-bytes"
|
"base-bytes"
|
||||||
"result"
|
"result"
|
||||||
"jbuilder" {build}
|
"dune" {build}
|
||||||
"qcheck" {test}
|
"qcheck" {with-test}
|
||||||
"qtest" {test}
|
"qtest" {with-test}
|
||||||
"odoc" {doc}
|
"odoc" {with-doc}
|
||||||
]
|
]
|
||||||
tags: [ "sequence" "iterator" "iter" "fold" ]
|
tags: [ "sequence" "iterator" "iter" "fold" ]
|
||||||
homepage: "https://github.com/c-cube/sequence/"
|
homepage: "https://github.com/c-cube/sequence/"
|
||||||
|
|
@ -28,4 +26,4 @@ depopts: [
|
||||||
]
|
]
|
||||||
doc: "https://c-cube.github.io/sequence/"
|
doc: "https://c-cube.github.io/sequence/"
|
||||||
bug-reports: "https://github.com/c-cube/sequence/issues"
|
bug-reports: "https://github.com/c-cube/sequence/issues"
|
||||||
dev-repo: "https://github.com/c-cube/sequence.git"
|
dev-repo: "git+https://github.com/c-cube/sequence.git"
|
||||||
|
|
|
||||||
|
|
@ -23,3 +23,4 @@ let mmap filename =
|
||||||
with e ->
|
with e ->
|
||||||
Unix.close fd;
|
Unix.close fd;
|
||||||
raise e
|
raise e
|
||||||
|
[@@ocaml.warning "-3"]
|
||||||
|
|
|
||||||
10
src/bigarray/dune
Normal file
10
src/bigarray/dune
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name sequence_bigarray)
|
||||||
|
(public_name sequence.bigarray)
|
||||||
|
(libraries sequence bigarray)
|
||||||
|
(wrapped false)
|
||||||
|
(optional)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
)
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name sequence_bigarray)
|
|
||||||
(public_name sequence.bigarray)
|
|
||||||
(libraries (sequence bigarray))
|
|
||||||
(wrapped false)
|
|
||||||
(optional)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
))
|
|
||||||
18
src/dune
Normal file
18
src/dune
Normal file
|
|
@ -0,0 +1,18 @@
|
||||||
|
(rule
|
||||||
|
(targets flambda.flags)
|
||||||
|
(deps mkflags.ml)
|
||||||
|
(mode fallback)
|
||||||
|
(action
|
||||||
|
(run ocaml ./mkflags.ml))
|
||||||
|
)
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name sequence)
|
||||||
|
(public_name sequence)
|
||||||
|
(wrapped false)
|
||||||
|
(modules Sequence SequenceLabels)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels)
|
||||||
|
(ocamlopt_flags :standard (:include flambda.flags))
|
||||||
|
(libraries bytes result)
|
||||||
|
)
|
||||||
|
|
||||||
18
src/jbuild
18
src/jbuild
|
|
@ -1,18 +0,0 @@
|
||||||
(rule
|
|
||||||
((targets (flambda.flags))
|
|
||||||
(deps ((file mkflags.ml)))
|
|
||||||
(fallback)
|
|
||||||
(action
|
|
||||||
(run ocaml ./mkflags.ml))
|
|
||||||
))
|
|
||||||
|
|
||||||
(library
|
|
||||||
((name sequence)
|
|
||||||
(public_name sequence)
|
|
||||||
(wrapped false)
|
|
||||||
(modules (Sequence SequenceLabels))
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels))
|
|
||||||
(ocamlopt_flags (:standard (:include flambda.flags)))
|
|
||||||
(libraries (bytes result))
|
|
||||||
))
|
|
||||||
|
|
||||||
Loading…
Add table
Reference in a new issue