From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id 3D828BC37 for ; Thu, 6 Aug 2009 13:16:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: ApsEAANZekrVocsccWdsb2JhbACaRgEMCwkbuUaEGAU X-IronPort-AV: E=Sophos;i="4.43,332,1246831200"; d="scan'208";a="44396304" Received: from happycoders.org (HELO felicie.happycoders.org) ([213.161.203.28]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 06 Aug 2009 13:16:39 +0200 Received: from 80-254-74-156.dynamic.swissvpn.net ([80.254.74.156]) by felicie.happycoders.org with esmtpsa (TLS-1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.63) (envelope-from ) id 1MZ0xa-0004rv-Lj for caml-list@yquem.inria.fr; Thu, 06 Aug 2009 13:16:38 +0200 Message-Id: From: ChoJin To: caml-list@yquem.inria.fr Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v935.3) Subject: OCamlMakefile, menhir and its --infer option Date: Thu, 6 Aug 2009 13:16:35 +0200 X-Mailer: Apple Mail (2.935.3) X-Spam: no; 0.00; lrde:01 ocamlyacc:01 parser:01 parser:01 lexer:01 mll:01 makefile:01 unbound:01 inline:01 compiles:01 mly:01 mly:01 compiling:02 seems:03 module:03 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