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.3 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr 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 3B9FEBBC1 for ; Mon, 10 Mar 2008 22:15:44 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnAAADpC1UfOvjGroWdsb2JhbACRAwEBAQEBAQUEBgkIAReZLQ X-IronPort-AV: E=Sophos;i="4.25,476,1199660400"; d="scan'208";a="23600565" Received: from web54601.mail.re2.yahoo.com ([206.190.49.171]) by mail4-smtp-sop.national.inria.fr with SMTP; 10 Mar 2008 22:15:43 +0100 Received: (qmail 2122 invoked by uid 60001); 10 Mar 2008 21:15:42 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=6oco/wfo2CQx4cl6QYPeLxtHd1PEw33C/5WKGLIO+0+tRkIZnEWXFSUpQ7LHzR5l5+l+sATqUxhFTZP6QugG88CTw53U7vZc+LugB3e1niMkOuPXF/C9PGgn9gCKjWK4+OZkG831P6R29XgXhh27vgYBD2Db6BQ9OAc2N7uworY=; X-YMail-OSG: 92By4dQVM1m_xv0un2oGT4GUCLtdDdOj44fn8Q3PWlrsRFBOiaOvYdKF925FzW4mpgo1sr7WnOYc9eN2wjPMa0CpXcc7cV32pglG84O6lDCXrM8Ec0WyTUR8pPG0zaJ4eeKNALzmjURF4_4P6J6OvrEddA-- Received: from [82.155.116.30] by web54601.mail.re2.yahoo.com via HTTP; Mon, 10 Mar 2008 21:15:42 GMT Date: Mon, 10 Mar 2008 21:15:42 +0000 (GMT) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4 To: Arnaud Spiwack Cc: Nicolas Pouillard , Caml_mailing list In-Reply-To: <47D5926A.9070602@lix.polytechnique.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <673652.94393.qm@web54601.mail.re2.yahoo.com> X-Spam: no; 0.00; findlib:01 camlp:01 ocamlfind:01 ocamlc:01 foo:01 ocamlfind:01 findlib:01 libs:01 camlp:01 ocaml:01 syntax:01 syntax:01 cheers:01 arnaud:01 parsing:01 Hi Arnaud, > The general idea is that it does *not* use ocamlfind ocamlc bar.ml > -syntax foo. It actually proceeds in two parts. The first part consists > in querying with ocamlfind query (using the shell, so it is not much of > a clean part) to get the list of files to pass to the preprocessor, then To make this code cleaner, you can query Findlib directly instead of parsing "ocamlfind query" via the shell (I posted on this list a few days ago a small code sample that does precisely this). I am not sure, however, how easy it is to use external libs ocamlbuild plugins. > uses camlp4 with the marshalled AST printer (there is also a target to > build a pretty printed OCaml file from the file with syntax extension. > This is mostly useful for debugging your own syntax extensions though). > The second part consists in compiling this marshalled AST (using Findlib > again to locate the .cm{i,o,a} that need to be linked or used at typing > time). So in a sense if you have to replicate a lot of the work that ocamlfind already does. Not ideal, but at the moment I also don't see another solution. Cheers, Dario ___________________________________________________________ Rise to the challenge for Sport Relief with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/