From: "Daniel Bünzli" <daniel.buenzli@erratique.ch>
To: ZAN DoYe <zandoye@gmail.com>
Cc: Christian Lindig <lindig@gmail.com>, caml-list@inria.fr
Subject: Re: [Caml-list] ocamlbuild add unexpected directories to including-dirs while building multi-targets
Date: Sun, 18 Oct 2015 12:12:07 +0100 [thread overview]
Message-ID: <2430F5FD6256499681D790672F3BE866@erratique.ch> (raw)
In-Reply-To: <56237C6C.40007@gmail.com>
Le dimanche, 18 octobre 2015 à 12:03, ZAN DoYe a écrit :
> Thanks. I think it's common that two targets contain modules with the same name. e.g. targetA.Init and targetB.Init. each target has a Init module to initialize themself. It'll be convenient if ocamlbuild isolates inc-dir for each target.
Note that if you are writing libraries you should prefix these names anyway as they would exist in the global toplevel namespace and hence potentially clash with other libraries.
That said I'm also often hit by the limitations you mention when I have libraries that provide multiple implementations of the same interface. The work around is to avoid `include`ing the directories in your _tags file and invoke ocamlbuild with the `-I` option, see for example [1].
Best,
Daniel
[1] https://github.com/dbuenzli/mtime/blob/a9dafd38002bfd8bdc5d3c3963e2d2d446c2ad6a/build#L19-L20
next prev parent reply other threads:[~2015-10-18 11:12 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-18 8:18 ZAN DoYe
2015-10-18 9:44 ` Christian Lindig
2015-10-18 11:03 ` ZAN DoYe
2015-10-18 11:12 ` Daniel Bünzli [this message]
[not found] ` <5623788A.2030302@gmail.com>
2015-10-18 11:05 ` Christian Lindig
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=2430F5FD6256499681D790672F3BE866@erratique.ch \
--to=daniel.buenzli@erratique.ch \
--cc=caml-list@inria.fr \
--cc=lindig@gmail.com \
--cc=zandoye@gmail.com \
/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