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 SAA19457 for caml-redistribution; Tue, 22 Jul 1997 18:32:03 +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 RAA18719 for ; Tue, 22 Jul 1997 17:50:55 +0200 (MET DST) Received: from linus.mitre.org (linus.mitre.org [129.83.10.1]) by nez-perce.inria.fr (8.8.5/8.8.5) with ESMTP id RAA06592; Tue, 22 Jul 1997 17:50:50 +0200 (MET DST) Received: from apollonius.mitre.org (apollonius.mitre.org [129.83.10.177]) by linus.mitre.org (8.8.6/8.8.6) with ESMTP id LAA08406; Tue, 22 Jul 1997 11:50:32 -0400 (EDT) Received: from localhost (localhost [127.0.0.1]) by apollonius.mitre.org (8.8.5/8.8.5) with ESMTP id LAA21532; Tue, 22 Jul 1997 11:50:30 -0400 (EDT) Message-Id: <199707221550.LAA21532@apollonius.mitre.org> In-reply-to: Xavier Leroy's message of Mon, 21 Jul 1997 18:02:43 +0200 (MET DST) To: Xavier Leroy cc: guttman@linus.mitre.org, caml-list@inria.fr Subject: Re: OCaml: problems compiling Reply-To: guttman@mitre.org (Joshua D. Guttman) X-Postal-Address: MITRE, Mail Stop A150 X-Postal-Address: 202 Burlington Rd. X-Postal-Address: Bedford, MA 01730-1420 USA X-Telephone-Number: 617 271 2654; Fax 617 271 3816 References: <199707211602.SAA29043@pauillac.inria.fr> Date: Tue, 22 Jul 1997 11:50:29 -0400 From: "Joshua D. Guttman" Sender: weis > > I/O error: foo.cmi: No such file or directory > > > > Note that it's complaining about the .cmi file for the > > file currently being compiled, not some other module. > > > > How can I avoid the error to begin with? > > You should compile the foo.mli file before compiling the foo.ml file. > That will produce the missing foo.cmi file. > > Alternatively, if you don't have an interface file foo.mli in the same > directory as foo.ml, the compiler will create foo.cmi directly from > foo.ml. > Is there some convenient way to set up a makefile so that it will ensure that foo.cmi is generated (or re-generated) before foo.cmo or foo.cmx? Not being a magician of `make', I didn't see an easy way to express the conditional on there existing a foo.mli file. Of course, in the ideal case one would actually see whether it was possible to make foo.mli, e.g. from foo.mly. Thanks. Josh