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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id C54F3BBC1 for ; Mon, 10 Mar 2008 17:12:06 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AvoAAK/61EeBrw8Eh2dsb2JhbACQfgEBAQgKKZgk X-IronPort-AV: E=Sophos;i="4.25,474,1199660400"; d="scan'208";a="9231767" Received: from ext.lri.fr ([129.175.15.4]) by mail1-smtp-roc.national.inria.fr with ESMTP; 10 Mar 2008 17:12:06 +0100 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 8D5A4A44AC; Mon, 10 Mar 2008 17:12:06 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id iKgYMEDMenZP; Mon, 10 Mar 2008 17:12:06 +0100 (CET) Received: from smtp.lri.fr (vhost3-23 [129.175.3.23]) by ext.lri.fr (Postfix) with ESMTP id 715C0A432B; Mon, 10 Mar 2008 17:12:06 +0100 (CET) Received: from [129.175.4.107] (lri4-107 [129.175.4.107]) by smtp.lri.fr (Postfix) with ESMTP id 66DE7E0536; Mon, 10 Mar 2008 17:12:06 +0100 (CET) Message-ID: <47D55E9F.4060800@lri.fr> Date: Mon, 10 Mar 2008 17:15:27 +0100 From: Romain Bardou User-Agent: Thunderbird 2.0.0.12 (X11/20080227) MIME-Version: 1.0 To: Dario Teixeira Cc: Nicolas Pouillard , Caml_mailing list Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4 References: <366498.253.qm@web54601.mail.re2.yahoo.com> In-Reply-To: <366498.253.qm@web54601.mail.re2.yahoo.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; lri:01 findlib:01 camlp:01 ocamlfind:01 ocamlc:01 -package:01 camlp:01 ocaml:01 ocamldep:01 -package:01 wrote:01 compile:01 caml-list:01 data:02 seems:03 > ocamlfind ocamlc -package sexplib.statements -syntax camlp4o -c data.ml To me it seems the only difference here with the case without camlp4 is the "-syntax camlp4o" option. If you add something like: After_rules -> flag ["ocaml"; "pkg_sexplib.statements"] (S[A"-syntax"; A"-camlp4o"]); to your myocamlbuild.ml, and tag your files with "pkg_sexplib.statements", and use the plugin I wrote which declares the "pkg_*" tags, does it work? (ocamldep might still not work so you might need to tweak it a bit with tags "compile", "link" and "doc"). Anyway, I don't think you need to modify Ocamlbuild to make it work (unless you don't want to use a plugin) if it is just a matter of adding "-syntax camlp4o" at the right moment. For the "-package" option, my previous solution should work. That being said, once Ocamlbuild handles multiple plugins, it will be easy to write your own, standard, generic plugin in your .ocamlbuild directory and use it in all of your projects :) -- Romain Bardou