From: Remco Vermeulen <r.vermeulen@vu.nl>
To: <caml-list@inria.fr>
Subject: [Caml-list] ocamldep & compilation units
Date: Fri, 2 Jan 2015 15:03:43 +0100 [thread overview]
Message-ID: <1088B954-0D62-47D9-B727-2ADE38DD3949@vu.nl> (raw)
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
next reply other threads:[~2015-01-02 14:03 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-02 14:03 Remco Vermeulen [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1088B954-0D62-47D9-B727-2ADE38DD3949@vu.nl \
--to=r.vermeulen@vu.nl \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox