mirror of
https://github.com/c-cube/ocaml-containers.git
synced 2025-12-06 11:15:31 -05:00
doc/build_deps.ml to display the dependency graph in dot
This commit is contained in:
parent
8c0670155d
commit
28f0a7ccc5
2 changed files with 26 additions and 1 deletions
1
_oasis
1
_oasis
|
|
@ -151,7 +151,6 @@ Document containers
|
||||||
containers.advanced, containers.io, containers.sexp,
|
containers.advanced, containers.io, containers.sexp,
|
||||||
containers.lwt
|
containers.lwt
|
||||||
|
|
||||||
|
|
||||||
Executable run_benchs
|
Executable run_benchs
|
||||||
Path: benchs/
|
Path: benchs/
|
||||||
Install: false
|
Install: false
|
||||||
|
|
|
||||||
26
doc/build_deps.ml
Executable file
26
doc/build_deps.ml
Executable file
|
|
@ -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;;
|
||||||
Loading…
Add table
Reference in a new issue