From: Romain Bardou <Romain.Bardou@lri.fr>
To: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] ocamlbuild `Circular dependencies'
Date: Mon, 28 Jan 2008 12:08:26 +0100 [thread overview]
Message-ID: <479DB7AA.9020605@lri.fr> (raw)
In-Reply-To: <20080128104309.GA3836@pc6197-c703.uibk.ac.at>
> 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
next prev parent reply other threads:[~2008-01-28 11:27 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-01-24 14:23 Christian Sternagel
2008-01-28 10:23 ` [Caml-list] " Romain Bardou
2008-01-28 10:43 ` Christian Sternagel
2008-01-28 11:08 ` Romain Bardou [this message]
2008-01-28 14:24 ` Nicolas Pouillard
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=479DB7AA.9020605@lri.fr \
--to=romain.bardou@lri.fr \
--cc=caml-list@yquem.inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox