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=1.0 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 768CCBC6B for ; Mon, 17 Sep 2007 16:25:01 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKMq7kbAXQImh2dsb2JhbACOFgkKJw X-IronPort-AV: E=Sophos;i="4.20,265,1186351200"; d="scan'208";a="2817462" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 17 Sep 2007 16:25:58 +0200 Received: from ausone.inria.fr (peray.inria.fr [128.93.8.98]) by discorde.inria.fr (8.13.6/8.13.6) with SMTP id l8HEP9UO012534; Mon, 17 Sep 2007 16:25:10 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Mon, _d Sep 2007 16:25:15 +0200 From: "Nicolas Pouillard" Cc: Inria Ocaml Mailing List Subject: Re: [Caml-list] ocamlbuild .inferred.mli problem To: "Hezekiah M. Carty" References: <20070916023623.GA10905@laptop44.chn.comcast.net> In-Reply-To: <20070916023623.GA10905@laptop44.chn.comcast.net> Date: Mon, 17 Sep 2007 16:25:15 +0200 Message-Id: <1190038867-sup-9845@ausone.inria.fr> User-Agent: Sup/0.1 Content-Type: text/plain; charset=utf-8 X-j-chkmail-Score: MSGID : 46EE8E45.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 46EE8E45.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mli:01 preprocess:01 camlp:01 camlp:01 -pp:01 cmo:01 flags:01 ocaml:01 ocaml:01 cmo:01 syntax:01 pointers:01 havoc:98 caml-list:01 inferred:02 Excerpts from Hezekiah M. Carty's message of Sun Sep 16 04:36:23 +0200 2007: > I have been unable to get ocamlbuild to preprocess a single .ml file > when creating an inferred interface file. Here is some simple code > to illustrate the problem: > > test.ml: > value f x = x + 2; > > _tags: > : pp(camlp4r) Using pp(...), is not the best way to use preprocessors. Try the camlp4r tag: "test.ml": camlp4r [...] > I have also tried creating a myocamlbuild.ml to get around this, but > using something like this in myocamlbuild.ml: > > flag ["use_openin"] > (S [A "-I"; A "+camlp4"; A "-pp"; A "camlp4o pa_openin.cmo"]);; You certainly don't want to add these flags to any commands that treat a file that is tagged use_openin. You certainly want to add them only for ocaml preprocessing. flag ["ocaml"; "pp"; "use_openin"] (A"pa_openin.cmo");; > along with a matching flag in _tags causes havoc, with each of the > items on the list being repeated twice and quoted, leading to shell > errors. > > I'm using revised syntax here as a simple example. I originally ran > in to this issue while trying to build a library which uses the > pa_openin camlp4 extension. > > Any suggestions or pointers on how to proceed with this? HTH, -- Nicolas Pouillard aka Ertai