aboutsummaryrefslogtreecommitdiffhomepage
path: root/scripts
diff options
context:
space:
mode:
authorGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-08-06 14:42:57 +0000
committerGravatar letouzey <letouzey@85f007b7-540e-0410-9357-904b9bb8a0f7>2012-08-06 14:42:57 +0000
commit335a3d971e9cc5d9f3365126f7a78a8d0c1007e3 (patch)
tree909b9911c5fafbc65a2be83b9a01e919c5f61e7f /scripts
parentcf692701443d1ea7f7d2c1b06dea56d6052bd58d (diff)
Win32: some quote fixes
git-svn-id: svn+ssh://scm.gforge.inria.fr/svn/coq/trunk@15688 85f007b7-540e-0410-9357-904b9bb8a0f7
Diffstat (limited to 'scripts')
-rw-r--r--scripts/coqmktop.ml8
1 files changed, 6 insertions, 2 deletions
diff --git a/scripts/coqmktop.ml b/scripts/coqmktop.ml
index bd4dec2b6..51c3fbb94 100644
--- a/scripts/coqmktop.ml
+++ b/scripts/coqmktop.ml
@@ -260,14 +260,14 @@ let main () =
if !opt then begin
(* native code *)
if !top then failwith "no custom toplevel in native code !";
- let ocamloptexec = Filename.concat camlbin "ocamlopt" in
+ let ocamloptexec = Filename.quote (Filename.concat camlbin "ocamlopt") in
ocamloptexec^" -linkall"
end else
(* bytecode (we shunt ocamlmktop script which fails on win32) *)
let ocamlmktoplib = if is_ocaml4
then " ocamlcommon.cma ocamlbytecomp.cma ocamltoplevel.cma"
else " toplevellib.cma" in
- let ocamlcexec = Filename.concat camlbin "ocamlc" in
+ let ocamlcexec = Filename.quote (Filename.concat camlbin "ocamlc") in
let ocamlccustom = Printf.sprintf "%s %s -linkall "
ocamlcexec Coq_config.coqrunbyteflags in
(if !top then ocamlccustom^ocamlmktoplib else ocamlccustom)
@@ -290,6 +290,10 @@ let main () =
let args = if !top then args @ [ "topstart.cmo" ] else args in
(* Now, with the .cma, we MUST use the -linkall option *)
let command = String.concat " " (prog::"-rectypes"::args) in
+ (* In Win32, when Sys.command (and hence cmd.exe) executes a command
+ that may contains many double-quote, we should double-quote the whole ! *)
+ let command = if Sys.os_type = "Win32" then "\""^command^"\"" else command
+ in
if !echo then
begin
print_endline command;