Commit ef27426f authored by POTTIER Francois's avatar POTTIER Francois
Browse files

New option --suggest-menhirLib to find out where menhirLib.{ml,mli} have been installed.

parent 8d668822
...@@ -157,6 +157,7 @@ type suggestion = ...@@ -157,6 +157,7 @@ type suggestion =
| SuggestNothing | SuggestNothing
| SuggestCompFlags | SuggestCompFlags
| SuggestLinkFlags of string (* "cmo" or "cmx" *) | SuggestLinkFlags of string (* "cmo" or "cmx" *)
| SuggestWhereIsMenhirLibSource
let suggestion = let suggestion =
ref SuggestNothing ref SuggestNothing
...@@ -248,6 +249,8 @@ let options = Arg.align [ ...@@ -248,6 +249,8 @@ let options = Arg.align [
" Suggest link flags for ocamlc"; " Suggest link flags for ocamlc";
"--suggest-link-flags-opt", Arg.Unit (fun () -> suggestion := SuggestLinkFlags "cmx"), "--suggest-link-flags-opt", Arg.Unit (fun () -> suggestion := SuggestLinkFlags "cmx"),
" Suggest link flags for ocamlopt"; " Suggest link flags for ocamlopt";
"--suggest-menhirLib", Arg.Unit (fun () -> suggestion := SuggestWhereIsMenhirLibSource),
" Suggest where is MenhirLib";
"--table", Arg.Set table, " Use the table-based back-end"; "--table", Arg.Set table, " Use the table-based back-end";
"--timings", Arg.Set timings, " Display internal timings"; "--timings", Arg.Set timings, " Display internal timings";
"--trace", Arg.Set trace, " Include tracing instructions in the generated code"; "--trace", Arg.Set trace, " Include tracing instructions in the generated code";
...@@ -312,6 +315,13 @@ let () = ...@@ -312,6 +315,13 @@ let () =
else else
printf "menhirLib.%s\n%!" extension; printf "menhirLib.%s\n%!" extension;
exit 0 exit 0
| SuggestWhereIsMenhirLibSource ->
if Installation.ocamlfind then
let _ = Sys.command "ocamlfind query menhirLib" in
()
else
printf "%s\n%!" Installation.libdir;
exit 0
(* ------------------------------------------------------------------------- *) (* ------------------------------------------------------------------------- *)
(* Export the settings. *) (* Export the settings. *)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment