let digest p = let f = Pathname.to_string (in_build_dir p) in let buf = Buffer.create 1024 in Buffer.add_string buf f; (if sys_file_exists f then Buffer.add_string buf (Digest.file f)); Digest.string (Buffer.contents buf)