Version française
Home     About     Download     Resources     Contact us    
Browse thread
Best way to choose an implementation of a lib ?
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Christophe Raffalli <christophe.raffalli@u...>
Subject: Re: [Caml-list] Best way to choose an implementation of a lib ?
Eric Cooper a écrit :
> On Wed, Nov 30, 2005 at 09:19:30PM +0900, Jacques Garrigue wrote:
> 
>>From: Christophe Raffalli <christophe.raffalli@univ-savoie.fr>
>>
>>>Let say I want two distribute two(or more) implementations of a library
>>>with the .mli for all ...
>>>
>>>Is there a way to choose the implementation at link time ?
>>>[...]
>>
>>Directories seem a possible solution.
>>[...] 
>>An alternative to distinct directories is to create libraries (.cma/.cmxa).
> 
> 
> And yet another is to use symbolic links, for example
>     a.ml -> a_optimized_impl.ml
> or
>     a.ml -> a_reference_impl.ml
> 

This is not reasonable for a library. You can not ask the user to
change symbolic link in /usr/lib/ocaml ...

> (Note that when using "make", you have to be careful about stale
> object files after switching the symlink.  It's a good idea to do a
> "make clean" at the same time.)
> 

-- 
Christophe Raffalli
Université de Savoie
Batiment Le Chablais, bureau 21
73376 Le Bourget-du-Lac Cedex

tél: (33) 4 79 75 81 03
fax: (33) 4 79 75 87 42
mail: Christophe.Raffalli@univ-savoie.fr
www: http://www.lama.univ-savoie.fr/~RAFFALLI
---------------------------------------------
IMPORTANT: this mail is signed using PGP/MIME
At least Enigmail/Mozilla, mutt or evolution
can check this signature. The public key is
stored on www.keyserver.net
---------------------------------------------