Version française
Home     About     Download     Resources     Contact us    
Browse thread
Building multiple configurations?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Martin Jambon <martin.jambon@e...>
Subject: Re: [Caml-list] Building multiple configurations?
Grant Olson wrote:
> I'm doing something weird here and I'm thinking there has to be a better
> way.
> 
> I've got a configuration file that's a .ml file.  And I do want it to be
> an .ml file that gets included at compile time, not some .txt config
> file that gets read in at runtime.  I'm building two different versions
> of my app, with two different configurations.
> 
> Basically, I want to do the same thing as a C #ifdef:
> 
> #ifdef VERSION2
>    ... include version one
> #else
>    ... include version two
> #endif

I implemented a "C preprocessor" for OCaml called cppo that lets you do that.
 It may not be the best choice here but I think it's worth some advertising:

  http://martin.jambon.free.fr/cppo.html


Martin

-- 
http://mjambon.com/