* OCamlMakefile, menhir and its --infer option
@ 2009-08-06 11:16 ChoJin
2009-08-24 11:59 ` [Caml-list] " Francois Pottier
0 siblings, 1 reply; 2+ messages in thread
From: ChoJin @ 2009-08-06 11:16 UTC (permalink / raw)
To: caml-list
Hello,
I have an issue while using OCamlMakefile, menhir and its --infer
option.
I have something along those lines:
OCAMLYACC = menhir
SOURCES = \
parser/ir.ml \
parser/parser.mly \
parser/lexer.mll \
main.ml
[...]
like this, everything is fine. But then, if I start using menhir
features such as %inline or the standard library, menhir advises to
use the --infer option
hence the added
YFLAGS = --infer
variable in the Makefile
The issue I have is that no matter what, OCamlMakefile runs menhir
before compiling parser/ir.ml, yielding to a "Unbound module Ir" since
my parser.mly is trying to "open Ir".
Looking at OCamlMakefile source, it seems to come from the PRE_TARGETS
variable which always compiles .mly first.
So my question is: what is the proper way of doing it ? Should I just
drop the --infer menhir's option or is there a better way?
--
Best Regards,
ChoJin
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [Caml-list] OCamlMakefile, menhir and its --infer option
2009-08-06 11:16 OCamlMakefile, menhir and its --infer option ChoJin
@ 2009-08-24 11:59 ` Francois Pottier
0 siblings, 0 replies; 2+ messages in thread
From: Francois Pottier @ 2009-08-24 11:59 UTC (permalink / raw)
To: ChoJin; +Cc: caml-list
Hello,
On Thu, Aug 06, 2009 at 01:16:35PM +0200, ChoJin wrote:
> I have an issue while using OCamlMakefile, menhir and its --infer
> option.
I don't know if OCamlMakefile properly supports menhir with the --infer
option.
The simplest solution to your problem would be to use ocamlbuild instead of
OCamlMakefile. Another possibility would be to use "Makefile.shared", which is
provided with menhir -- it is, however, known to have some bugs.
--
François Pottier
Francois.Pottier@inria.fr
http://gallium.inria.fr/~fpottier/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2009-08-24 11:59 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-08-06 11:16 OCamlMakefile, menhir and its --infer option ChoJin
2009-08-24 11:59 ` [Caml-list] " Francois Pottier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox