[Omake] Re: vmount problems
Dmitry Bely
dmitry.bely at gmail.com
Thu Aug 31 06:23:40 PDT 2006
On 8/31/06, David Kågedal <davidk at lysator.liu.se> wrote:
> >> >>> 2. Mention that scanner rules necessitate the -l flag to vmount.
> >> >>
> >> >> On Win32 I need both the -l and the undocumented -f flag (OMake 0.9.6).
> >> >> Otherwise some files will be missing, for example headerfiles with no
> >> >> corresponding .c file.
> >> >
> >> > Here i disagree strongly, OMake should not invent workarounds for
> >> > ocaml(dep|c|opt)s shortcommings. Linking/copying the files is just
> >> > wrong, in emacs you end up visiting wrong files, and in case of
> >> > copying, on Win32, modify them, mayhem will shortly follow.
> >>
> >> Not to mention that you use twice the amount of disk space. Having to
> >> copy or even symlink source files to the build directory is a really
> >> bad idea.
> >>
> >> >From reading through the mail archives and looking at
> >> http://bugzilla.metaprl.org/show_bug.cgi?id=557 it appears that it's
> >> impossible to use vmount without having to copy files to the build
> >> tree (I count symlinks as copies, as I want something that works
> >> equally well on windows). Why is this so, given that make has the
> >> very similar vpath feature that doesn't require it?
> >
> > Why not to use hardlinks on Win32 for vmount? Just thinking of the
> > patch that will do just that.
>
> Hardlinks have at least two disadvantages.
>
> One is that they only work on the same filsystem. Setting up a omake
> tree that straddles a device boundary might seem a little strange, but
> I don't see why it couldn't be done. Having the build tree on local
> disk is sometimes a good idea. I should probably note that I have no
> idea how hardlinks on win32 actually work.
They just work - CreateHardLink() Win32 API call. You will need NTFS
filesystem though.
> The second is that it messes up the name space. The same file will
> appear under several names, which will confuse both people and
> applications such as text editors. And since there is no indication
> of where the other name appears, the editors can't even locate the
> "original" (with a standard unix hardlink, neither is more original
> than the other).
OK, I don't claim hardlinks should be used everywhere instead of
symlinks. But for vmount on Win32 they are much better then copy which
is now used by Omake. E.g. I cannot fix compilation errors the usual
way - the error message points to the wrong place (copy of the source
file, not the source file itself!). BTW, Windows also have symlinks
but only for directories (they can cross file system borders) - so
unfortunately useless here.
- Dmitry Bely
P.S. Another question: is it possible to ask "vmount -l" silently
create intermediate directories? Currently I have "directory does not
exist" error and should do this manually.
More information about the Omake
mailing list