aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-18 16:01:08 +0000
committerGravatar coq <coq@85f007b7-540e-0410-9357-904b9bb8a0f7>2004-03-18 16:01:08 +0000
commit0c4c0de7e179fb560bd724e9706ec4428ed9ceb4 (patch)
treed89bef181ab6073b50bbb5ed30a17d0077cbd03a /scripts
parent63604da4cc6590a4dd5878671287a24cbc095402 (diff)
coqc: create_process sous Windows
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@5532 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coqc.ml13
1 files changed, 10 insertions, 3 deletions
diff --git a/scripts/coqc.ml b/scripts/coqc.ml
index c63cd1723..afca3fc14 100644
--- a/scripts/coqc.ml
+++ b/scripts/coqc.ml
@@ -85,8 +85,15 @@ let rec make_compilation_args = function
let compile command args files =
let args' = command :: args @ (make_compilation_args files) in
- Unix.handle_unix_error
- Unix.execvpe command (Array.of_list args') environment
+ match Sys.os_type with
+ | "Win32" ->
+ let pid =
+ Unix.create_process_env command (Array.of_list args') environment
+ Unix.stdin Unix.stdout Unix.stderr
+ in
+ ignore (Unix.waitpid [] pid)
+ | _ ->
+ Unix.execvpe command (Array.of_list args') environment
(* parsing of the command line
*
@@ -170,6 +177,6 @@ let main () =
if !image <> "" then !image else Filename.concat !bindir (!binary ^ Coq_config.exec_extension)
in
(* List.iter (compile coqtopname args) cfiles*)
- compile coqtopname args cfiles
+ Unix.handle_unix_error (compile coqtopname args) cfiles
let _ = Printexc.print main (); exit 0