caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] OASIS and conditional compilation
@ 2012-12-15 16:02 Dario Teixeira
  2012-12-15 16:17 ` Wojciech Meyer
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Dario Teixeira @ 2012-12-15 16:02 UTC (permalink / raw)
  To: OCaml mailing-list; +Cc: Sylvain Le Gall

Hi,

I've come across a perplexing issue with OASIS.  I'm not sure if this is
just a bug or if I'm trying to push the tool beyond its design parameters.

PG'OCaml can be compiled against either Batteries or ExtLib (the latter
mostly for legacy compatibility). To allow the harmonious coexistence of
the two options in the same system, the build system should allow for
the compilation of one or the two versions of the library side by side.
In OASIS-speak (I'm using version 0.3):

  Flag "batteries"
    Description: Link PG'OCaml against Batteries
    Default: true

  Flag "extlib"
    Description: Link PG'OCaml against ExtLib
    Default: true

  Library "pgocaml_batteries"
    Build$:               flag(batteries)
    Install$:             flag(batteries)
    Path:                 src
    Modules:              PGOCaml, PGOCaml_generic
    BuildDepends:         unix, calendar, csv, pcre, batteries, camlp4.macro
    ByteOpt+:             -ppopt -DUSE_BATTERIES
    NativeOpt+:           -ppopt -DUSE_BATTERIES
    FindlibContainers:    pgocaml
    Findlibname:          batteries
    XMETARequires:        unix, calendar, csv, pcre, batteries

  Library "pgocaml_extlib"
    Build$:               flag(extlib)
    Install$:             flag(extlib)
    Path:                 src
    Modules:              PGOCaml, PGOCaml_generic
    BuildDepends:         unix, calendar, csv, pcre, extlib, camlp4.macro
    FindlibContainers:    pgocaml
    Findlibname:          extlib
    XMETARequires:        unix, calendar, csv, pcre, extlib

Note that the major difference is that "-ppopt -DUSE_BATTERIES" must be
passed to Camlp4 only when compiling the Batteries version.  The problem
is that it's *always* passed, even if the "batteries" flag is disabled
by passing "--disable-batteries" to the configure script.

Did I misinterpret something crucial about OASIS, or is this indeed a bug?

Thanks in advance!
Best regards,
Dario Teixeira

P.S. The full OASIS spec file can be viewed at this location:
     https://forge.ocamlcore.org/scm/viewvc.php/branches/oasification/_oasis?revision=157&root=pgocaml

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2012-12-16  1:13 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-15 16:02 [Caml-list] OASIS and conditional compilation Dario Teixeira
2012-12-15 16:17 ` Wojciech Meyer
2012-12-15 16:56   ` Dario Teixeira
2012-12-15 17:23   ` Sylvain Le Gall
2012-12-15 18:25     ` Dario Teixeira
2012-12-15 16:59 ` Török Edwin
2012-12-15 18:31   ` Dario Teixeira
2012-12-16  1:13 ` Jacques-Pascal Deplaix

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).