Index: ocamlbuild/ocaml_compiler.ml =================================================================== --- ocamlbuild/ocaml_compiler.ml (revision 10605) +++ ocamlbuild/ocaml_compiler.ml (working copy) @@ -144,6 +144,12 @@ (if Pathname.exists (ml-.-"depends") then path_dependencies_of ml else []) (if Pathname.exists (mli-.-"depends") then path_dependencies_of mli else []) in + let modules = + if (modules = []) && (Pathname.exists (ml^"pack")) then + List.map (fun s -> (`mandatory, s)) (string_list_of_file (ml^"pack")) + else + modules + in if modules <> [] && not (Hashtbl.mem cache_prepare_link key) then let () = Hashtbl.add cache_prepare_link key true in let modules' = List.map (fun (_, x) -> expand_module include_dirs x extensions) modules in