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 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id A3FC1BC6C for ; Mon, 28 Jan 2008 12:27:16 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ao8CAA5LnUeBrw8EW2dsb2JhbACQHhUKKpoI X-IronPort-AV: E=Sophos;i="4.25,259,1199660400"; d="scan'208";a="21880191" Received: from ext.lri.fr ([129.175.15.4]) by mail4-smtp-sop.national.inria.fr with ESMTP; 28 Jan 2008 12:27:16 +0100 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id D5DBAA4937 for ; Mon, 28 Jan 2008 12:06:37 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at lri.fr Received: from ext.lri.fr ([127.0.0.1]) by localhost (ext.lri.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Y7of3nwGMJzu for ; Mon, 28 Jan 2008 12:06:37 +0100 (CET) Received: from smtp.lri.fr (vhost3-23 [129.175.3.23]) by ext.lri.fr (Postfix) with ESMTP id A3526A4935 for ; Mon, 28 Jan 2008 12:06:37 +0100 (CET) Received: from [129.175.4.128] (lri4-128 [129.175.4.128]) by smtp.lri.fr (Postfix) with ESMTP id 9768AE0124 for ; Mon, 28 Jan 2008 12:06:37 +0100 (CET) Message-ID: <479DB7AA.9020605@lri.fr> Date: Mon, 28 Jan 2008 12:08:26 +0100 From: Romain Bardou User-Agent: Thunderbird 2.0.0.6 (X11/20071022) MIME-Version: 1.0 To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlbuild `Circular dependencies' References: <20080124142327.GC761@pc6197-c703.uibk.ac.at> <479DAD21.9040300@lri.fr> <20080128104309.GA3836@pc6197-c703.uibk.ac.at> In-Reply-To: <20080128104309.GA3836@pc6197-c703.uibk.ac.at> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; lri:01 byte:01 lib:01 lib:01 byte:01 compile:01 caml-list:01 cma:01 cma:01 bin:01 binary:02 depends:04 depends:04 problem:05 consists:06 > Still my question remains, how one should configure a project > that consists of several libraries and one binary, together > with ocamlbuild. E.g., > > +- prof.dir/ > +-+- A/ > | +- a.mllib > | +- a1.ml > | +- ... > | +- aN.ml > | > +-+- B/ > | +- b.mllib > | +- b1.ml > | +- ... > | +- bN.ml > | > +-+- Main/ > +- main.ml (depending on a.cma and b.cma) Well, is it a problem to compile using: ocamlbuild -Is A,B,Main main.byte If you really want to build libraries independently then maybe you could build the cma files, copy them in a "lib" directory which won't be included by ocamlbuild (because of "sanitization" restrictions) and then use the "-lib" option to use "lib/a.cma" and "lib/b.cma"... The script would look like this, supposing B depends on A and Main depends on A and B (not tested): #!/bin/sh ocamlbuild -I A a.cma cp _build/A/a.cma lib ocamlbuild -lib lib/a -I B b.cma cp _build/B/b.cma lib ocamlbuild -libs lib/a,lib/b -I Main main.byte -- Romain Bardou