caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamlfind path to META file ?
@ 2015-11-12 10:20 Daniel Bünzli
  2015-11-12 10:27 ` Gabriel Scherer
  0 siblings, 1 reply; 3+ messages in thread
From: Daniel Bünzli @ 2015-11-12 10:20 UTC (permalink / raw)
  To: OCaml List

Hello,  

Is there a way to get the path to the META file of a package ? 

Or will $(ocamlfind query $PKG)/META always do ?

Best, 

Daniel 



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

* Re: [Caml-list] ocamlfind path to META file ?
  2015-11-12 10:20 [Caml-list] ocamlfind path to META file ? Daniel Bünzli
@ 2015-11-12 10:27 ` Gabriel Scherer
  2015-11-12 10:39   ` Daniel Bünzli
  0 siblings, 1 reply; 3+ messages in thread
From: Gabriel Scherer @ 2015-11-12 10:27 UTC (permalink / raw)
  To: Daniel Bünzli; +Cc: OCaml List

`ocamlfind install` requires that either the META file is installed in
the package directory (so your command will work), or the -metadir
option is passed and the META file is installed in some META-only
directory that is global to the ocamlfind configuration. You can query
this directory with $(ocamlfind printconf metadir) (which returns an
empty line if no such directory is used).

This means that the following logic should always find your package file:
  - if $(ocamlfind printconf metadir) is not empty, look at
    $(ocamlfind printconf metadir)/META.$PKG
  - otherwise look at
    $(ocamlfind query $PKG)/META

On Thu, Nov 12, 2015 at 11:20 AM, Daniel Bünzli
<daniel.buenzli@erratique.ch> wrote:
> Hello,
>
> Is there a way to get the path to the META file of a package ?
>
> Or will $(ocamlfind query $PKG)/META always do ?
>
> Best,
>
> Daniel
>
>
>
> --
> Caml-list mailing list.  Subscription management and archives:
> https://sympa.inria.fr/sympa/arc/caml-list
> Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
> Bug reports: http://caml.inria.fr/bin/caml-bugs

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

* Re: [Caml-list] ocamlfind path to META file ?
  2015-11-12 10:27 ` Gabriel Scherer
@ 2015-11-12 10:39   ` Daniel Bünzli
  0 siblings, 0 replies; 3+ messages in thread
From: Daniel Bünzli @ 2015-11-12 10:39 UTC (permalink / raw)
  To: Gabriel Scherer; +Cc: OCaml List

Le jeudi, 12 novembre 2015 à 10:27, Gabriel Scherer a écrit :
> `ocamlfind install` requires that either the META file is installed in
> the package directory (so your command will work), or the -metadir
> option is passed and the META file is installed in some META-only
> directory that is global to the ocamlfind configuration. You can query
> this directory with $(ocamlfind printconf metadir) (which returns an
> empty line if no such directory is used).
>  
> This means that the following logic should always find your package file:
> - if $(ocamlfind printconf metadir) is not empty, look at
> $(ocamlfind printconf metadir)/META.$PKG
> - otherwise look at
> $(ocamlfind query $PKG)/META

Thanks. Though it would be nice to have a query flag that implements the logic, rather than each of us reimplementing it.  

Best,  

Daniel



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

end of thread, other threads:[~2015-11-12 10:39 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-12 10:20 [Caml-list] ocamlfind path to META file ? Daniel Bünzli
2015-11-12 10:27 ` Gabriel Scherer
2015-11-12 10:39   ` Daniel Bünzli

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).