let mk_tables arch =
let include_dirs_table = Hashtbl.create 17
and for_pack_table = Hashtbl.create 17 in
iter_info begin fun i ->
Hashtbl.replace include_dirs_table i.current_path i.include_dirs;
Hashtbl.replace for_pack_table i.current_path i.for_pack
end arch;
let previous_forpack_flags_of_pathname = !forpack_flags_of_pathname in
forpack_flags_of_pathname := begin fun m ->
let m' = Pathname.dirname m in
try
let for_pack = Hashtbl.find for_pack_table m' in
if for_pack = "" then N else S[A"-for-pack"; A for_pack]
with Not_found -> previous_forpack_flags_of_pathname m
end;
(include_dirs_table, for_pack_table)