Closed agarwal closed 8 years ago
I have just pushed a simple build system based on ocamlbuild [0]. It is admittedly a lot less sophisticated than the one on master
, as you have to give the list of modules for each library, does not generate .merlin
nor META files. It does not handle install/uninstall either, so it really only compiles the code.
The addition is pretty simple and does not require much ocamlbuild hackery. What striked me first is that it's fast:
$ time ocamlbuild app/run_ounit_tests.native
Finished, 1 target (0 cached) in 00:00:00.
Finished, 36 targets (0 cached) in 00:00:07.
real 0m7.381s
user 0m5.864s
sys 0m1.088s
while:
$ time omake _build/app/run-ounit-tests.native
*** omake: reading OMakefiles
*** omake: finished reading OMakefiles (3.03 sec)
*** omake: done (30.21 sec, 0/0 scans, 23/33 rules, 37/132 digests)
real 0m30.218s
user 0m26.636s
sys 0m3.008s
I'm not sure what the reason is, but at least it is encouraging. 32354d13010d introduces compilation files for ocamlbuild, 5940ec99e5 shows how to compile m4 files. @agarwal how does it look to you?
Let's do it. We can switch to ocamlbuild and add some files manually for now as needed. Please take note in this issue or a new one which things we lose, so we can remember to add them later.
Things lost or missing with this simple use of ocamlbuild
.merlin
file generationMostly done in 1cd0c86469bf5f187b36468e83c6b2f602007d9e, but still a little more to do.
Everything mentioned above is done, except automatically deriving the mlpack
file. I'll keep working on that, but it isn't an obstacle to doing a release.
We now have a new ocamlbuild plugin that handles almost everything we want.
Our build doesn't succeed on initial invocations, so can't do a release with it as-is. Let's fix it. Perhaps replace with one based on
ocamlbuild
.