Browse thread
ocamlbuild `Circular dependencies'
-
Christian Sternagel
-
Romain Bardou
-
Christian Sternagel
- Romain Bardou
- Nicolas Pouillard
-
Christian Sternagel
-
Romain Bardou
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ 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 `Circular dependencies' |
> Still my question remains, how one should configure a project > that consists of several libraries and one binary, together > with ocamlbuild. E.g., > > +- prof.dir/ > +-+- A/ > | +- a.mllib > | +- a1.ml > | +- ... > | +- aN.ml > | > +-+- B/ > | +- b.mllib > | +- b1.ml > | +- ... > | +- bN.ml > | > +-+- Main/ > +- main.ml (depending on a.cma and b.cma) Well, is it a problem to compile using: ocamlbuild -Is A,B,Main main.byte If you really want to build libraries independently then maybe you could build the cma files, copy them in a "lib" directory which won't be included by ocamlbuild (because of "sanitization" restrictions) and then use the "-lib" option to use "lib/a.cma" and "lib/b.cma"... The script would look like this, supposing B depends on A and Main depends on A and B (not tested): #!/bin/sh ocamlbuild -I A a.cma cp _build/A/a.cma lib ocamlbuild -lib lib/a -I B b.cma cp _build/B/b.cma lib ocamlbuild -libs lib/a,lib/b -I Main main.byte -- Romain Bardou