I have a medium-sized OCaml project (13K lines, 85 source files) which is built using OCamlMakefile, but it has slightly outgrown OCamlMakefile: instinctively, I would prefer to split it into three or four directories and build the files in these as libraries, not least as some parts of the overall project should be distinct projects in their own right.
What is the recommended way of doing this, in 2012? OCamlMakefile imposes a number of simplifications which get in the way of what would be considered conventional code organisation in most other programming environments.
I had exactly the same problem in my project. I ended up using a combination of OCamlMakefile (make libinstall
) and ocamlfind with OCAMLFIND_DESTDIR
and OCAMLPATH
variables pointing to a common local build directory.
It's a really flexible approach. For instance, I use an additional simple script to combine several libraries into one by merging their individual META
files.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With