1

I’m building a project that uses OCamlbuild as its build system. This project also requires a library, which also uses OCamlbuild. This library comes with .mlpack, _tags, and myocamlbuild.ml files. I have included the library into my project as a git submodule in the path lib/mylib starting from the project’s root.

I’d like to tell OCamlbuild to recursively compile the library, as I would to with a make -C lib/mylib in a Makefile.

How can I achieve that?

Thanks.

Antonin Décimo
  • 499
  • 3
  • 17
  • Just a comment: Dune has first-class support for this kind of workflows ("composable build system"), so you might find it more suited to your needs. – gasche Dec 10 '18 at 16:46

1 Answers1

1

An answer is described in Working on dependent projects with OCamlbuild.
Basically, add <lib/mylib>: include to _tags and import the library myocamlbuild.ml. It does seem a bit wobbly.

Or use Dune.

Antonin Décimo
  • 499
  • 3
  • 17