Documentation

Configuration

The Build System

Top-level Makefile; make by itself does a full 2-stage
bootstrap of GHC, there are also targets for building source and
binary distributions. GHC requires
​GNU make.

mk/

The guts of the build system itself.

The Code

compat/

A library of compatibility code used when bootstrapping GHC using an
older version of GHC. For example, we compile up the version of
Cabal from libraries/Cabal and include it in libcompat,
this means that the GHC source code can assume the most recent
version of Cabal.

Historically this contained the Perl script known as the GHC
"driver"; in GHC 5.00 the driver was rewritten in Haskell and
incorporated into GHC itself when we added GHCi and --make.
This directory still contains the mangler
and the splitter? Perl scripts, and a couple
of wrappers used to invoke GHC on Windows. Also the package
database constructed during a GHC build is stored in here.