I like to have a local copy of the ocaml reference manual that correspond to the current version I'm using, so I used to build the documentation when I was compiling ocaml from source.
Now that I use opam, I was wondering if it was possible to ask it to build the documentation when I create a new switch.
Not directly, but you can install a matching version of the manual with
opam install ocaml-manual