Version française
Home     About     Download     Resources     Contact us    
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: -- (:)
From: Romain Bardou <Romain.Bardou@l...>
Subject: Re: [Caml-list] ocamlbuild & deps
> 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