From: Sylvain Le Gall <sylvain@le-gall.net>
To: caml-list@inria.fr
Subject: [Caml-list] Re: Conditional BuildDepends in OASIS
Date: Tue, 30 Oct 2012 22:57:07 +0000 (UTC) [thread overview]
Message-ID: <slrnk90mq5.7tq.sylvain@gallu.homelinux.org> (raw)
In-Reply-To: <1351274219.20181.YahooMailNeo@web111501.mail.gq1.yahoo.com>
On 26-10-2012, Dario Teixeira <darioteixeira@yahoo.com> wrote:
> Hi,
>
>
> Thanks for the suggestions, Anil!
>
>> However, your use case seems a little different, as I presume the
>> external interface of pgocaml doesn't vary by your choice of Extlib
>> or Batteries?
>
> Indeed.
>
>> Despite this, it might be easier just to define a "pgocaml.batteries"
>> and "pgocaml.extlib" and leave the choice with the user as to which
>> one they would like to select. You can make the dependency optional
>> at compile time so the package doesn't generated; e.g.
>>
>> Library cohttp_lwt_unix
>> Build$: flag(lwt)
>> Install$: flag(lwt)
>> Path: lwt
>> Findlibname: lwt
>> FindlibParent: cohttp
>> BuildDepends: lwt.unix, uri, cohttp, lwt.ssl, lwt.syntax
>> Modules: Cohttp_lwt_unix, (etc...)
>
> 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
>
Having pgocaml.batteries and pgocaml.extlib is the best solution,
depending on a flag is perfect. Congrat to have find it yourself ;-)
(don't forget to CC me directly if you want a quicker response, I am a
little bit overloaded and don't spend much time reading caml-list).
Concerning FindlibParent that complains about non-existing pgocaml, you
should use FindlibContainers rather than FindlibParent.
E.g:
Library "pgocaml_batteries"
Build$: flag(batteries)
Install$: flag(batteries)
Path: src
Modules: PGOCaml
BuildDepends: calendar, batteries
ByteOpt+: -ppopt -DUSE_BATTERIES
NativeOpt+: -ppopt -DUSE_BATTERIES
FindlibContainers: pgocaml
Findlibname: batteries
Containers are virtual by default...
Although, this something I am not proud of and in the upcoming oasis 0.4.0 everything
will go to "FindlibName: pgocaml.batteries" and OASIS will sort
parent/containers/library itself.
Cheers,
Sylvain Le Gall
--
My company: http://www.ocamlcore.com
Linkedin: http://fr.linkedin.com/in/sylvainlegall
Start an OCaml project here: http://forge.ocamlcore.org
OCaml blogs: http://planet.ocamlcore.org
next prev parent reply other threads:[~2012-10-30 22:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-25 13:57 [Caml-list] " Dario Teixeira
2012-10-25 20:12 ` Anil Madhavapeddy
2012-10-26 17:56 ` Dario Teixeira
2012-10-26 21:34 ` Anil Madhavapeddy
2012-10-30 22:57 ` Sylvain Le Gall [this message]
2012-11-01 15:18 ` [Caml-list] " 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=slrnk90mq5.7tq.sylvain@gallu.homelinux.org \
--to=sylvain@le-gall.net \
--cc=caml-list@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