1 let note_re = Str.regexp
"^Note: including file: *\\(.*\\)$"
3 let process_cl_dep7_output_line rejrel 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 if Utils.reject_path path rejrel
14 Utils.StringSet.add path set
17 "Dep7.process_cl_dep7_output_line: Cannot find unix path for "
19 prerr_endline
(String.escaped
win_path);
23 Cl.process_cl_output_line s
;
28 let re = Str.regexp
"-showIncludes" in
29 let tool = Utils.tool_name
"cl" in
30 let command = Wine.command tool ^
" -?" in
31 let ic = Unix.open_process_in
command in
33 if Str.string_match
re s
0
39 Utils.iter_crlf_chan
ic process;
42 let invoke_aux deponly oc target argv arg_start
=
43 let rejrel = Utils.build_reject_list
() in
44 let args = Utils.make_arg_string
Path.check_and_modify_absolute argv arg_start
in
45 let tool = Utils.tool_name
"cl" in
47 Utils.construct_args
tool args
50 "-Zs -showIncludes -nologo"
52 "-showIncludes -nologo"
55 let ic = Unix.open_process_in
command in
57 Utils.fold_crlf_chan
ic (process_cl_dep7_output_line rejrel)
60 let code = Utils.close_process_in
ic in
64 Utils.output_quoted_path oc target
;
65 output_string oc
": ";
69 Utils.output_quoted_path oc s
;
72 output_string oc
"\n";
76 let invoke = invoke_aux true stdout
78 let invoke2 target depfile argv arg_start
=
80 if depfile
= "CON" || depfile
= "con"
88 ("Dep7.invoke2 could not open output file `" ^ depfile ^
"':\n " ^
89 (Printexc.to_string exn
));
92 let code = invoke_aux false oc target argv arg_start
in