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=1.3 required=5.0 tests=SPF_FAIL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 153F1BC69 for ; Thu, 4 Oct 2007 23:11:39 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIbzBEfAXQImh2dsb2JhbACOOAEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,232,1188770400"; d="scan'208";a="3768533" Received: from discorde.inria.fr ([192.93.2.38]) by mail3-smtp-sop.national.inria.fr with ESMTP; 04 Oct 2007 23:11:38 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l94LBbmD016008 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Thu, 4 Oct 2007 23:11:38 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAIbzBEdQW+UCh2dsb2JhbACOOAEBAQgKKQ X-IronPort-AV: E=Sophos;i="4.21,232,1188770400"; d="scan'208";a="17308937" Received: from main.gmane.org (HELO ciao.gmane.org) ([80.91.229.2]) by mail4-smtp-sop.national.inria.fr with ESMTP; 04 Oct 2007 23:11:37 +0200 Received: from root by ciao.gmane.org with local (Exim 4.43) id 1IdXUI-0003Zm-R0 for caml-list@inria.fr; Thu, 04 Oct 2007 20:40:02 +0000 Received: from dsl-207-112-48-147.tor.primus.ca ([207.112.48.147]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Oct 2007 20:40:02 +0000 Received: from alan.falloon by dsl-207-112-48-147.tor.primus.ca with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 04 Oct 2007 20:40:02 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Alan Falloon Subject: Re: ocamlbuild and c libs Date: Thu, 04 Oct 2007 10:49:54 -0400 Message-ID: References: <23D3A6CC-0AE4-40A6-8626-4600C0EEE7C0@epfl.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@sea.gmane.org X-Gmane-NNTP-Posting-Host: dsl-207-112-48-147.tor.primus.ca User-Agent: Thunderbird 1.5.0.13 (X11/20070824) In-Reply-To: <23D3A6CC-0AE4-40A6-8626-4600C0EEE7C0@epfl.ch> Sender: news X-Miltered: at discorde with ID 4705570A.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; libs:01 bunzli:01 flags:01 deps:01 bindings:01 flags:01 toplevel:01 toplevel:01 environement:01 subdirectory:01 stubs:01 dirs:01 wrote:01 compiles:01 alan:02 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))