Build system idea

Manuel M T Chakravarty chak at cse.unsw.edu.au
Tue Aug 12 20:27:38 EDT 2008


Duncan Coutts:
> On Tue, 2008-08-12 at 11:11 +0100, Simon Marlow wrote:
>
>> I propose we do this:
>>
>>  - Extract the code from Cabal that generates Makefiles, and treat  
>> it as
>>    part of the GHC build system.  Rather than generating a Makefile
>>    complete with build rules, we generate a Makefile that just
>>    has the package-specific metadata (list of modules, etc.), and put
>>    the code to actually build the package in the GHC build system.
>
> As you know, I've been trying to get rid of that code ever since it
> arrived :-)
>
>> It will probably mean that we have a tighter dependency on Cabal,  
>> because
>> we use it as a library rather than a black box; but hopefully we  
>> can keep
>> our branch of Cabal more stable and not have to update it so often.
>
> If you don't need to update so often it would make life easier for  
> Cabal
> hackers and Manuel would be pleased :-)

Yes!

>> Anyway, this is an idea that I think is interesting.  Obviously it  
>> needs a
>> lot more fleshing out to be a real proposal, but I'm interested in  
>> whether
>> anyone thinks this idea is worth persuing, or whether there are  
>> better
>> alternatives.

I think this is definitely an interesting idea.  At the moment, it  
seems to me that all the metadata handling of Cabal is what's most  
useful to GHC, whereas the actual build procedure and its  
inflexibility causes a lot of grief, especially if you want to do  
something non-standard.  The proposed idea would pick the best of both  
worlds (Cabal's metadata handling and make's build flexibility plus  
the fact that many more people know how to tweak makefiles even if it  
is a pain, but its pretty well understood pain).

Manuel



More information about the Glasgow-haskell-users mailing list