Skip to Content.
Sympa Menu

coq-club - Re: [Coq-Club] coq_makefile and ocamlfind

coq-club AT inria.fr

Subject: The Coq mailing list

List archive

Re: [Coq-Club] coq_makefile and ocamlfind


Chronological Thread 
  • From: Pierre Boutillier <pierre.boutillier AT pps.univ-paris-diderot.fr>
  • To: coq-club AT inria.fr
  • Subject: Re: [Coq-Club] coq_makefile and ocamlfind
  • Date: Wed, 1 Apr 2015 11:15:42 +0200

Hi, beware ugly adhoc hacks ...
> Le 1 avr. 2015 à 10:54, Ali Assaf
> <ali.assaf AT inria.fr>
> a écrit :
>
> Hello,
>
> I am trying to compile a coq plugin that depends on an external library. In
> particular, one of the modules of the plugin depends on the Yojson library
> (Opam installed, but that is not relevant I think). I can compile the
> module using ocamlfind, but how can I tell coq_makefile to use ocamlfind?
You could put in your input file for coq_makefile (called _CoqProject if you
want coqide or proof general total advantage of it)
CAMLC?=$(OCAMLFIND) ocamlc -c -rectypes -thread
CAMLOPTC?=$(OCAMLFIND) opt -c -rectypes -thread
CAMLLINK?=$(OCAMLFIND) ocamlc -rectypes -thread
CAMLOPTLINK?=$(OCAMLFIND) opt -rectypes -thread
and
OCAMLLIBS?=```-I « . » or whatever you need for your ml file``` -package
yojson

OK, we’re not home yet, there is still an issue with ocamldep !
Then, I think the answer is « support my claim that ocamlfind is a reasonable
dependency for Coq and therefore I can make coq 8.6 on it » :-)
> Is there another portable way to tell coq_makefile to use the library?
Well maybe just redefine OCAMLLIBS with something like
OCAMLLIBS = -I src_dirs_in_the_dev $(shell ocamlfind query -i-format yojson)

>
> Thanks,
>
> Ali Assaf
Pierre B.


Archive powered by MHonArc 2.6.18.

Top of Page