Install the non preprocessed modules

This commit is contained in:
Jeremie Dimino 2017-03-01 17:27:25 +00:00
parent 3aef1d6f3c
commit b80b3c20ce
1 changed files with 11 additions and 3 deletions

View File

@ -1061,6 +1061,17 @@ module Gen(P : Params) = struct
; obj_name = lib.name ^ suf
}
in
(* Add the modules before preprocessing, otherwise the install rules are going to pick
up the pre-processed modules *)
Hashtbl.add modules_by_lib
~key:lib.name
~data:(
let modules =
match alias_module with
| None -> modules
| Some m -> String_map.add modules ~key:m.name ~data:m
in
String_map.values modules);
(* Preprocess before adding the alias module as it doesn't need preprocessing *)
let modules =
pped_modules ~dir ~dep_kind ~modules ~preprocess:lib.buildable.preprocess
@ -1072,9 +1083,6 @@ module Gen(P : Params) = struct
| None -> modules
| Some m -> String_map.add modules ~key:m.name ~data:m
in
Hashtbl.add modules_by_lib
~key:lib.name
~data:(String_map.values modules);
let dep_graph = ocamldep_rules ~dir ~item:lib.name ~modules ~alias_module in