Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild and c libs
[ 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@i...>
Subject: Re: [Caml-list] Re: ocamlbuild and c libs
Excerpts from Alan Falloon's message of Thu Oct 04 16:49:54 +0200 2007:
> Daniel Bünzli wrote:
> > Is it possible to specify build flags and deps in a compositional way ? 
> > That is I have C bindings in a libdip/ dir, I would like to specify the 
> > additional flags and dep there, not in the toplevel myocamlbuild.ml. I 
> > tried to make the toplevel plugin refer to external modules but it seems 
> > to be compiled in a restricted environement. I also tried to define a 
> > myocamlbuild.ml in libdip/ but it seems to be ignored. Is there 
> > something like a plugin hierarchy as with the _tag files ?
> 
> This is something that I am interested in as well. With this change plus 
> a couple of other small changes you would be able to make a project that 
> compiles on its own in ocamlbuild, or as a subdirectory of another 
> project. It would be very useful when working on separate, but 
> dependent, projects.

Having multiple plugins is the priority for the next version of ocamlbuild.

> Another useful addition would be to pass the include flags when 
> compiling c stubs. Right now, you need to write a plugin even if you 
> only want to include the other project directories.

You can also specify include directories using tags.

"libfoo": include

> > By the way I couldn't find it in the documentation but ocamlbuild 
> > ignores any directory starting with an underscore even if you include it 
> > explictly with a tag, is that right ?

That's intended.

> 
> I don't know if its intended, but the code is pretty clearly doing 
> exactly what you describe:
> 
> ocamlbuild/main.ml:105
> (String.length name > 0 && name.[0] <> '_' && not (List.mem name 
> !Options.exclude_dirs))

Right.
-- 
Nicolas Pouillard aka Ertai