From: Dario Teixeira <darioteixeira@yahoo.com>
To: Gabriel Scherer <gabriel.scherer@gmail.com>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Telling Ocamlbuild to link seemingly unreferenced modules
Date: Fri, 6 May 2011 12:34:00 -0700 (PDT) [thread overview]
Message-ID: <164349.91725.qm@web111505.mail.gq1.yahoo.com> (raw)
Hi,
> Thanks for the input, Gabriel. Directly hacking the
> myocamlbuild.ml file
> does work, and the process may be even further simplified
> with just a
> couple of lines:
>
> dep ["ocaml"; "link"; "native"] ["foo.cmx"];
> dep ["ocaml"; "link"; "byte"] ["foo.cmo"];
I may have spoken too soon regarding this problem being solved. The issue
now is that foo.cmx is linked *after* the "main" module, main.ml. I thought
I could influence Ocamlbuild's dependency graph by adding the following
extra after_rule:
dep ["ocaml"; "ocamldep"; "file:main.ml"] ["foo.ml"];
However, this does not seem to work. Any ideas on how I can convince
Ocamlbuild to link foo.cmx and to do it before main.cmx?
On a related note, if there's one tool in the Ocaml ecosystem that
desperately needs a manual is Ocamlbuild. I find myself mostly
cargo-culting when I interact with it: the documentation is sparse
and all over the place, making it very difficult to grok how the
whole fits together. /end rant.
Best regards,
Dario Teixeira
next reply other threads:[~2011-05-06 19:35 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-06 19:34 Dario Teixeira [this message]
-- strict thread matches above, loose matches on Subject: below --
2011-05-06 17:09 Dario Teixeira
2011-05-06 14:34 Dario Teixeira
2011-05-06 15:38 ` Gabriel Scherer
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=164349.91725.qm@web111505.mail.gq1.yahoo.com \
--to=darioteixeira@yahoo.com \
--cc=caml-list@inria.fr \
--cc=gabriel.scherer@gmail.com \
/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