[Omake] Case-insensitive filesystems
Jason Hickey
jyh at cs.caltech.edu
Tue Dec 12 13:21:22 PST 2006
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. Granted, without knowing
case-insensitivity, this would fail if the file were really fOo.ml.
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)
- test whether, for example, .omakedb and .OMAKEDB are the same file
Project-wide detection will break if the project contains a mount
point where the case-sensitivity changes... Unfortunately stat(2) is
missing this info on a file basis. Perhaps a call to statfs(2) for
each directory in a project...
Jason
--
Jason Hickey http://www.cs.caltech.edu/~jyh
Caltech Computer Science Tel: 626-395-6568 FAX: 626-792-4257
More information about the Omake
mailing list