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 MAA01997; Wed, 7 Aug 2002 12:41:27 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f 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 MAA01871 for ; Wed, 7 Aug 2002 12:41:27 +0200 (MET DST) Received: from nef.ens.fr (nef.ens.fr [129.199.96.32]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g77AfP525075 for ; Wed, 7 Aug 2002 12:41:25 +0200 (MET DST) Received: from clipper.ens.fr (clipper-gw.ens.fr [129.199.1.22]) by nef.ens.fr (8.10.1/1.01.28121999) with ESMTP id g77AfOl20227 ; Wed, 7 Aug 2002 12:41:24 +0200 (CEST) Received: from localhost (frisch@localhost) by clipper.ens.fr (8.12.3/jb-1.1) id g77AfOpY010983 ; Wed, 7 Aug 2002 12:41:24 +0200 (MET DST) Date: Wed, 7 Aug 2002 12:41:24 +0200 (MET DST) From: Alain Frisch To: Henri DF cc: caml-list@inria.fr Subject: Re: [Caml-list] ocamldep problem with .cmo vs .cmx In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-milter (http://amavis.org/) Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Wed, 7 Aug 2002, Henri Dubois-Ferriere wrote: > So the question is: > In the example above, why doesn't ocamldep output > main.cmo: mylib.cmo > instead of > main.cmo: mylib.cmi Because you don't need to rebuild main.cmo when you change the implementation of Mylib (the link between the two modules is resolved at ... link time). Native-code compilation performs some cross-modules optimizations (not sure, but probably constant propagation and function inlining), which need the implementation of Mylib when you compile main.ml. Hence the difference. Anyway, you have to specify even on ocamlopt command line the full list of .cmx files you want to put in the result. So it's not a big deal to have the list of .cmo/.cmx files in the dependencies. -- Alain ------------------- 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