aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/coqProject_file.ml4
diff options
context:
space:
mode:
authorGravatar Matej Košík <matej.kosik@inria.fr>2017-05-30 10:49:41 +0200
committerGravatar Maxime Dénès <mail@maximedenes.fr>2017-06-12 16:43:32 +0200
commitc054dda76825435019ad1b29f7f4292d937d98f9 (patch)
treed2e921256915fe30c2511f52f8feeb2519e359f1 /lib/coqProject_file.ml4
parenta2e1e2fa4f0a005e07972488b6ce6ad59404bd2c (diff)
Add support for "-bypass-API" argument of "coq_makefile"
Plugin-writers can now use: -bypass-API parameter with "coq_makefile". The effect of that is that instead of -I API the plugin will be compiled with: -I config" -I dev -I lib -I kernel -I library -I engine -I pretyping -I interp -I parsing -I proofs -I tactics -I toplevel -I printing -I intf -I grammar -I ide -I stm -I vernac
Diffstat (limited to 'lib/coqProject_file.ml4')
-rw-r--r--lib/coqProject_file.ml410
1 files changed, 7 insertions, 3 deletions
diff --git a/lib/coqProject_file.ml4 b/lib/coqProject_file.ml4
index 7a1660569..97aa90e07 100644
--- a/lib/coqProject_file.ml4
+++ b/lib/coqProject_file.ml4
@@ -11,6 +11,7 @@ type project = {
makefile : string option;
install_kind : install option;
use_ocamlopt : bool;
+ bypass_API : bool;
v_files : string list;
mli_files : string list;
@@ -42,11 +43,12 @@ and install =
| UserInstall
(* TODO generate with PPX *)
-let mk_project project_file makefile install_kind use_ocamlopt = {
+let mk_project project_file makefile install_kind use_ocamlopt bypass_API = {
project_file;
makefile;
install_kind;
use_ocamlopt;
+ bypass_API;
v_files = [];
mli_files = [];
@@ -166,6 +168,8 @@ let process_cmd_line orig_dir proj args =
aux { proj with defs = proj.defs @ [v,def] } r
| "-arg" :: a :: r ->
aux { proj with extra_args = proj.extra_args @ [a] } r
+ | "-bypass-API" :: r ->
+ aux { proj with bypass_API = true } r
| f :: r ->
let f = CUnix.correct_path f orig_dir in
let proj =
@@ -185,11 +189,11 @@ let process_cmd_line orig_dir proj args =
(******************************* API ************************************)
let cmdline_args_to_project ~curdir args =
- process_cmd_line curdir (mk_project None None None true) args
+ process_cmd_line curdir (mk_project None None None true false) args
let read_project_file f =
process_cmd_line (Filename.dirname f)
- (mk_project (Some f) None (Some NoInstall) true) (parse f)
+ (mk_project (Some f) None (Some NoInstall) true false) (parse f)
let rec find_project_file ~from ~projfile_name =
let fname = Filename.concat from projfile_name in