Unix Dir for .hi Import Files

Alastair Reid reid@cs.utah.edu
10 Jun 2002 14:09:41 +0100


> on somewhat of a tangent, i was running into problems with where
> both nhc and ghc place their hi files when attempting to compile
> from a read-only filesystem, the standard autoconf setup (as used in
> DrIFT http://repetae.net/~john/computer/haskell/DrIFT) works almost
> perfectly except the .hi files always seem to be placed in the same
> directory as teh source files rather than with the .o files as would
> seem to make sense. 

Thanks.  This is a very clear statement of a similar problem I was
having when building a project with GHC.  I don't recall all the
details now but I remember having to fight rather hard to get GHC to
place files in the right place and even harder to get GHC to generate
Make-style dependency files containing the correct directories.  In
the end I think I settled on compromising the directory structure I
wanted and writing a perl script which munged the generated dependency
files.  The fragility of this approach was demonstrated on the next
release when a slight change in the format of one of the GHC-generated
files threw my Makefile and script out of whack.

Sorry I can't fill in details - this was about 18 months ago and the
only records I have are some ugly-looking Makefiles.  The point of my
anecdote is just to add weight to the argument that this is an
important issue to get right.

-- 
Alastair Reid        reid@cs.utah.edu        http://www.cs.utah.edu/~reid/