I’m trying to figure out how to use odoc
without dune
, and can’t find any (heh) documentation on that. Have I overlooked it somehow?
If the answer is “there isn’t any”, that’s OK: I’ve reverse-engineered based on dune’s _build/log
file before, and I’ll do so this time. But I figured I’d ask, before I dive into the logfile.
ETA: For anybody who comes after me, some notes:
(1) read the “odoc --help” and “odoc compile --help”, “odoc html --help” etc. These are the real documentation for odoc, it would seem.
(2) Suppose you have a set of Ocaml files you wish to build documentation for. Compile them with the “-bin-annot” switch, generating “.cmt” and “.cmti” files. Apparently if there’s a .cmti file, the .cmt file is superfluous.
(3) then invoke odoc. I did it thus (and I’m sure there’s more to learn as I go along):
odoc compile --package foo -o foo.odoc boo.cmti
odoc html -o doc foo.odoc
This generated ./doc/foo/Boo/index.html
. with the expected contents.