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 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 03542BBC1 for ; Mon, 10 Mar 2008 16:33:58 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AjYAAE7x1EfOvjGroWdsb2JhbACQfgEBAQEBAQUEBgkIAReYHg X-IronPort-AV: E=Sophos;i="4.25,474,1199660400"; d="scan'208";a="8222800" Received: from web54601.mail.re2.yahoo.com ([206.190.49.171]) by mail2-smtp-roc.national.inria.fr with SMTP; 10 Mar 2008 16:33:57 +0100 Received: (qmail 1439 invoked by uid 60001); 10 Mar 2008 15:33:56 -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=da2VgORhBknaNtLtVFZJxTU1yO5TUKxx6NZA3AF+nQRa3XfX03ITtTaURSeUf7bwCspdsPZiKXBqnE7P55Ru4mWe2y5EBopuib/ICd8sBdMCQ7y6Ia2mzRqhuwutizDq7JNutOK/HhSqz8d/VwRzmVV63D9hM8huScaEj5kkeXY=; X-YMail-OSG: rH_l2iAVM1l_DaTSLcqE8QsToPbH1LcKEoiCUgbJY6aSx4_LmIV8s57b5Lv91P.ff4EQXTTkx8PmqKjDUDl5uhqN.vPibr1q2W8lxAqQ8YgX1_b8sA2Bq_bZ114B1Hj8k6lXqZNY2FrwyXLAwgPyFa_bVw-- Received: from [82.155.116.30] by web54601.mail.re2.yahoo.com via HTTP; Mon, 10 Mar 2008 15:33:56 GMT Date: Mon, 10 Mar 2008 15:33:56 +0000 (GMT) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4 To: Nicolas Pouillard Cc: Caml_mailing list In-Reply-To: <1204976068-sup-9188@ausone.local> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <366498.253.qm@web54601.mail.re2.yahoo.com> X-Spam: no; 0.00; findlib:01 camlp:01 findlib:01 ocamlfind:01 camlp:01 syntax:01 syntax:01 bigarray:01 byte:01 cmxa:01 sexp:01 cmo:01 toploop:01 sexp:01 cmo:01 > Nice! Apart the link with findlib.cma that is not supported yet and could > be with the multiple-plugins support in ocamlbuild. I think that one can > easily build a generic plugin for ocamlfind packages. Hi, I hope so too. However, note that no one has managed yet to provide a solution to my original question, namely of integrating Ocamlbuild with findlib *and* camlp4. Perhaps I should have explained better what this entails: Suppose you are using the Sexplib syntax extension. This syntax extension depends on Sexplib itself and on another syntax extension, offered by the Type-conv package. The META package for Sexplib should contain the following: (note that the version currently shipping with GODI is incomplete) ############################################################### name="sexplib" version="3.0.0" description="Sexplib - automated S-expression conversions" requires="bigarray" archive(byte)="sexplib.cma" archive(native)="sexplib.cmxa" package "statements" ( requires = "sexplib,type-conv.statements,camlp4" version = "3.0.0" description = "Syntax extension for Sexplib" archive(syntax,preprocessor) = "pa_sexp_conv.cmo" archive(syntax,toploop) = "pa_sexp_conv.cmo" ) ############################################################### To compile with Findlib a data.ml file that makes use of the Sexplib syntax extension is very simple. You just have to specify the "sexplib.statements" package, and findlib will *automatically* take care of also loading libraries or even other syntax extensions needed by sexplib.statements: ocamlfind ocamlc -package sexplib.statements -syntax camlp4o -c data.ml Why am I insisting on this? Because when we manage to integrate these three tools, we will essentially have solved the very common request of providing easy access to common syntax extensions (just last week there was an OSR on this subject). All that will be required to compile a file such as data.ml using the Sexplib syntax extension will be to add a line ": use_sexplib.statements" to the _tags file. You won't even need to create a custom Ocamlbuild plugin or anything, because this findlib support could be provided by a default plugin (living on $HOME/.ocamlbuild or something). So, Nicolas, is this altogether feasible with the current Ocamlbuild? (And if so, could you lent us a hand -- you are of course the most competent person to do so). Kind regards, Dario ___________________________________________________________ Rise to the challenge for Sport Relief with Yahoo! For Good http://uk.promotions.yahoo.com/forgood/