Browse thread
how can I use just a portion of another source directory with ocamlbuild?
-
Eric Cooper
- Jake Donham
[
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: | Jake Donham <jake.donham@s...> |
| Subject: | Re: [Caml-list] how can I use just a portion of another source directory with ocamlbuild? |
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