1 let note_re = Str.regexp
"^Note: including file: *\\(.*\\)$"
3 let process_cl_dep7_output_line s set
=
4 if Str.string_match
note_re s
0
6 let win_path = Utils.safe_group
1 s
in
7 let unix_path = Path.find2
win_path in
10 Utils.StringSet.add path set
13 "Dep7.process_cl_dep7_output_line: Cannot find unix path for ";
14 prerr_endline
(String.escaped
win_path);
18 Cl.process_cl_output_line s
;
23 let re = Str.regexp
"/showIncludes" in
24 let tool = Utils.tool_name
"cl" in
25 let command = Wine.command tool ^
" /?" in
26 let ic = Unix.open_process_in
command in
28 if Str.string_match
re s
0
34 Utils.iter_crlf_chan
ic process;
37 let invoke_aux deponly oc target argv arg_start
=
38 let args = Utils.make_arg_string
Path.check_and_modify_absolute argv arg_start
in
39 let tool = Utils.tool_name
"cl" in
44 " /Zs /showIncludes /nologo "
46 " /showIncludes /nologo "
50 let ic = Unix.open_process_in
command in
52 Utils.fold_crlf_chan
ic process_cl_dep7_output_line
55 let code = Utils.close_process_in
ic in
59 output_string oc target
;
60 output_string oc
": ";
67 output_string oc
"\n";
71 let invoke = invoke_aux true stdout
73 let invoke2 target depfile argv arg_start
=
79 ("Dep7.invoke2 could not open output file `" ^ depfile ^
"':\n " ^
80 (Printexc.to_string exn
));
83 let code = invoke_aux false oc target argv arg_start
in