From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id A914B7F249 for ; Tue, 30 Oct 2012 23:57:52 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of sylvain@le-gall.net) identity=pra; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="sylvain@le-gall.net"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of gclci-caml-list@m.gmane.org designates 80.91.229.3 as permitted sender) identity=mailfrom; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="gclci-caml-list@m.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of postmaster@plane.gmane.org designates 80.91.229.3 as permitted sender) identity=helo; client-ip=80.91.229.3; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="gclci-caml-list@m.gmane.org"; x-sender="postmaster@plane.gmane.org"; x-conformance=sidf_compatible; x-record-type="v=spf1" X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhAFAOhakFBQW+UDgWdsb2JhbABEhheFVKVRhCuOAiMBARYmJ4IeAQEFIw8BIjQJAhgCAhgOAgIQLAkSGRuHWQMTB6lagjuQJYEgiXBnBYUjgRMDkleBTYFRgRqKF4gA X-IronPort-AV: E=Sophos;i="4.80,683,1344204000"; d="scan'208";a="160940114" Received: from plane.gmane.org ([80.91.229.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/AES256-SHA; 30 Oct 2012 23:57:23 +0100 Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1TTKkT-0001Zh-IW for caml-list@inria.fr; Tue, 30 Oct 2012 23:57:29 +0100 Received: from ks399241.kimsufi.com ([37.59.37.175]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Oct 2012 23:57:29 +0100 Received: from sylvain by ks399241.kimsufi.com with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Tue, 30 Oct 2012 23:57:29 +0100 X-Injected-Via-Gmane: http://gmane.org/ To: caml-list@inria.fr From: Sylvain Le Gall Date: Tue, 30 Oct 2012 22:57:07 +0000 (UTC) Message-ID: References: <1351173429.15638.YahooMailNeo@web111503.mail.gq1.yahoo.com> <58E915E9-0BD4-4F0B-9581-B446C93A4EB8@recoil.org> <1351274219.20181.YahooMailNeo@web111501.mail.gq1.yahoo.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: ks399241.kimsufi.com User-Agent: slrn/pre1.0.0-18 (Linux) Subject: [Caml-list] Re: Conditional BuildDepends in OASIS On 26-10-2012, Dario Teixeira 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