let up_to_date_or_copy fn =
let fn' = !Options.build_dir/fn in
Pathname.exists fn &&
begin
Pathname.exists fn' && Pathname.same_contents fn fn' ||
begin
Shell.cp fn fn';
false
end
end