[PATCH ocaml 0/1] RFC: add/switch to dune build system

Pino Toscano ptoscano at redhat.com
Tue Apr 14 10:22:48 UTC 2020

ocaml-libvirt is currently built using manually written makefiles, and
an autoconf script to detect libvirt (using pkg-config). While this
seems OK, it has a lot of downsides:
- all the OCaml rules are manually written
- there is some form of duplication in the OCaml rules
- the bytecode vs native build is fragile

Initially named jhbuild, dune is a native OCaml build system which plans
to eventually replace the others (omake, oasis, ocamlbuild), with a
growing user base in the OCaml community.

This is a very simple patch adding support for dune. The idea is to
replace the current autoconf+makefile build system, which can be
removed more or less easily. I'd prefer to not maintain two build
systems at once, so this patch is also a way to start a discussion about
the proposed approach.

Things not yet done (pending the discussion):
- rewrite/simplify the release bits, currently interwonen in the
- update the documentation
- update libvirt-ci
- remove the autoconf+makefile build system

Pino Toscano (1):
  Add dune build system

 .gitignore             |  3 +++
 dune                   | 18 +++++++++++++
 dune-project           |  1 +
 dune.inc               | 22 ++++++++++++++++
 examples/dune          | 50 ++++++++++++++++++++++++++++++++++++
 libvirt/discover.ml    | 40 +++++++++++++++++++++++++++++
 libvirt/dune           | 57 ++++++++++++++++++++++++++++++++++++++++++
 libvirt/dune-project   |  2 ++
 libvirt/mllibvirt.opam | 33 ++++++++++++++++++++++++
 9 files changed, 226 insertions(+)
 create mode 100644 dune
 create mode 100644 dune-project
 create mode 100644 dune.inc
 create mode 100644 examples/dune
 create mode 100644 libvirt/discover.ml
 create mode 100644 libvirt/dune
 create mode 100644 libvirt/dune-project
 create mode 100644 libvirt/mllibvirt.opam


More information about the libvir-list mailing list