let digest_prods r = List.fold_right begin fun p acc -> let f = Pathname.to_string (Resource.in_build_dir p) in if sys_file_exists f then (f, Digest.file f) :: acc else acc end r.prods []