aboutsummaryrefslogtreecommitdiffhomepage
path: root/myocamlbuild.ml
diff options
context:
space:
mode:
authorGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2014-01-22 17:33:55 +0100
committerGravatar Pierre Letouzey <pierre.letouzey@inria.fr>2014-01-30 18:51:53 +0100
commitc734ccd8081e52ee5576d0efac9b065d4f37f7d5 (patch)
treef36a9b9d25627ecf323f782bc55edab6fa408754 /myocamlbuild.ml
parent74bd95d10b9f4cccb4bd5b855786c444492b201b (diff)
Coqmktop without Sys.command, changes in ./configure -*byteflags options
NB: Please re-run ./configure after pulling this commit For launching ocamlc/ocamlopt, coqmktop doesn't use Sys.command anymore, but rather CUnix.sys_command, which is based on Unix.create_process. This way, we do not need to bother with the underlying shell (/bin/sh or cmd.exe) and the way arguments are to be quoted :-). Btw, many cleanups of coqmktop. Only difficulty: the -coqrunbyteflags of ./configure is a "meta-option" that collect as a string several sub-options to be given by coqmktop to ocamlc. For instance ./configure -coqrunbyteflags "-dllib -lcoqrun". We need now to parse all these sub-options. To ease that, I've made the following changes to the ./configure options: * The -coqrunbyteflags and its blank-separated argument isn't accepted anymore, and is replaced by a new option -vmbyteflags which expects a comma-separated argument. For instance: ./configure -vmbyteflags "-dllib,-lcoqrun" Btw, on this example, the double-quotes aren't mandatory anymore :-) * The -coqtoolsbyteflags isn't accepted anymore. To the best of my knowledge, nobody ever used it directly (it was internally triggered as a byproduct of the -custom option). The only interest I can think of for this option was to cancel the default use of ocamlc custom-linking on Win32 and MacOS. For that, ./configure now provides a -no-custom option.
Diffstat (limited to 'myocamlbuild.ml')
-rw-r--r--myocamlbuild.ml6
1 files changed, 3 insertions, 3 deletions
diff --git a/myocamlbuild.ml b/myocamlbuild.ml
index 5669dccab..6d3a24306 100644
--- a/myocamlbuild.ml
+++ b/myocamlbuild.ml
@@ -259,9 +259,9 @@ let extra_rules () = begin
let lines = List.map (fun s -> s^"\n") lines in
let line0 = "\n(* Adapted variables for ocamlbuild *)\n" in
(* TODO : line2 isn't completely accurate with respect to ./configure:
- the case of -local -coqrunbyteflags foo isn't supported *)
+ the case of -local -vmbyteflags foo isn't supported *)
let line1 =
- "let coqrunbyteflags = \"-dllib -lcoqrun\"\n"
+ "let vmbyteflags = [\"-dllib\";\"-lcoqrun\"]\n"
in
Echo (lines @ (if local then [line0;line1] else []),
"coq_config.ml"));
@@ -316,7 +316,7 @@ let extra_rules () = begin
flag ["compile"; "c"] cflags;
dep ["ocaml"; "use_libcoqrun"; "compile"] [libcoqrun];
dep ["ocaml"; "use_libcoqrun"; "link"; "native"] [libcoqrun];
- flag ["ocaml"; "use_libcoqrun"; "link"; "byte"] (Sh Coq_config.coqrunbyteflags);
+ flag ["ocaml"; "use_libcoqrun"; "link"; "byte"] (Sh Coq_config.vmbyteflags);
(* we need to use a different ocamlc. For now we copy the rule *)
if w32 then