caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alan Falloon <alan.falloon@marseda.com>
To: caml-list@inria.fr
Subject: Re: ocamlbuild and c libs
Date: Thu, 04 Oct 2007 10:49:54 -0400	[thread overview]
Message-ID: <fe2uj4$2lj$1@sea.gmane.org> (raw)
In-Reply-To: <23D3A6CC-0AE4-40A6-8626-4600C0EEE7C0@epfl.ch>

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.

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.

> 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 ?

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))


  reply	other threads:[~2007-10-04 21:11 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-30 21:52 Daniel Bünzli
2007-10-04 14:49 ` Alan Falloon [this message]
2007-10-08 13:25   ` [Caml-list] " Nicolas Pouillard
2007-10-09 14:11     ` Alan Falloon
2007-10-10 14:38       ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='fe2uj4$2lj$1@sea.gmane.org' \
    --to=alan.falloon@marseda.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).