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 CAA27649; Wed, 7 Aug 2002 02:07:31 +0200 (MET DST) 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 CAA27386 for ; Wed, 7 Aug 2002 02:07:31 +0200 (MET DST) Received: from lcavpc19.epfl.ch ([128.178.8.56]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g7707U120389 for ; Wed, 7 Aug 2002 02:07:30 +0200 (MET DST) Received: from localhost (henridf@localhost) by lcavpc19.epfl.ch (8.11.2/8.11.2) with ESMTP id g7706FY07551 for ; Wed, 7 Aug 2002 02:06:15 +0200 X-Authentication-Warning: lcavpc19.epfl.ch: henridf owned process doing -bs Date: Wed, 7 Aug 2002 02:06:15 +0200 (CEST) From: Henri Dubois-Ferriere X-X-Sender: Reply-To: Henri DF To: Subject: [Caml-list] ocamldep problem with .cmo vs .cmx Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi, I have noticed that ocamldep fills in dependencies differently for a .cmo than for a .cmx Say my file main.ml does a "open mylib" then ocamldep will produce the following dependencies: main.cmo: mylib.cmi (depends on *interface* of included module) main.cmx: mylib.cmx (depends on compiled *object code* of included module) mylib.cmo: mylib.cmi mylib.cmx: mylib.cmi So, in the cmx case, we have the full dependency file so that a makefile target like main_opt: main.cmx $(OCAMLOPT) $(OBJ_FILES) ... .. will follow all the dependencies and compile mylib.cmi and mylib.cmx (assuming the right implicit rules etc). whereas if we have a target for the bytecode version like: main_bcode: main.cmo $(OCAMLC) $(BC_OBJ_FILES) ... .. make will only compile mylib.cmi and not mylib.cmo, so one would have to explicitly add mylib.cmo as a dependency of main_bcode. This is painful in itself, on top of forcing bytecode and native rules to be different. So the question is: In the example above, why doesn't ocamldep output main.cmo: mylib.cmo instead of main.cmo: mylib.cmi ? This would make .cmx and .cmo treatment consistent, as well as simplify makefile writing. thanks henri ------------------- 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