On Sat, 2005-01-08 at 20:37 +0000, Duncan Coutts wrote:
> make distcheck does not yet work right. The first problem (apart from
> some files missing from EXTRA_DIST) is that distcheck unpacks the files
> with read only permissions so the chsDepend fails when trying to
> write .dep files.
> I don't fully understand how this is supposed to work, after all doing a
> build necessarily produces new files even if for cleanliness it does not
> modify any existing files.
So after a little more investigation it's all down to VPATH issues. The
first step in trying to get distcheck to work is to have a working
'VPATH build'. That is you are supposed to be able to do:
# assume in top of source dir
and it should do a build where all generated files go under the current
directory (build directory) and the original tree can be read only.
Of course this does not work for us at the moment! And for several
reasons beyond me having ignorantly removed a bunch of VPATH stuff last
There are a few places in Makefile.am and configure.ac where we the
$srcdir/ prefix was there when it shouldn't have been and conversely
places where is was needed but missing.
The harder problem is that I'm not sure how to generate the .hs deps
properly, if we just prefix $(VPATH) to the search paths in the ghc -M
call then it finds all the source files ok but of course generates rules
that put the .o files in the source tree rather than the build tree.
Another tricky problem is that the location of generated .hs files is
different from original source .hs files. This is obviously the case
for .chs files. I first hit the problem with
$BUILDDIR/tools/c2hs/toplevel/C2HSConfig.hs which is generated from