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=AWL,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from discorde.inria.fr (discorde.inria.fr [192.93.2.38]) by yquem.inria.fr (Postfix) with ESMTP id 24C75BC6B for ; Wed, 14 Mar 2007 13:24:03 +0100 (CET) Received: from ik-out-1112.google.com (ik-out-1112.google.com [66.249.90.177]) by discorde.inria.fr (8.13.6/8.13.6) with ESMTP id l2ECO27B005825 for ; Wed, 14 Mar 2007 13:24:02 +0100 Received: by ik-out-1112.google.com with SMTP id c29so126062ika for ; Wed, 14 Mar 2007 05:24:02 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=r9dpfurbwI9syfebfsIopjYZwAhgdzgvy/FLRaI/qqWTVFPACM6e2w12RVvRgEFUg7oik7TYZEBPrH/lXQ04W0lOp3bh3ivirmFQ8ls4Awh4Ay5sAtk9SQxS/o1P9ggUa5CTwsCZG8pk/psgztPISCJUVRraAcbjZoLfw33CEyc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=UdRljR6yTyxqRI/XJYXH7Qkll1qNRB1P3eUvcmDyRf7XZPoDN7aEBnEFKdBiBYWu8tCdmeTHJAdu6p29SJK8/QlK0GU8Hgk17HG0rZNxI3VBJ4a9BKpEa8xeCSQ3P3vNhcF0hM2EWKOvDGHkKuFws2HkOgh3QGrZTN3+HduoKCo= Received: by 10.114.205.1 with SMTP id c1mr2875228wag.1173875041655; Wed, 14 Mar 2007 05:24:01 -0700 (PDT) Received: by 10.114.183.4 with HTTP; Wed, 14 Mar 2007 05:24:01 -0700 (PDT) Message-ID: Date: Wed, 14 Mar 2007 13:24:01 +0100 From: "Nicolas Pouillard" To: "Joel Reymont" Subject: Re: [Caml-list] ocamlbuild and automatic dependencies Cc: "Caml List" In-Reply-To: <80E2E3A7-2603-4706-8186-566C6DA14452@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <80E2E3A7-2603-4706-8186-566C6DA14452@gmail.com> X-j-chkmail-Score: MSGID : 45F7E962.001 on discorde : j-chkmail score : X : 0/20 1 0.000 -> 1 X-Miltered: at discorde with ID 45F7E962.001 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; dependencies:01 dependencies:01 ocamldep:01 ocamldep:01 -verbose:01 cmo:01 cheers:01 wrote:01 caml-list:01 dependency:01 silently:02 module:03 module:03 drawback:04 infer:07 On 3/14/07, Joel Reymont wrote: > ocamlbuild does handle "open Module" as well as detect usage of > Module.xxx. It does not seem to detect "module X = Module" and then > X.xxx when calculating dependencies. > > Am I missing something? > ocamlbuild runs ocamldep -module on your file so you can experiment by yourself. In "module X = Module" ocamldep infer a dependency on Module that's all. Since ocamldep can makes false positive (open A ;; open B ;;) ocamlbuild do nasty things to get rid of that. The drawback, is that sometimes ocamlbuild ignore silently some dependencies. In that case run it with -verbose 1 and look at the _log file. You will see: Warning: Failed to build the module B requested by ocamldep If you do think that's wrong to ignore it, then force it's construction: ocamlbuild b.cmo You will see why ocamlbuild ignores it. Hope it helps, Cheers, -- Nicolas Pouillard