- (* dot generation *)
- if !dot_file <> "" then
- begin
- let oc = open_out !dot_file in
- let fmt = Format.formatter_of_out_channel oc in
- GraphvizPp.Dot.header fmt;
- List.iter
- (fun ma_file ->
- let deps = Hashtbl.find_all include_deps ma_file in
- let deps =
- HExtlib.filter_map
- (fun u ->
- try Some (Hashtbl.find baseuri_of_inv u)
- with Not_found -> None)
- deps
- in
- let deps = List.fast_sort Pervasives.compare deps in
- let deps = HExtlib.list_uniq deps in
- GraphvizPp.Dot.node ma_file fmt;
- List.iter (fun dep -> GraphvizPp.Dot.edge ma_file dep fmt) deps)
- ma_files;
- GraphvizPp.Dot.trailer fmt;
- close_out oc
- end;