[Omake] Case-insensitive filesystems
Aleksey Nogin
nogin at metaprl.org
Tue Dec 12 13:34:51 PST 2006
On 12.12.2006 13:21, Jason Hickey wrote:
> On Dec 12, 2006, at 1:01 PM, Aleksey Nogin wrote
>>
>> Jason, any ideas how we might fix the find-target-* functions to do
>> the right thing on case-insensitive filesystems? Should we just add
>> global variable that defaults to true on OS X and Windows, but can be
>> overwritten by the user? Or is there some hope of being able to detect
>> this?
>
> Actually, I'm not sure why it is happening. The result of "ocamldep
> -modules" should be uncapitalized, so if we see a dependency on Foo, we
> would check if foo.cmi is buildable.
This is my fault - I changed the above to check for both Foo.cmi and
foo.cmi (recent versions of OCaml support both).
> For case-sensitivity detection, we could
> - use statfs(2) to check for HFS, but this is unreliable, since HFS
> can be forced case-sensitive (I believe)
Unfortunately, statfs is a fairly non-standard function - according to
the man page, "LSB has deprecated the library calls [f]statfs() and
tells us to use [f]statvfs() instead" and statvfs does not give the fs
type :-(
> - test whether, for example, .omakedb and .OMAKEDB are the same file
Might be a good enough approximation, especially if we give the users a
chance to override...
Another (partial) option would be to replicate the existing ocamldep
logic - at least for the OCaml dependencies. Unfortunately, the
ocamldep's logic for "foo" in path "a:b:c" is "the first of a/foo a/Foo
b/foo b/Foo c/foo c/Foo" so it can not be cleanly implemented via the
current cache interface :-(
Aleksey
More information about the Omake
mailing list