Re: OCaml: problems compiling

From: Joshua D. Guttman (guttman@linus.mitre.org)
Date: Tue Jul 22 1997 - 17:50:29 MET DST


Message-Id: <199707221550.LAA21532@apollonius.mitre.org>
To: Xavier Leroy <Xavier.Leroy@inria.fr>
Subject: Re: OCaml: problems compiling
Date: Tue, 22 Jul 1997 11:50:29 -0400
From: "Joshua D. Guttman" <guttman@linus.mitre.org>

> > 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



This archive was generated by hypermail 2b29 : Sun Jan 02 2000 - 11:58:11 MET