From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA11327 for caml-redistribution; Fri, 11 Sep 1998 19:35:15 +0200 (MET DST) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id TAA06950 for ; Fri, 11 Sep 1998 19:03:35 +0200 (MET DST) Received: from welcome.disi.unige.it (welcome.disi.unige.it [130.251.61.111]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id TAA06915 for ; Fri, 11 Sep 1998 19:03:33 +0200 (MET DST) Received: (from leroy@localhost) by welcome.disi.unige.it (8.8.3/8.6.9) id TAA10170; Fri, 11 Sep 1998 19:09:56 +0200 Message-ID: <19980911190956.D10140@welcome.disi.unige.it> Date: Fri, 11 Sep 1998 19:09:56 +0200 From: Xavier Leroy To: Christian Lindig , Caml Mailing List Subject: Re: ocamlopt and ocamldep References: <199809051233.OAA00550@infbsstq.ips.cs.tu-bs.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.93.2i In-Reply-To: <199809051233.OAA00550@infbsstq.ips.cs.tu-bs.de>; from Christian Lindig on Sat, Sep 05, 1998 at 02:33:27PM +0200 Sender: weis > The ocamldep utility in OCaml 2.0 creates for a file concept.mli that > uses modules Bitrelation and Bitset a dependency of the following > form: > > concept.cmi: bitrelation.cmo bitset.cmo This is because bitrelation and bitset do not have an explicit interface (.mli file). So, their interfaces actually depend on their source file (.ml file), but "make" has a hard time understanding this; the dependency on the .cmo above is what I've found to be most understandable to "make". > When compiling for native code this causes uncessessary recompilations > of the files bitrelation.ml and bitset.ml: > bitset.ml and bitrelation are already compiled to *.cmx, *.cmi, and > *.o. Because of the dependency generated by ocamldep they get > recompiled using the *byte* code compiler and thus new *.cmi files are > created as well. > Should cmi-files depend on cmx-files when compiling for native code? My feeling is that it would complicate the Makefiles for a fairly small benefit. If you don't like the occasional calls to ocamlc, you could write .mli files for all your modules (it's good style anyway). > This does not matter in most cases since OCaml compiles very fast. I > suspect the recompilation to cause subtle 'inconsistent assumptions > over interface' errors in conjunction with -unsave -noassert compiler > flags. However, I was not able to find a small example for this mail > that reproduces the error. If you can find one, please send it and I'll look at the problem. Regards, - Xavier Leroy