Version française
Home     About     Download     Resources     Contact us    
Browse thread
OCaml: problems compiling
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Joshua D. Guttman <guttman@l...>
Subject: Re: OCaml: problems compiling
>  > 	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