make --merge accept absolute paths

Summary: Latest Buck emits absolute paths in infer_deps.txt.

Reviewed By: akotulski

Differential Revision: D3528214

fbshipit-source-id: 5ca9466
master
Jules Villard 9 years ago committed by Facebook Github Bot 2
parent b95b71fa85
commit 60c5b87ffd

@ -152,7 +152,10 @@ let process_merge_file deps_file =
let process_line line = let process_line line =
match Str.split_delim (Str.regexp (Str.quote "\t")) line with match Str.split_delim (Str.regexp (Str.quote "\t")) line with
| target :: _ :: target_results_dir :: _ -> | target :: _ :: target_results_dir :: _ ->
let infer_out_src = Filename.concat (Filename.dirname (buck_out ())) target_results_dir in let infer_out_src =
if Filename.is_relative target_results_dir then
Filename.dirname (buck_out ()) // target_results_dir
else target_results_dir in
let skiplevels = 2 in (** Don't link toplevel files, definitely not .start *) let skiplevels = 2 in (** Don't link toplevel files, definitely not .start *)
if should_link ~target ~target_results_dir ~stats infer_out_src infer_out_dst if should_link ~target ~target_results_dir ~stats infer_out_src infer_out_dst
then slink ~stats ~skiplevels infer_out_src infer_out_dst then slink ~stats ~skiplevels infer_out_src infer_out_dst

Loading…
Cancel
Save