Browse thread
Best way to choose an implementation of a lib ?
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Eric Cooper <ecc@c...> |
| Subject: | Re: [Caml-list] Best way to choose an implementation of a lib ? |
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
(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.)
--
Eric Cooper e c c @ c m u . e d u