From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA21067; Tue, 19 Oct 2004 15:03:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA21347 for ; Tue, 19 Oct 2004 15:03:26 +0200 (MET DST) Received: from publilogics.com (pouic.publilogics.com [213.186.50.35]) by concorde.inria.fr (8.13.0/8.13.0) with SMTP id i9JD3PpG026282 for ; Tue, 19 Oct 2004 15:03:26 +0200 Received: (qmail 19631 invoked from network); 19 Oct 2004 13:03:25 -0000 Received: from unknown (HELO PWARP) ([61.213.94.147]) (envelope-sender ) by pouic.publilogics.com (qmail-ldap-1.03) with SMTP for ; 19 Oct 2004 13:03:25 -0000 Message-ID: <003301c4b5db$f5a87620$0c05a8c0@PWARP> From: "Nicolas Cannasse" To: "Radu Grigore" , "caml-list" References: <7f8e92aa041019054919917bef@mail.gmail.com> Subject: Re: [Caml-list] make Date: Tue, 19 Oct 2004 22:02:57 +0900 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2800.1437 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441 X-Miltered: at concorde with ID 4175109D.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; cannasse:01 warplayer:01 caml-list:01 faq:01 caml-list:01 ocamake:01 ocamldep:01 faq:01 ocamldep:01 mli:01 runtime:01 mli:01 ocamake:01 tweak:01 cannasse:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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