let document_ocaml_project ?(ocamldoc=ocamldoc_l_file) odocl docout docdir env build =
let odocl = env odocl and docout = env docout and docdir = env docdir in
let contents = string_list_of_file odocl in
let include_dirs = Pathname.include_dirs_of (Pathname.dirname odocl) in
let to_build =
List.map begin fun module_name ->
expand_module include_dirs module_name ["odoc"]
end contents in
let module_paths = List.map Outcome.good (build to_build) in
let tags = (Tags.union (tags_of_pathname docout) (tags_of_pathname docdir))++"ocaml" in
ocamldoc tags module_paths docout docdir