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 and automatic dependencies
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2007-03-14 (12:24)
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,


Nicolas Pouillard