Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Nicolas Cannasse" <warplayer@free.fr>
To: "Radu Grigore" <radugrigore@gmail.com>, "caml-list" <caml-list@inria.fr>
Subject: Re: [Caml-list] make
Date: Tue, 19 Oct 2004 22:02:57 +0900	[thread overview]
Message-ID: <003301c4b5db$f5a87620$0c05a8c0@PWARP> (raw)
In-Reply-To: <7f8e92aa041019054919917bef@mail.gmail.com>

> I have a problem with writing makefiles for OCaml and with compilation
> order. Probably a FAQ.
>
> Searching the caml-list archives I've found info about a tool by
> Nicolas Cannesse (ocamake) that can be used to compile a set of ml
> files into an executable or to generate a makefile such that a
> subsequent make command will construct the executable. However this is
> not quite what I want.
[...]
> Does such a tool exists? Does ocamldep already knows to do this and I
> didn't found it in the docs? Thanks.

This is not a FAQ and still an open problem.
OCamldep is working at the syntax level but does not differenciate between
the usage of a module *type* (so a compilation dependency : the MLI of the
module need to be compiled first) and the usage of a module *value* ( so a
compilation + runtime dependency : the MLI needs to be compiled first AND
the module linked first). Thus unless you rewrite your ocamldep you cannot
get enough information to correctly sort the CMO into the good order.
However ocamake is applying some algorithms in order to "guess" which order
might be valid in cases of conflict . A case of conflict arise when we
reduce the ML+MLI ocamldep graph output into a CMO only graph, merging ML
and MLI nodes, and thus sometimes creating cycles while there *is* a valid
compilation order.
Instead of doing again the job you might try to use the Makefile generation
from ocamake, or simply tweak it in order to make it output the linkage
order it found.

Regards,
Nicolas Cannasse

-------------------
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners


  reply	other threads:[~2004-10-19 13:03 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-10-19 12:49 Radu Grigore
2004-10-19 13:02 ` Nicolas Cannasse [this message]
2004-10-20  0:28   ` skaller
2004-10-19 13:16 ` Julien Signoles
2004-10-19 13:35   ` Radu Grigore
2004-10-19 19:12     ` noweb/nuweb (was: Re: [Caml-list] make) David MENTRE
2004-10-20  5:08       ` Radu Grigore
2004-10-21 11:12   ` [Caml-list] ocamldsort and directories Richard Jones
2004-10-22 18:04     ` Dimitri Ara
2004-10-19 14:48 ` [Caml-list] make Eric C. Cooper
2004-10-19 23:23   ` skaller
2004-10-21  2:41 ` Aleksey Nogin

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='003301c4b5db$f5a87620$0c05a8c0@PWARP' \
    --to=warplayer@free.fr \
    --cc=caml-list@inria.fr \
    --cc=radugrigore@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