From: ChoJin <chojin@lrde.epita.fr>
To: caml-list@yquem.inria.fr
Subject: OCamlMakefile, menhir and its --infer option
Date: Thu, 6 Aug 2009 13:16:35 +0200 [thread overview]
Message-ID: <A44980BA-7FFD-45BD-B208-6A9C6707445F@lrde.epita.fr> (raw)
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
next reply other threads:[~2009-08-06 11:16 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-08-06 11:16 ChoJin [this message]
2009-08-24 11:59 ` [Caml-list] " Francois Pottier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=A44980BA-7FFD-45BD-B208-6A9C6707445F@lrde.epita.fr \
--to=chojin@lrde.epita.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).