INSTALL.md 1.7 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
Building & Installing
=====================

For full information on building GHC, see the GHC Building Guide [1].
Here follows a summary - if you get into trouble, the Building Guide
has all the answers.

Before building GHC you may need to install some other tools and
libraries.  See "Setting up your system for building GHC" [2].

11
N.B. in particular you need GHC installed in order to build GHC,
12 13 14 15
because the compiler is itself written in Haskell.  For instructions
on how to port GHC to a new platform, see the Building Guide [1].

For building library documentation, you'll need Haddock [3].  To build
16
the compiler documentation, you need [Sphinx](http://www.sphinx-doc.org/) and
17
XeLaTex (only for PDF output).
18 19 20

Quick start:  the following gives you a default build:

21
    $ ./boot
22 23 24 25
    $ ./configure
    $ make
    $ make install

26 27 28 29 30
  On Windows, you need an extra repository containing some build tools.
  These can be downloaded for you by configure. This only needs to be done once by running:

    $ ./configure --enable-tarballs-autodownload

31 32 33
You can use Make's `-jN` option to parallelize the build. It's generally best
to set `N` somewhere around the core count of the build machine.

34
The `./boot` step is only necessary if this is a tree checked out from
Ben Gamari's avatar
Ben Gamari committed
35 36
git. For source distributions downloaded from GHC's web site, this step has
already been performed.
37 38 39 40 41 42 43 44 45

These steps give you the default build, which includes everything
optimised and built in various ways (eg. profiling libs are built).
It can take a long time.  To customise the build, see the file
`HACKING.md`.

References
==========

46 47 48
 - [1] http://www.haskell.org/ghc/
 - [2] https://gitlab.haskell.org/ghc/ghc/wikis/building/preparation
 - [3] http://www.haskell.org/haddock/