English version
Accueil     Ŕ propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis ŕ jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml ŕ l'adresse ocaml.org.

Browse thread
ocamlbuild & deps
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-02-26 (13:05)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] ocamlbuild & deps

Le 21 févr. 09 ŕ 21:19, Daniel Bünzli a écrit :

> If the above is true then I think it would be usefull to mention  
> this in the documentation about the 'build' argument.

It seems to be false. Suppose we have the following dependencies ("->"  
is "depends")

A -> {B, C}
B -> {B1, B2}
C -> {C1, C2}

The idea is that ocamlbuild will take the static ~deps of the rules  
and construct a first tree of dependencies. Given this tree,  
ocamlbuild will start to build the dependencies from the leaves; I  
wasn't able to get precise information about how the nodes of this  
tree are followed but what seems to be sure is that it will try to  
build all the leaves first, thus some order exists. This means that  
for the example above if all dependencies are known via ~deps  
arguments the build order is going to be something like this (at least  
that would be the most sensible way of doing it, breadth-first order  

(B1 || B2 || C1 || C2); (C || B); A

where "||" is parallel, and ";" is sequencing.

Now if you try to simulate the static dependencies ~deps as I  
suggested in my last email. The build order you will get is :

(((B1 || B2); B) || ((C1 || C2); C)); A

and this order will give you different results when B can be built but  
C cannot (or vice-versa) as in that case you will build B (or C)  
whereas it won't be with static dependencies. Hence the conclusion is  
that you cannot simulate the ~deps argument as I suggested in my last