Build system idea

Simon Marlow marlowsd at gmail.com
Wed Aug 13 03:47:01 EDT 2008


Roman Leshchinskiy wrote:
> On 12/08/2008, at 20:11, Simon Marlow wrote:
> 
>> - 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.
> 
> Sounds good. It would be nice if the .cabal parser from Cabal could be 
> made into a separate, stable library which ghc (and nhc?) could use.
> 
> This makes me wonder, though. Wouldn't this model make more sense for 
> Cabal in general than the current approach of duplicating the 
> functionality of autoconf, make and other stuff? If it works ghc, it 
> ought to work for other projects, too. Cabal as a preprocessor seems 
> much more attractive to me than as a universal build system.

So packages would be required to provide their own build system?  That 
sounds like it would make it a lot harder for people to just create a 
package that others can use.  The ease of making a Cabal package has I 
think a lot to do with the wealth of software available on Hackage.

GHC is a special case: we already need a build system for other reasons.

It was a design decision early on with Cabal that we didn't want to rely 
on the target system having a Unix-like build environment.  You might 
disagree with this, but it certainly has some value: a Windows user can 
download GHC and immediately start building and installing external 
packages without having to install Cygwin.

Cheers,
	Simon


More information about the Glasgow-haskell-users mailing list