diff options
| author | Matej Košík | 2017-08-11 18:25:05 +0200 |
|---|---|---|
| committer | Matej Košík | 2017-08-12 09:06:11 +0200 |
| commit | faad4bf4bfacc308b1e93fe8e16ac55d5b8b718f (patch) | |
| tree | 70ed458e4a3f43b8dc6980f8d53d39022eb08606 | |
| parent | 1f46ff6db53c2ca471d9ea067d0824755b2f34da (diff) | |
fix coq_makefile
Make sure that when plugin writer does not use -bypass-API,
API is opened by default.
| -rw-r--r-- | tools/CoqMakefile.in | 2 | ||||
| -rw-r--r-- | tools/coq_makefile.ml | 6 |
2 files changed, 6 insertions, 2 deletions
diff --git a/tools/CoqMakefile.in b/tools/CoqMakefile.in index e54ea45d41..3a8ca7b8d6 100644 --- a/tools/CoqMakefile.in +++ b/tools/CoqMakefile.in @@ -170,7 +170,7 @@ COQMAKEFILE_VERSION:=@COQ_VERSION@ COQSRCLIBS?= $(foreach d,$(COQ_SRC_SUBDIRS), -I "$(COQLIB)$(d)") -CAMLFLAGS=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP4LIB) +CAMLFLAGS=$(OCAMLLIBS) $(COQSRCLIBS) -I $(CAMLP4LIB) $(OCAML_API_FLAGS) CAMLLIB:=$(shell "$(OCAMLFIND)" printconf stdlib) diff --git a/tools/coq_makefile.ml b/tools/coq_makefile.ml index 327f53520c..0f38d19386 100644 --- a/tools/coq_makefile.ml +++ b/tools/coq_makefile.ml @@ -203,8 +203,12 @@ let generate_conf_coq_config oc args bypass_API = section oc "Coq configuration."; let src_dirs = if bypass_API then Coq_config.all_src_dirs - else Coq_config.api_dirs @ Coq_config.plugins_dirs @ ["-open API"] in + else Coq_config.api_dirs @ Coq_config.plugins_dirs in Envars.print_config ~prefix_var_name:"COQMF_" oc src_dirs; + if bypass_API then + Printf.fprintf oc "OCAML_API_FLAGS=\n" + else + Printf.fprintf oc "OCAML_API_FLAGS=-open API\n"; fprintf oc "COQMF_WINDRIVE=%s\n" (windrive Coq_config.coqlib) ;; |
