try to make command line shorter for windows
This commit is contained in:
parent
3633d5b012
commit
469e1ff744
12
bootstrap.ml
12
bootstrap.ml
|
@ -168,16 +168,16 @@ let read_lines fn =
|
||||||
lines
|
lines
|
||||||
|
|
||||||
let read_deps files =
|
let read_deps files =
|
||||||
let tmp_fn = Filename.temp_file "jbuilder-ocamldep-output" ".txt" in
|
let out_fn = "boot-depends.txt" in
|
||||||
at_exit (fun () -> Sys.remove tmp_fn);
|
at_exit (fun () -> Sys.remove out_fn);
|
||||||
let n =
|
let n =
|
||||||
exec "%s -modules %s > %s"
|
exec "%s -modules %s > %s"
|
||||||
(Filename.quote ocamldep)
|
ocamldep
|
||||||
(String.concat ~sep:" " (List.map files ~f:Filename.quote))
|
(String.concat ~sep:" " files)
|
||||||
(Filename.quote tmp_fn)
|
out_fn
|
||||||
in
|
in
|
||||||
if n <> 0 then exit n;
|
if n <> 0 then exit n;
|
||||||
List.map (read_lines tmp_fn) ~f:(fun line ->
|
List.map (read_lines out_fn) ~f:(fun line ->
|
||||||
let i = String.index line ':' in
|
let i = String.index line ':' in
|
||||||
let unit =
|
let unit =
|
||||||
String.sub line ~pos:0 ~len:i
|
String.sub line ~pos:0 ~len:i
|
||||||
|
|
Loading…
Reference in New Issue