ocaml-batteries-team/batteries-included — Issue #251: Code in Documentation
Author: vincent-hugot
Created: 2012-03-02 12:52:24+00:00
State: open
Labels: Build, Documentation

As discussed [on the list](https://lists.forge.ocamlcore.org/pipermail/batteries-devel/2012-February/001560.html).

I tried just passing `-keep-code` to ocamldoc through `myocamlbuild.ml` (I don't think there is another way to do so; documentation seems to be a second-class citizen for ocamlbuild), but it didn't work -- and _cannot_ work, because I am pretty certain that ocamlbuild just passes the .mli; you need to pass both the .ml and the .mli for this option to have any effect.

I have no idea how to force ocamlbuild to use the .ml as well as the .mli -- I'm afraid it's not actually possible. So I see two (non-exclusive) courses of action:

1. patch ocamlbuild to have more options wrt. doc generation. (better for everyone in the long term -- hard)

2. forgo ocamlbuild and invoke ocamldoc directly. (less satisfying -- much easier)

I'm a very casual user of ocaml{build,doc} however, so I may be missing some trivial solution.