caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] .opam structure question
@ 2015-09-09 20:06 Robert Muller
  2015-09-09 20:26 ` Ashish Agarwal
  0 siblings, 1 reply; 2+ messages in thread
From: Robert Muller @ 2015-09-09 20:06 UTC (permalink / raw)
  To: Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

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

[-- Attachment #2: Type: text/html, Size: 1129 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Caml-list] .opam structure question
  2015-09-09 20:06 [Caml-list] .opam structure question Robert Muller
@ 2015-09-09 20:26 ` Ashish Agarwal
  0 siblings, 0 replies; 2+ messages in thread
From: Ashish Agarwal @ 2015-09-09 20:26 UTC (permalink / raw)
  To: Robert Muller; +Cc: Ocaml Mailing List

[-- Attachment #1: Type: text/plain, Size: 1518 bytes --]

> 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 <robert.muller2@gmail.com>
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
>

[-- Attachment #2: Type: text/html, Size: 2000 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-09-09 20:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-09-09 20:06 [Caml-list] .opam structure question Robert Muller
2015-09-09 20:26 ` Ashish Agarwal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).