caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Anil Madhavapeddy <anil@recoil.org>
To: Dario Teixeira <darioteixeira@yahoo.com>
Cc: OCaml Mailing List <caml-list@inria.fr>,
	pgocaml-general <pgocaml-general@lists.forge.ocamlcore.org>
Subject: Re: [Caml-list] Conditional BuildDepends in OASIS
Date: Fri, 26 Oct 2012 14:34:59 -0700	[thread overview]
Message-ID: <954FD2C2-7767-4A7B-9543-56C85F031CD3@recoil.org> (raw)
In-Reply-To: <1351274219.20181.YahooMailNeo@web111501.mail.gq1.yahoo.com>

On 26 Oct 2012, at 10:56, Dario Teixeira <darioteixeira@yahoo.com> wrote:
> 
> That would be a satisfactory solution.  I did run into a different problem, though.
> I told OASIS that "pgocaml.batteries" and "pgocaml.extlib" should have "pgocaml"
> as their findlib parent (fragment below).  Unfortunately, OASIS complains that
> library "pgocaml" does not exist.  How would I tell OASIS that "pgocaml" is a
> dummy library?
> 
> Flag "batteries"
>   Description: Use Batteries
>   Default: true
> 
> Library "pgocaml_batteries"
>   Build$:               flag(batteries)
>   Install$:             flag(batteries)
>   Path:                 src
>   Modules:              PGOCaml
>   BuildDepends:         calendar, batteries
>   ByteOpt+:             -ppopt -DUSE_BATTERIES
>   NativeOpt+:           -ppopt -DUSE_BATTERIES
>   FindlibParent:        pgocaml
>   Findlibname:          batteries

You could just put a dummy library in place (which shouldn't be used by anything
since you don't have to mark a dependency of a findlib child on the parent
library, as far as I understand it.

However, is there a common subset of your code that is portable without either
Batteries or Extlib?  Factoring that out into a core library that both of the
other ones depend on would make future ports (e.g., to Core or Lwt) easier.

Of course, this is easier said than done when dealing with replacement standard
libraries which redefine very common library functions!  It's a lot easier when
factoring over I/O libraries like Lwt vs Async where a straightforward functor
abstraction exists.

-anil


  reply	other threads:[~2012-10-26 21:35 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-25 13:57 Dario Teixeira
2012-10-25 20:12 ` Anil Madhavapeddy
2012-10-26 17:56   ` Dario Teixeira
2012-10-26 21:34     ` Anil Madhavapeddy [this message]
2012-10-30 22:57     ` [Caml-list] " Sylvain Le Gall
2012-11-01 15:18       ` Dario Teixeira
2012-11-02  0:56         ` Anil Madhavapeddy
2012-11-02 18:08           ` Dario Teixeira

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=954FD2C2-7767-4A7B-9543-56C85F031CD3@recoil.org \
    --to=anil@recoil.org \
    --cc=caml-list@inria.fr \
    --cc=darioteixeira@yahoo.com \
    --cc=pgocaml-general@lists.forge.ocamlcore.org \
    /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;
as well as URLs for NNTP newsgroup(s).