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.1 required=5.0 tests=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id EB0CEBC6C for ; Wed, 2 May 2007 13:59:00 +0200 (CEST) Received: from wr-out-0506.google.com (wr-out-0506.google.com [64.233.184.238]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id l42BwxPl021288 for ; Wed, 2 May 2007 13:59:00 +0200 Received: by wr-out-0506.google.com with SMTP id l58so103002wrl for ; Wed, 02 May 2007 04:58:58 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=o1rzay7+LMVT8tKkRxt1VFx9F8htMPh0kiYVIDdH6++8X1IuMl6ngcprOo7yxs2M6Fou4758F8tbKSrK0Ub7qkKFsCNqOqUz4kd1I3rTZMd+gcUZShFH/jequ56WPXsUyJ6+tLZYSwm46P6HQ244IQ0fVxymIdKTAKxOom01Qqo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=NehQ2JbYzgbgEjufTu0pm4U1M96owAzSCLLMtwazUwlyKL20AASjDt1p9EIHXrlI6PdPGeHzhip9eamS/v9SZXSMqLQ3Q3KbRWJV643ulCjE6F1Mk16qYXU0TlNapoAAgHdpSbnDQVEyZLCiGgj56s02fFszSYRRLPbqKf04Rc0= Received: by 10.115.46.9 with SMTP id y9mr197624waj.1178107138348; Wed, 02 May 2007 04:58:58 -0700 (PDT) Received: by 10.114.183.15 with HTTP; Wed, 2 May 2007 04:58:58 -0700 (PDT) Message-ID: Date: Wed, 2 May 2007 13:58:58 +0200 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: [Caml-list] Adding support for dypgen to ocamlbuild Cc: "Caml List" In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: X-j-chkmail-Score: MSGID : 46387D03.001 on concorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at concorde with ID 46387D03.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; ocaml:01 mli:01 deps:01 wrote:01 exception:01 caml-list:01 declaration:02 defining:02 env:03 env:03 let:03 manual:06 uses:06 nicolas:08 nicolas:08 On 5/2/07, Joel Reymont wrote: > How do I add support for dypgen to my ocamlbuild project? > > dypgen uses *.dyp files so I added <**/*.dyp>: dypgen to my _tags > file but I'm not sure how to proceed from there. > Tags, are about dealing with exception to the rule. You should start by defining a rule, no? You should look at ocamlbuild/ocaml_tools.ml and mimic rule declaration to handle dypgen. Look also at ocamlbuild/manual/myocamlbuild.ml which is a well documented ocamlbuild plugin. rule "Dypgen...." ~prods:["%.ml"; "%.mli"] ~deps:["%.dyp"] begin fun env build -> let ml = env "%.ml" in .... Cmd(S[A"dygen"; ....]) end;; -- Nicolas Pouillard