> But this same hack did not work on the 4.02.3 system. That probably just means you didn't install OCamlMakefile in that switch. You can get paths to library folders using opam itself, e.g. $ opam config var ocaml-makefile:lib /home/alice/.opam/4.02.1/lib/ocaml-makefile You can see the list of all variables available by running `opam config list`. In the output you see, you can replace PKG with any opam package name. On Wed, Sep 9, 2015 at 4:06 PM, Robert Muller wrote: > Greetings, probably the wrong forum for such a naive question but > hopefully someone can answer it in a couple of keystrokes! I am using OCaml > makefiles across slightly skewed versions (4.02.1 and 4.02.3). In my local > Makefile, I'm specifying an explicit path to OCamlMakefile: > > ~/.opam/4.02.1/lib/ocaml-makefile/OCamlMakefile: > > that includes the release version 4.02.1. But I would prefer for this same > Makefile to work on version 4.02.3 too. It seems really wrong to be > specifying an explicit version number in a path. On my 4.02.1 version, I > was able to replace the version number by "system". This seems to work --- > there is a /lib/ocaml-makefile/ folder there. But this same hack did not > work on the 4.02.3 system. > > So my question is, what is the recommended (i.e., modular and portable) > way to address an OPAM resource such as OCamlMakefile? I suppose I > shouldn't have to know much of anything about the structure of the .opam > directory. (?) > > Thanks! > Bob Muller >