Build system woes

Ian Lynagh igloo at
Wed Jul 30 11:38:26 EDT 2008

On Thu, Jul 31, 2008 at 12:55:09AM +1000, Roman Leshchinskiy wrote:
> I see. So it looks at the Build-Type in the package description and  
> calls the right defaultMain if it's not Custom. And if my Setup.hs  
> isn't standard then it's my responsibility to set the Build-Type to  
> Custom in the .cabal file and this isn't checked, right?

Nothing checks that Setup.hs behaves as the Build-Type claims it does,

> I wonder, though. What exactly does this buy us? Duncan says:
> >The point being that linking default Setup.hs scripts all the time  
> >is a
> >waste (especially since it doesn't parallelise).
> But the time spent in compiling those Setup.hs is negligible

The time taken and disk space used weren't entirely negligible,
especially on arches without object splitting. I think it also makes
the Makefiles simpler overall.

> >>What is runghc.wrapper?
> >
> >it's a template used to make a shell wrapper for a binary.  There  
> >seems to be new functionality in Cabal to support this.
> I see. Is runghc the only program we do this for? Or will others be  
> added gradually?

No, hsc2hs, ghc-pkg and ghc also have wrappers. I'm adding them as I
move utils over to build with Cabal rather than the old build system.
The reason there was a patch just adding a wrapper for runghc is that I
forgot to "darcs add" it in an earlier patch.

n.b. these wrappers are essentially the same as the old C and shell
script wrappers that the old build system made.

> >> (and why doesn't one of them work for dph)?
> Because it does non-standard stuff in Setup.hs and hence no Makefile  
> can be generated. Hence the SUBDIRS_BUILD hackery in libraries/ 
> Makefile, I assume.



More information about the Glasgow-haskell-users mailing list