Version française
Home     About     Download     Resources     Contact us    
Browse thread
ocamlbuild and automatic dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Nicolas Pouillard <nicolas.pouillard@g...>
Subject: Re: [Caml-list] ocamlbuild and automatic dependencies
On 3/14/07, Joel Reymont <joelr1@gmail.com> 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