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.1 required=5.0 tests=AWL 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 58DF2BBC4 for ; Fri, 20 Feb 2009 16:38:48 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AokDAPdcnkmBrw8EcWdsb2JhbACUVwEMCwkZv3SEDwY X-IronPort-AV: E=Sophos;i="4.38,242,1233529200"; d="scan'208";a="24441622" Received: from ext.lri.fr ([129.175.15.4]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 20 Feb 2009 16:38:48 +0100 Received: from localhost (localhost [127.0.0.1]) by ext.lri.fr (Postfix) with ESMTP id 2E5E7A4878; Fri, 20 Feb 2009 16:38:48 +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 kZyOkVE5VsO0; Fri, 20 Feb 2009 16:38:48 +0100 (CET) Received: from smtp.lri.fr (vhost3-23 [129.175.3.23]) by ext.lri.fr (Postfix) with ESMTP id 15BEEA4864; Fri, 20 Feb 2009 16:38:48 +0100 (CET) Received: from [129.175.4.107] (lri4-107 [129.175.4.107]) by smtp.lri.fr (Postfix) with ESMTP id 0C655E05B4; Fri, 20 Feb 2009 16:38:48 +0100 (CET) Message-ID: <499ECEB7.6010709@lri.fr> Date: Fri, 20 Feb 2009 16:39:35 +0100 From: Romain Bardou User-Agent: Thunderbird 2.0.0.19 (X11/20090105) MIME-Version: 1.0 To: =?ISO-8859-1?Q?Daniel_B=FCnzli?= Cc: OCaml List Subject: Re: [Caml-list] ocamlbuild & deps References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; lri:01 deps:01 deps:01 suppressing:01 dependencies:01 statically:01 compilation:01 compilation:01 dynamically:01 dynamically:01 compile:01 clearer:01 caml-list:01 argument:02 argument:02 > Am I right in thinking that in rule specifications we could get rid of > the ~dep(s) parameter of rules and have all deps be specified/discovered > dynamically via the 'build' argument ? Otherwise stated is ~dep(s) just > an optimization ? > > Out of curiosity any idea in the cost of suppressing these arguments > (i.e. was that road actually followed at some point) ? > > If the answer to the first question is yes. Then I think the > documentation could be made clearer by stating that what is asked to be > built by the 'build' argument is considered as dependencies. However if > you know some deps statically you can specify them as dep(s) argument > this will just implicitely add them to the list given to the 'build' > argument. I think there is a difference. It is indeed an optimization issue but not at the level of Ocamlbuild itself : it is as the level of your compilation process. If A *dynamically* depends on B, and your whole project (say, 10 hours of compilation) depends on A, but you have no way to build B, then Ocamlbuild will start to compile your project until it finds out that A cannot be built (maybe several hours later). If B had been put as a ~dep, then Ocamlbuild would not even had started building the project in the first place, saving you a lot of time. Well, at least that's how I understand it ;) -- Romain Bardou