From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: OCaml List <caml-list@yquem.inria.fr>
Subject: Re: [Caml-list] ocamlbuild & deps
Date: Thu, 26 Feb 2009 14:04:56 +0100 [thread overview]
Message-ID: <C516755E-F498-47D5-AF02-995133D69DC9@erratique.ch> (raw)
In-Reply-To: <231BADDB-F88E-4A3D-994B-863579C20810@erratique.ch>
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
reversed).
(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
email.
Best,
Daniel
next prev parent reply other threads:[~2009-02-26 13:05 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-02-20 14:01 Daniel Bünzli
2009-02-20 15:39 ` [Caml-list] " Romain Bardou
2009-02-20 16:31 ` Daniel Bünzli
2009-02-21 18:53 ` Romain Bardou
2009-02-21 20:19 ` Daniel Bünzli
2009-02-21 20:23 ` Daniel Bünzli
2009-02-26 13:04 ` Daniel Bünzli [this message]
2009-03-02 13:43 ` Daniel Bünzli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=C516755E-F498-47D5-AF02-995133D69DC9@erratique.ch \
--to=daniel.buenzli@erratique.ch \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox