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

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-02-11 (22:26)
From: Matthieu Dubuget <matthieu.dubuget@g...>
Subject: Ocamlbuild question

I'm trying to manage "internal" camlfind packages. I use "internal" with
the same meanning than in ocamlbuild documentation when speaking about

I want my camlfind packages to be re-installed if one of their
dependency was modified. For this, I wrote a simple rule, based on
%.iocamlfind files containing the files to install into findlib
directory. This rule also produces a stamp file : %.oocamlfind.

I also want my camlfind package to be installed if they are needed by
another rule. For this, I do: dep ["pkg_"^nm][nm ^ ".oocamlfind"] for
each internal package.

It seems to work ok: Suppose that package toto requires package tutu.
When I ask ocamlbuild toto.oocamlfind, the packages tutu is re-built if
needed. And if I modify one file of tutu, and then ask ocamlbuild to
generate toto.oocamlbuild, tutu is re-built and installed into findlib
directories. fine.

BUT, when I'm producing a %.native from %.cmx, my dependencies (ie
%.oocamlfind files) are inserted in the command line...

Here is an example:
ocamlfind ocamlopt -linkpkg -package mtsvrac -package log
logtest/test.cmx mtsvrac.oocamlfind log.oocamlfind -o logtest/test.native

mtsvrac.oocamlfind and log.oocamlfind where added to the dependencies of

What would be the right solution to avoid this problem?
Is there something like a "dependency that should not be linked?"