Version française
Home     About     Download     Resources     Contact us    
Browse thread
Ocamlbuild with findlib + camlp4
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Dario Teixeira <darioteixeira@y...>
Subject: Re: [Caml-list] Ocamlbuild with findlib + camlp4
Hi Arnaud,

> The general idea is that it does *not* use ocamlfind ocamlc bar.ml 
> -syntax foo. It actually proceeds in two parts. The first part consists 
> in querying with ocamlfind query (using the shell, so it is not much of 
> a clean part) to get the list of files to pass to the preprocessor, then 

To make this code cleaner, you can query Findlib directly instead of
parsing "ocamlfind query" via the shell (I posted on this list a few
days ago a small code sample that does precisely this).  I am not sure,
however, how easy it is to use external libs ocamlbuild plugins.


> uses camlp4 with the marshalled AST printer (there is also a target to 
> build a pretty printed OCaml file from the file with syntax extension. 
> This is mostly useful for debugging your own syntax extensions though). 
> The second part consists in compiling this marshalled AST (using Findlib 
> again to locate the .cm{i,o,a} that need to be linked or used at typing 
> time).

So in a sense if you have to replicate a lot of the work that ocamlfind
already does.  Not ideal, but at the moment I also don't see another
solution.

Cheers,
Dario




      ___________________________________________________________ 
Rise to the challenge for Sport Relief with Yahoo! For Good  

http://uk.promotions.yahoo.com/forgood/