mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 03:05:28 -05:00
chore(build): migrate to dune 1.0
This commit is contained in:
parent
058c99b2a9
commit
3b1de9a1c8
28 changed files with 155 additions and 152 deletions
2
.gitignore
vendored
2
.gitignore
vendored
|
|
@ -9,3 +9,5 @@ TAGS
|
||||||
setup.*
|
setup.*
|
||||||
*.html
|
*.html
|
||||||
.merlin
|
.merlin
|
||||||
|
*.install
|
||||||
|
.ignore
|
||||||
|
|
|
||||||
12
Makefile
12
Makefile
|
|
@ -2,24 +2,24 @@
|
||||||
all: build test
|
all: build test
|
||||||
|
|
||||||
build:
|
build:
|
||||||
jbuilder build @install
|
dune build @install
|
||||||
|
|
||||||
test: build
|
test: build
|
||||||
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=run_benchs.exe run_bench_hash.exe
|
BENCH_TARGETS=run_benchs.exe run_bench_hash.exe
|
||||||
|
|
||||||
benchs:
|
benchs:
|
||||||
jbuilder build $(addprefix benchs/, $(BENCH_TARGETS))
|
dune build $(addprefix benchs/, $(BENCH_TARGETS))
|
||||||
|
|
||||||
examples:
|
examples:
|
||||||
jbuilder build examples/id_sexp.exe
|
dune build examples/id_sexp.exe
|
||||||
|
|
||||||
VERSION=$(shell awk '/^version:/ {print $$2}' containers.opam)
|
VERSION=$(shell awk '/^version:/ {print $$2}' containers.opam)
|
||||||
|
|
||||||
|
|
|
||||||
11
benchs/dune
Normal file
11
benchs/dune
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
(executables
|
||||||
|
(names run_benchs run_bench_hash)
|
||||||
|
(libraries containers containers.data containers.iter
|
||||||
|
containers.thread benchmark gen sequence qcheck
|
||||||
|
batteries clarity)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always)
|
||||||
|
(ocamlopt_flags :standard -O3 -color always
|
||||||
|
-unbox-closures -unbox-closures-factor 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
(executables
|
|
||||||
((names (run_benchs run_bench_hash))
|
|
||||||
(libraries (containers containers.data containers.iter
|
|
||||||
containers.thread benchmark gen sequence qcheck
|
|
||||||
batteries clarity))
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always))
|
|
||||||
(ocamlopt_flags (:standard -O3 -color always
|
|
||||||
-unbox-closures -unbox-closures-factor 20))
|
|
||||||
))
|
|
||||||
|
|
||||||
|
|
@ -4,12 +4,12 @@ version: "2.3"
|
||||||
author: "Simon Cruanes"
|
author: "Simon Cruanes"
|
||||||
maintainer: "simon.cruanes.2007@m4x.org"
|
maintainer: "simon.cruanes.2007@m4x.org"
|
||||||
build: [
|
build: [
|
||||||
["jbuilder" "build" "-p" name "-j" jobs]
|
["dune" "build" "-p" name "-j" jobs]
|
||||||
]
|
]
|
||||||
build-doc: [ "jbuilder" "build" "@doc" ]
|
build-doc: [ "dune" "build" "@doc" ]
|
||||||
build-test: [ "jbuilder" "runtest" "-p" name "-j" jobs]
|
build-test: [ "dune" "runtest" "-p" name "-j" jobs]
|
||||||
depends: [
|
depends: [
|
||||||
"jbuilder" {build & >= "1.0+beta12"}
|
"dune" {build}
|
||||||
"result"
|
"result"
|
||||||
"uchar"
|
"uchar"
|
||||||
"qtest" { test }
|
"qtest" { test }
|
||||||
|
|
|
||||||
1
dune-project
Normal file
1
dune-project
Normal file
|
|
@ -0,0 +1 @@
|
||||||
|
(lang dune 1.0)
|
||||||
10
examples/dune
Normal file
10
examples/dune
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
(executables
|
||||||
|
(names id_sexp)
|
||||||
|
(libraries containers.sexp)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always)
|
||||||
|
(ocamlopt_flags :standard -O3 -color always
|
||||||
|
-unbox-closures -unbox-closures-factor 20)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
(executables
|
|
||||||
((names (id_sexp))
|
|
||||||
(libraries (containers.sexp))
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -color always))
|
|
||||||
(ocamlopt_flags (:standard -O3 -color always
|
|
||||||
-unbox-closures -unbox-closures-factor 20))
|
|
||||||
))
|
|
||||||
|
|
||||||
|
|
||||||
31
qtest/dune
Normal file
31
qtest/dune
Normal file
|
|
@ -0,0 +1,31 @@
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(name make)
|
||||||
|
(modules make)
|
||||||
|
)
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(targets run_qtest.ml)
|
||||||
|
(deps make.bc (source_tree ../src))
|
||||||
|
;(libraries (qtest qcheck))
|
||||||
|
(action
|
||||||
|
(run ./make.bc -target %{targets}))
|
||||||
|
)
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(name run_qtest)
|
||||||
|
(modes native)
|
||||||
|
(modules run_qtest)
|
||||||
|
; disable some warnings in qtests
|
||||||
|
(flags :standard -warn-error -a -w -33-35-27-39 -nolabels)
|
||||||
|
(libraries sequence gen qcheck containers containers.unix
|
||||||
|
containers.data containers.thread containers.iter
|
||||||
|
containers.sexp uutf)
|
||||||
|
)
|
||||||
|
|
||||||
|
(alias
|
||||||
|
(name runtest)
|
||||||
|
(deps run_qtest.exe)
|
||||||
|
(action (run %{deps}))
|
||||||
|
)
|
||||||
|
|
||||||
30
qtest/jbuild
30
qtest/jbuild
|
|
@ -1,30 +0,0 @@
|
||||||
|
|
||||||
(executable
|
|
||||||
((name make)
|
|
||||||
(modules (make))
|
|
||||||
))
|
|
||||||
|
|
||||||
(rule
|
|
||||||
((targets (run_qtest.ml))
|
|
||||||
(deps (make.bc (files_recursively_in ../src)))
|
|
||||||
;(libraries (qtest qcheck))
|
|
||||||
(action
|
|
||||||
(run ./make.bc -target ${@}))
|
|
||||||
))
|
|
||||||
|
|
||||||
(executable
|
|
||||||
((name run_qtest)
|
|
||||||
(modes (native))
|
|
||||||
(modules (run_qtest))
|
|
||||||
(flags (:standard -nolabels))
|
|
||||||
(libraries (sequence gen qcheck containers containers.unix
|
|
||||||
containers.data containers.thread containers.iter
|
|
||||||
containers.sexp uutf))
|
|
||||||
))
|
|
||||||
|
|
||||||
(alias
|
|
||||||
((name runtest)
|
|
||||||
(deps (run_qtest.exe))
|
|
||||||
(action (run ${<}))
|
|
||||||
))
|
|
||||||
|
|
||||||
9
src/core/dune
Normal file
9
src/core/dune
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers)
|
||||||
|
(public_name containers)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels -open CCMonomorphic)
|
||||||
|
(ocamlopt_flags (:include ../flambda.flags))
|
||||||
|
(libraries result uchar containers.monomorphic)
|
||||||
|
)
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers)
|
|
||||||
(public_name containers)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string -nolabels -open CCMonomorphic))
|
|
||||||
(ocamlopt_flags ((:include ../flambda.flags)))
|
|
||||||
(libraries (result uchar containers.monomorphic))
|
|
||||||
))
|
|
||||||
9
src/data/dune
Normal file
9
src/data/dune
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_data)
|
||||||
|
(public_name containers.data)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries result)
|
||||||
|
)
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_data)
|
|
||||||
(public_name containers.data)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (result))
|
|
||||||
))
|
|
||||||
12
src/dune
Normal file
12
src/dune
Normal file
|
|
@ -0,0 +1,12 @@
|
||||||
|
|
||||||
|
(executable
|
||||||
|
(name mkflags)
|
||||||
|
(libraries dune.configurator))
|
||||||
|
|
||||||
|
(rule
|
||||||
|
(targets flambda.flags)
|
||||||
|
(mode fallback)
|
||||||
|
(action
|
||||||
|
(run ./mkflags.exe))
|
||||||
|
)
|
||||||
|
|
||||||
9
src/iter/dune
Normal file
9
src/iter/dune
Normal file
|
|
@ -0,0 +1,9 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_iter)
|
||||||
|
(public_name containers.iter)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries result)
|
||||||
|
)
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_iter)
|
|
||||||
(public_name containers.iter)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (result))
|
|
||||||
))
|
|
||||||
12
src/jbuild
12
src/jbuild
|
|
@ -1,12 +0,0 @@
|
||||||
|
|
||||||
(executable
|
|
||||||
((name mkflags)
|
|
||||||
(libraries (dune.configurator))))
|
|
||||||
|
|
||||||
(rule
|
|
||||||
((targets (flambda.flags))
|
|
||||||
(fallback)
|
|
||||||
(action
|
|
||||||
(run ./mkflags.exe))
|
|
||||||
))
|
|
||||||
|
|
||||||
8
src/monomorphic/dune
Normal file
8
src/monomorphic/dune
Normal file
|
|
@ -0,0 +1,8 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_monomorphic)
|
||||||
|
(public_name containers.monomorphic)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
)
|
||||||
|
|
@ -1,9 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_monomorphic)
|
|
||||||
(public_name containers.monomorphic)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries ())
|
|
||||||
))
|
|
||||||
11
src/sexp/dune
Normal file
11
src/sexp/dune
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_sexp)
|
||||||
|
(public_name containers.sexp)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries result)
|
||||||
|
)
|
||||||
|
|
||||||
|
(ocamllex (modules CCSexp_lex))
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_sexp)
|
|
||||||
(public_name containers.sexp)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (result))
|
|
||||||
))
|
|
||||||
|
|
||||||
(ocamllex (CCSexp_lex))
|
|
||||||
11
src/threads/dune
Normal file
11
src/threads/dune
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_thread)
|
||||||
|
(public_name containers.thread)
|
||||||
|
(wrapped false)
|
||||||
|
(optional)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries containers threads)
|
||||||
|
)
|
||||||
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_thread)
|
|
||||||
(public_name containers.thread)
|
|
||||||
(wrapped false)
|
|
||||||
(optional)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (containers threads))
|
|
||||||
))
|
|
||||||
|
|
||||||
11
src/top/dune
Normal file
11
src/top/dune
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_top)
|
||||||
|
(public_name containers.top)
|
||||||
|
(wrapped false)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries compiler-libs.common containers containers.data
|
||||||
|
containers.unix containers.sexp containers.iter)
|
||||||
|
)
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_top)
|
|
||||||
(public_name containers.top)
|
|
||||||
(wrapped false)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (compiler-libs.common containers containers.data
|
|
||||||
containers.unix containers.sexp containers.iter))
|
|
||||||
))
|
|
||||||
10
src/unix/dune
Normal file
10
src/unix/dune
Normal file
|
|
@ -0,0 +1,10 @@
|
||||||
|
|
||||||
|
(library
|
||||||
|
(name containers_unix)
|
||||||
|
(public_name containers.unix)
|
||||||
|
(wrapped false)
|
||||||
|
(optional)
|
||||||
|
(flags :standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string)
|
||||||
|
(ocamlopt_flags :standard (:include ../flambda.flags))
|
||||||
|
(libraries result unix)
|
||||||
|
)
|
||||||
|
|
@ -1,10 +0,0 @@
|
||||||
|
|
||||||
(library
|
|
||||||
((name containers_unix)
|
|
||||||
(public_name containers.unix)
|
|
||||||
(wrapped false)
|
|
||||||
(optional)
|
|
||||||
(flags (:standard -w +a-4-42-44-48-50-58-32-60@8 -safe-string))
|
|
||||||
(ocamlopt_flags (:standard (:include ../flambda.flags)))
|
|
||||||
(libraries (result unix))
|
|
||||||
))
|
|
||||||
Loading…
Add table
Reference in a new issue