On Thu, Sep 09, 2004 at 01:01:55AM +0100, Duncan Coutts wrote:
> In message <20040906074825.GI9717@...> Axel Simon <A.Simon@...> writes:
> > I'd like to have a single top-level makefile that builds all necessary
> > stuff depending on a few variables. automake is unfortunately not a
> > solution since it dosn't cope at all with c2hs and ghc --make which both
> > turn several sourcefiles into one target. automake cannot be extended
> > easily which is why I don't think that automake is a viable route.
> I'm not sure that we shouldn't change to a single input, single output style for both ghc and c2hs anyway (even if it wern't for automake).
> ghc itself builds using makefiles and not 'ghc --make'. It could even be quicker on rebuilds since ghc --make will always chase source files and relink which can take some time for some of our tools & modules.
If we switch to normal ghc compilation will be much much slower for the
whole bunch of files. Furhtermore we need to create dependencies which is
anothe makefile nightmare.
> I'd quite like to have a go at making c2hs cache intermediate files better so a single invocation scheme would be quick enough. I'd make the cacheing explicit and makefile-friendly rather than hiding the cache files away.
Yes, that is definitely a thing we should do soon. I'll have a look at the
intermediate structure and how we can ouput an intermediate file. For the
second stage I would suggest to mmap the file into memory. I made very
good experience that.
> Just musing, no short term suggestion, sorry.
I think that is actually the only way to go. Everything else is just too
complex to get right. Furthermore I think we should explicitly enumerate
all source files in the makefiles. Then invoking make will be quick enough
to do it recursively and do some of the more challenging stuff.
(who is now in Seattle)
In Canterbury, still,