From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id D2F70BC6B for ; Mon, 8 Oct 2007 15:26:16 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAALrMCUfAXQImh2dsb2JhbACOQwIBCAop X-IronPort-AV: E=Sophos;i="4.21,242,1188770400"; d="scan'208";a="2441364" Received: from discorde.inria.fr ([192.93.2.38]) by mail1-smtp-roc.national.inria.fr with ESMTP; 08 Oct 2007 15:26:16 +0200 Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l98DQF0s020662 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 8 Oct 2007 15:26:16 +0200 X-IronPort-AV: E=Sophos;i="4.21,242,1188770400"; d="scan'208";a="2441363" Received: from peray.inria.fr (HELO ausone.inria.fr) ([128.93.8.98]) by mail1-relais-roc.national.inria.fr with SMTP; 08 Oct 2007 15:26:16 +0200 Received: by ausone.inria.fr (sSMTP sendmail emulation); Mon, _d Oct 2007 15:25:45 +0200 From: "Nicolas Pouillard" Cc: caml-list Subject: Re: [Caml-list] Re: ocamlbuild and c libs To: Alan Falloon References: <23D3A6CC-0AE4-40A6-8626-4600C0EEE7C0@epfl.ch> In-Reply-To: Date: Mon, 08 Oct 2007 15:25:45 +0200 Message-Id: <1191849838-sup-8791@ausone.inria.fr> User-Agent: Sup/0.1 Content-Type: text/plain; charset=utf-8 X-j-chkmail-Score: MSGID : 470A2FF7.000 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 470A2FF7.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; libs:01 flags:01 deps:01 bindings:01 flags:01 toplevel:01 toplevel:01 environement:01 subdirectory:01 stubs:01 libfoo:01 dirs:01 wrote:01 compiles:01 caml-list:01 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