From: "Mikkel Fahnøe Jørgensen" <mikkel@dvide.com>
To: David Rajchenbach-Teller <David.Teller@ens-lyon.org>
Cc: OCaml <caml-list@inria.fr>
Subject: Re: [Caml-list] Conditional compilation wrt OCaml version?
Date: Mon, 26 Jan 2009 23:58:31 +0100 [thread overview]
Message-ID: <caee5ad80901261458k3c852ab8hdf023a618f678857@mail.gmail.com> (raw)
In-Reply-To: <1233005104.20843.25.camel@Blefuscu>
> Working on Batteries, we're faced with a few places where we'd like to
> perform conditional compilation depending on the version of OCaml being
> used. We could probably do this with Camlp4, cpp, Autoconf hackery, etc.
> -- but first, we need to decide on which of these options we'll adopt.
>
> Any suggestion?
If you are interested in using ocamlbuild you can have a look at
ocamlbuild-ctools:
http://dvide.com/labs/ocamlbuild-ctools/
I added extensions to ocamlbuild using a syntax like
normalfile.o
[mytag,myothertag,~notthistag]
conditionalfile.o
...
this is done in a .cprog file that lists all files to include, but
that same could be done with other similar files e.g. .mllib
Also, I added multi-variant builds so the same build can handle
multiple build targets based on tags - for example debug and release
builds. Multivariant builds work by adding tags in the filename:
myfile.variant_release,mingw.o
Most of this could be integrated into ocamlbuild, but ocamlbuild is
not very actively maintained as I understand.
Mikkel
prev parent reply other threads:[~2009-01-26 22:58 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-26 21:25 David Rajchenbach-Teller
2009-01-26 21:40 ` Sylvain Le Gall
2009-01-29 8:43 ` Ocamlopt+macros, caching MetaOcaml code. Was: " Jan Kybic
2009-01-29 13:00 ` [Caml-list] " Jérémie Dimino
2009-01-29 9:21 ` [Caml-list] " David Rajchenbach-Teller
2009-01-26 22:58 ` Mikkel Fahnøe Jørgensen [this message]
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=caee5ad80901261458k3c852ab8hdf023a618f678857@mail.gmail.com \
--to=mikkel@dvide.com \
--cc=David.Teller@ens-lyon.org \
--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