From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id TAA29904 for caml-redistribution; Sun, 6 Sep 1998 19:59:37 +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 OAA13579 for ; Sat, 5 Sep 1998 14:33:30 +0200 (MET DST) Received: from infbssys.ips.cs.tu-bs.de (infbssys.ips.cs.tu-bs.de [134.169.32.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id OAA01337 for ; Sat, 5 Sep 1998 14:33:28 +0200 (MET DST) Received: from infbsstq.ips.cs.tu-bs.de (lindig@infbsstq.ips.cs.tu-bs.de [134.169.32.78]) by infbssys.ips.cs.tu-bs.de (8.9.1/8.9.1) with ESMTP id OAA24745 for ; Sat, 5 Sep 1998 14:33:28 +0200 Date: Sat, 5 Sep 1998 14:33:27 +0200 Message-Id: <199809051233.OAA00550@infbsstq.ips.cs.tu-bs.de> From: Christian Lindig To: Caml Mailing List Subject: ocamlopt and ocamldep 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 When compiling for native code this causes uncessessary recompilations of the files bitrelation.ml and bitset.ml: % make colibri.cmxa ocamlopt.opt -I ../libcolibri -I ../getopt -c stat.mli ocamlopt.opt -I ../libcolibri -I ../getopt -c stat.ml --> ocamlopt.opt -I ../libcolibri -I ../getopt -c bitset.ml --> ocamlopt.opt -I ../libcolibri -I ../getopt -c bitrelation.ml ocamlopt.opt -I ../libcolibri -I ../getopt -c intcode.mli ocamlopt.opt -I ../libcolibri -I ../getopt -c intcode.ml ==> ocamlc -I ../libcolibri -I ../getopt -c bitset.ml ==> ocamlc -I ../libcolibri -I ../getopt -c bitrelation.ml --> ocamlopt.opt -I ../libcolibri -I ../getopt -c concept.mli ocamlopt.opt -I ../libcolibri -I ../getopt -c concept.ml ocamlopt.opt -I ../libcolibri -I ../getopt -c lattice.mli ocamlopt.opt -I ../libcolibri -I ../getopt -c lattice.ml ocamlopt.opt -I ../libcolibri -I ../getopt -c context.ml ocamlopt.opt -I ../libcolibri -I ../getopt -a -o colibri.cmxa stat.cmx bitset.cmx bitrelation.cmx intcode.cmx concept.cmx lattice.cmx context.cmx 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. 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. Should cmi-files depend on cmx-files when compiling for native code? This would avoid uneccessary recompilations but would also make integrating byte code compilation and native code compilation into one Makefile much harder. -- Christian ------------------------------------------------------------------------------ Christian Lindig http://www.cs.tu-bs.de/softech/people/lindig mail: lindig@ips.cs.tu-bs.de