Version française
Home     About     Download     Resources     Contact us    
Browse thread
Adding support for dypgen to ocamlbuild
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] Adding support for dypgen to ocamlbuild
On 5/2/07, Joel Reymont <joelr1@gmail.com> 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