From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by yquem.inria.fr (Postfix) with ESMTP id 19F52BB9C for ; Wed, 30 Nov 2005 20:49:00 +0100 (CET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.13.0/8.13.0) with ESMTP id jAUJmxNT013655 for ; Wed, 30 Nov 2005 20:48:59 +0100 Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id UAA17706 for ; Wed, 30 Nov 2005 20:48:59 +0100 (MET) Received: from ux9.sp.cs.cmu.edu (UX9.SP.CS.CMU.EDU [128.2.220.166]) by nez-perce.inria.fr (8.13.0/8.13.0) with SMTP id jAUJmwQn013698 for ; Wed, 30 Nov 2005 20:48:58 +0100 Received: from c-24-3-154-200.hsd1.pa.comcast.net ([24.3.154.200]) by ux9.sp.cs.cmu.edu id aa06658; 30 Nov 2005 14:48 EST Received: from ecc by stratocaster.home with local (Exim 4.54) id 1EhXwh-0003lb-5m for caml-list@inria.fr; Wed, 30 Nov 2005 14:48:51 -0500 Date: Wed, 30 Nov 2005 14:48:51 -0500 To: caml-list@inria.fr Subject: Re: [Caml-list] Best way to choose an implementation of a lib ? Message-ID: <20051130194851.GB14312@localhost> Mail-Followup-To: caml-list@inria.fr References: <438D6B4D.1070004@univ-savoie.fr> <20051130.211930.102965761.garrigue@math.nagoya-u.ac.jp> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20051130.211930.102965761.garrigue@math.nagoya-u.ac.jp> User-Agent: Mutt/1.5.9i From: Eric Cooper X-Miltered: at concorde with ID 438E022B.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Miltered: at nez-perce with ID 438E022A.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Spam: no; 0.00; caml-list:01 lib:01 christophe:01 raffalli:01 christophe:01 raffalli:01 univ-savoie:01 mli:01 cmxa:01 symbolic:01 impl:01 impl:01 symlink:01 wrote:01 cma:01 X-Spam-Checker-Version: SpamAssassin 3.0.3 (2005-04-27) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.0.3 On Wed, Nov 30, 2005 at 09:19:30PM +0900, Jacques Garrigue wrote: > From: Christophe Raffalli > > > 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