caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] ocamldep & compilation units
@ 2015-01-02 14:03 Remco Vermeulen
  2015-01-02 18:11 ` Gerd Stolpmann
  2015-01-03 18:18 ` Xavier Leroy
  0 siblings, 2 replies; 5+ messages in thread
From: Remco Vermeulen @ 2015-01-02 14:03 UTC (permalink / raw)
  To: caml-list

Hi,

I’m kind of stuck on the following situation.

foo.ml:
	...
 	module BAR = struct
 		…

		let x () = ...
	end
	...
	end

bar.ml:
       …
       let y () = …

baz.ml:
	open Foo
	...
	BAR.x ()
        …
	Bar.y ()

ocamldep -modules baz.ml, as used by Omake, returns baz.ml: BAR bar.
The manual of ocamldep states that the -modules option returns the compilation units referenced in the source file.
But shouldn’t, in this situation, only Bar be a compilation unit?

In the current situation, Omake adds the compilation unit BAR to the dependencies of baz.cm(o|x),
meaning that it will search for the file bAR.ml to satisfy the dependency.
This has the unfortunate effect of using bar.ml on a case-insensitive filesystem (the default on OSX) resulting in the error:
"Wrong file naming: bar.cmi contains the compiled interface for Bar when BAR was expected”

So my question is. is BAR in the above example correctly identified as a compilation unit by ocamldep?

Cheers,
Remco 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2015-01-03 18:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-01-02 14:03 [Caml-list] ocamldep & compilation units Remco Vermeulen
2015-01-02 18:11 ` Gerd Stolpmann
2015-01-03 10:52   ` Remco Vermeulen
2015-01-03 11:32     ` Gabriel Scherer
2015-01-03 18:18 ` Xavier Leroy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).