From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: * X-Spam-Status: No, score=1.0 required=5.0 tests=AWL,HTML_MESSAGE,SPF_NEUTRAL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 5CBEBBC6B for ; Mon, 11 Feb 2008 23:59:37 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAHtisEfAXQInh2dsb2JhbACCPDWNSwEBAQgKKZR3hEY X-IronPort-AV: E=Sophos;i="4.25,335,1199660400"; d="scan'208";a="9065569" Received: from concorde.inria.fr ([192.93.2.39]) by mail3-smtp-sop.national.inria.fr with ESMTP; 11 Feb 2008 23:59:37 +0100 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m1BMxaZC027053 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 11 Feb 2008 23:59:36 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAMxhsEdC+VLrmGdsb2JhbACCPDWNSwEBAQEBBgQECQoYlHGERg X-IronPort-AV: E=Sophos;i="4.25,335,1199660400"; d="scan'208";a="7193909" Received: from wx-out-0506.google.com ([66.249.82.235]) by mail2-smtp-roc.national.inria.fr with ESMTP; 11 Feb 2008 23:59:36 +0100 Received: by wx-out-0506.google.com with SMTP id h28so6859618wxd.0 for ; Mon, 11 Feb 2008 14:59:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; bh=mSoaLsfjxD7+6XPudE1il1qPAdCfU2inJSQCfh9Ckdc=; b=BwXptZwhJu9/Beevi1+ZRjMEjyiXDvwBX1+HSm8QKLUnXWjBcTnr9Qsckg9u+RjzeAyRWAzJDh+KqQPEFBR0tL2df74xeQY6taSLiTDYttiRvQfmzHPIgmsoHnogXoPorF6vlxA0rKlPmzIJIcaV0ILoZQ+Thl1rT8EN0J5ufTk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:sender:to:subject:in-reply-to:mime-version:content-type:references:x-google-sender-auth; b=Kq9Sk02ca9BgkTF65QfD2Z2bioKSv5JKFprO/KZzG6GrC7hy8h4OT8HSMQi501AsZV4kdXDQuspvTQ2C4Z68TMaqpO2LPsRHT/xxDaKV8ULogDFiLIylbDcNmkYJSkqcBb8Bk1PyGbCpp7Iu1TDCqxC6FZb5+2AZ4jGuC0dSoAY= Received: by 10.70.69.1 with SMTP id r1mr346127wxa.54.1202770772302; Mon, 11 Feb 2008 14:59:32 -0800 (PST) Received: by 10.70.109.18 with HTTP; Mon, 11 Feb 2008 14:59:32 -0800 (PST) Message-ID: Date: Mon, 11 Feb 2008 14:59:32 -0800 From: "Jake Donham" Sender: jake.donham@gmail.com To: caml-list@inria.fr Subject: Re: [Caml-list] how can I use just a portion of another source directory with ocamlbuild? In-Reply-To: <20080211212315.GA12565@stratocaster.home> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_43351_3435686.1202770772302" References: <20080211212315.GA12565@stratocaster.home> X-Google-Sender-Auth: 31cf2ce71927fa83 X-Miltered: at concorde with ID 47B0D358.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; compilation:01 pathname:01 pathname:01 ocaml:01 bytecomp:01 ocaml:01 utils:01 bytecomp:01 translobj:01 compilation:01 translobj:01 wrote:01 wrote:01 parsing:01 typing:01 ------=_Part_43351_3435686.1202770772302 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 11, 2008 1:23 PM, Eric Cooper wrote: > I need to provide a new implementation of just b.ml for my > project. If I just use > : include > then the compilation of a.ml uses dir/b.ml instead of my ./b.ml. I have had success using Pathname.define_context in myocamlbuild.ml for this kind of thing; if you put the directory containing your new implementation first it will get picked up as desired, e.g. Pathname.define_context "ocaml/bytecomp" ["src/ocamljs"; "ocaml/parsing"; "ocaml/typing"; "ocaml/utils"]; in my ocamljs tree, where I need to replace bytecomp/translobj.ml. I'm under the impression that the include tag is just a global way of doing Pathname.define_context, so it seems like if you get things in the right order you should be able to make that work too, but I have not tried it. Jake ------=_Part_43351_3435686.1202770772302 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline On Feb 11, 2008 1:23 PM, Eric Cooper <ecc@cmu.edu> wrote:
I need to provide a new implementation of just b.ml for my
project. If I just use
   <dir>: include
then the compilation of a.ml uses dir/b.ml instead of my ./b.ml.

I have had success using Pathname.define_context in myocamlbuild.ml for this kind of thing; if you put the directory containing your new implementation first it will get picked up as desired, e.g.

  Pathname.define_context "ocaml/bytecomp" ["src/ocamljs"; "ocaml/parsing"; "ocaml/typing"; "ocaml/utils"];

in my ocamljs tree, where I need to replace bytecomp/translobj.ml.

I'm under the impression that the include tag is just a global way of doing Pathname.define_context, so it seems like if you get things in the right order you should be able to make that work too, but I have not tried it.

Jake

------=_Part_43351_3435686.1202770772302--