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 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 47036BC69 for ; Sun, 16 Sep 2007 04:35:51 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAKoz7EbAXQImn2dsb2JhbACOFAIBAQcEBgcIGA X-IronPort-AV: E=Sophos;i="4.20,259,1186351200"; d="scan'208";a="2754811" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 16 Sep 2007 04:36:36 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l8G2aAaA016226 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Sun, 16 Sep 2007 04:36:10 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAG4z7EbRVYT5mGdsb2JhbACOFAIBAQcCBhEY X-IronPort-AV: E=Sophos;i="4.20,259,1186351200"; d="scan'208";a="16252227" Received: from an-out-0708.google.com ([209.85.132.249]) by mail4-smtp-sop.national.inria.fr with ESMTP; 16 Sep 2007 04:36:35 +0200 Received: by an-out-0708.google.com with SMTP id c24so186235ana for ; Sat, 15 Sep 2007 19:36:34 -0700 (PDT) Received: by 10.100.12.18 with SMTP id 18mr5012655anl.1189910194324; Sat, 15 Sep 2007 19:36:34 -0700 (PDT) Received: from laptop44.chn.comcast.net ( [68.48.11.159]) by mx.google.com with ESMTPS id c30sm3130798ana.2007.09.15.19.36.32 (version=SSLv3 cipher=OTHER); Sat, 15 Sep 2007 19:36:33 -0700 (PDT) Date: Sat, 15 Sep 2007 22:36:23 -0400 From: "Hezekiah M. Carty" To: caml-list@inria.fr Subject: ocamlbuild .inferred.mli problem Message-ID: <20070916023623.GA10905@laptop44.chn.comcast.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.5.16 (2007-06-09) Sender: "Hezekiah M. Carty" X-Miltered: at discorde with ID 46EC969A.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; mli:01 preprocess:01 camlp:01 mli:01 ocamlc:01 exited:01 compilation:01 ---end:01 camlp:01 -pp:01 cmo:01 syntax:01 pointers:01 00.:98 havoc:98 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) To build it: $ ocamlbuild test.cma ^^^ This works without issue $ ocamlbuild test.inferred.mli ^^^ This produces the following output/error: ---BEGIN PASTE--- + /home/hcarty/Applications/godi/bin/ocamlc.opt -i test.ml > test.inferred.mli File "test.ml", line 1, characters 0-5: Unbound value value Command exited with code 2. Compilation unsuccessful after building 2 targets (1 cached) in 00:00:00. ---END PASTE--- I have tried various changes with the _tags line, such as: and others, but have had no success. 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"]);; 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? Thanks, Hez