caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* 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

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;
as well as URLs for NNTP newsgroup(s).