caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Matthieu Dubuget <matthieu.dubuget@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: ocamlbuild -> toplevel
Date: Sat, 17 May 2008 23:41:59 +0200	[thread overview]
Message-ID: <482F5127.5080001@gmail.com> (raw)
In-Reply-To: <482CFA09.4090807@gmail.com>

I replied off-list to Nicolas (by mistake) in order to insist, because
my question was not clear enough.

After some more readings, I would say that my goal was to generate a
custom toplevel by linking an
"internal" library ("internal" is the term used on ocamlbuild wiki for
libraries built by ocamlbuild).

> Yes names in .mltop, .mlpack, .mllib are all module names only.
>
> However you can try to add:
>
>   use_lib "my" "pilot"
>
> To your myocamlbuild.ml.

This solution did not the job. From the documentation, it is not clear
to me what "use_lib" does exactly.
But I think it adds pilot.cm(x)a when linking my.cmo?

In my case, there are simply no my.cmo... I could have use the standard
toplevel and loaded pilot.cma.
Anyway, I found a solution:

I added: ocaml_lib "pilot" in my ocamlbuild.ml and I tagged my.top with
use_pilot in the _tags file.

And since I have no module to include in my toplevel, I generated a void
my.mltop file.

Salutations

P.S. During the process, I also used a copy of the myocamlbuild I found
on the wiki to use ocamlfind.
       I had to add one line for the ocamlmktop command :
Options.ocamlmktop := ocamlfind & A"ocamlmktop"


      parent reply	other threads:[~2008-05-17 21:42 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-16  3:05 Matthieu Dubuget
2008-05-16  7:38 ` [Caml-list] " Nicolas Pouillard
2008-05-17 21:41 ` Matthieu Dubuget [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=482F5127.5080001@gmail.com \
    --to=matthieu.dubuget@gmail.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).