English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

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: 2007-05-02 (11:59)
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"]
  begin fun env build ->
      let ml = env "%.ml" in
       Cmd(S[A"dygen"; ....])

Nicolas Pouillard