diff --git a/_oasis b/_oasis index b6123d99..106138fc 100644 --- a/_oasis +++ b/_oasis @@ -151,7 +151,6 @@ Document containers containers.advanced, containers.io, containers.sexp, containers.lwt - Executable run_benchs Path: benchs/ Install: false diff --git a/doc/build_deps.ml b/doc/build_deps.ml new file mode 100755 index 00000000..5386c641 --- /dev/null +++ b/doc/build_deps.ml @@ -0,0 +1,26 @@ +#!/usr/bin/env ocaml + +#use "topfind";; +#require "containers";; +#require "containers.io";; +#require "gen";; +#require "unix";; + +let odoc_files = + CCIO.File.walk "_build" + |> Gen.filter_map + (function + | `File, f when CCString.suffix ~suf:".odoc" f -> Some f + | _ -> None + ) + |> Gen.flat_map + (fun f -> Gen.of_list ["-load"; f]) + |> Gen.to_list +;; + +let cmd = + "ocamldoc -dot -o deps.dot " ^ String.concat " " odoc_files +;; + +print_endline ("run: " ^ cmd);; +Unix.system cmd;;