From faad4bf4bfacc308b1e93fe8e16ac55d5b8b718f Mon Sep 17 00:00:00 2001 From: Matej Košík Date: Fri, 11 Aug 2017 18:25:05 +0200 Subject: fix coq_makefile Make sure that when plugin writer does not use -bypass-API, API is opened by default. --- tools/CoqMakefile.in | 2 +- 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) ;; -- cgit v1.2.3