English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Conditional compilation
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2009-08-18 (07:00)
From: Olivier Andrieu <oandrieu@n...>
Subject: Re: [Caml-list] Conditional compilation
On Tue, Aug 18, 2009 at 04:37, Edgar Friendly<thelema314@gmail.com> wrote:
> I'm starting to think that optcomp is just a mismatch for what I'm
> trying to do, and I'm trying to use the wrong tool for the job.  That
> said, I don't think it's the best solution (especially with already long
> compile times for the project) to use both optcomp and
> Camlp4MacroParser, so I guess I should figure out how to do
>        #if ocaml_version < (3, 11)
> in Camlp4MacroParser.  I guess autoconf might be of some help here,
> although I don't see an easy way to to pass text from an
> autoconf-created Makefile through ocamlbuild into only some files' [-pp]
> commands.  I think myocamlbuild.ml might be the key, maybe autoconf can
> produce it as well as Makefile.

sure, autoconf can produce any kind of file: it simply replace
occurrences of @VARIABLE@.
It's traditionally used to create makefiles or shell scripts but it'll
work on a .ml file just as well.