@@ -54,18 +54,24 @@ let run package_name blessed actions odoc_dir odocl_dir
54
54
Logs. set_reporter (Logs_fmt. reporter () );
55
55
Stats. init_nprocs nb_workers;
56
56
let () = Worker_pool. start_workers env sw nb_workers in
57
+ let odocl_dir = Option. value odocl_dir ~default: odoc_dir in
57
58
58
- let all, extra_paths, actions, generate_json, occurrence_file =
59
+ let all, extra_paths, actions, generate_json, occurrence_file, odocl_dirs =
59
60
let pkg =
60
61
let pkg_opt = Voodoo. find_pkg package_name ~blessed in
61
62
match pkg_opt with Some pkg -> pkg | None -> exit 1
62
63
in
63
64
let all = Voodoo. of_voodoo pkg in
65
+ let odocl_dirs =
66
+ List. map
67
+ (fun l -> Fpath. (odocl_dir // Odoc_unit. lib_dir all l))
68
+ all.libraries
69
+ in
64
70
let occurrence_file =
65
- Fpath. (odoc_dir // Voodoo. occurrence_file_of_pkg pkg)
71
+ Fpath. (odocl_dir // Voodoo. occurrence_file_of_pkg pkg)
66
72
in
67
73
let extra_paths = Voodoo. extra_paths odoc_dir in
68
- (all, extra_paths, actions, true , occurrence_file)
74
+ (all, extra_paths, actions, true , occurrence_file, odocl_dirs )
69
75
in
70
76
71
77
let all = Packages. remap_virtual [ all ] in
@@ -78,10 +84,7 @@ let run package_name blessed actions odoc_dir odocl_dir
78
84
| _ -> failwith " Error, expecting singleton library in voodoo mode"
79
85
in
80
86
let units =
81
- let dirs =
82
- let odocl_dir = Option. value odocl_dir ~default: odoc_dir in
83
- { Odoc_unit. odoc_dir; odocl_dir; index_dir; mld_dir }
84
- in
87
+ let dirs = { Odoc_unit. odoc_dir; odocl_dir; index_dir; mld_dir } in
85
88
Odoc_units_of. packages ~dirs ~indices_style: Voodoo ~extra_paths ~remap: false
86
89
all
87
90
in
@@ -101,7 +104,7 @@ let run package_name blessed actions odoc_dir odocl_dir
101
104
compiled
102
105
in
103
106
let () =
104
- Odoc. count_occurrences ~input: [ odoc_dir ] ~output: occurrence_file
107
+ Odoc. count_occurrences ~input: odocl_dirs ~output: occurrence_file
105
108
in
106
109
let () =
107
110
Compile. html_generate ~occurrence_file ~remaps: [] ~generate_json
0 commit comments