[[project @ 2005-10-25 10:28:59 by simonmar]
simonmar**20051025102859
- include the contents of ghc/HACKING verbatim, as a "quick start"
guide
- change the title to "Building and devleloping GHC", and make it a
bit more GHC-centric.
] {
hunk ./docs/building/building.xml 3
- "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd">
+ "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [
+
+]>
hunk ./docs/building/building.xml 11
-
Building the Glasgow Functional Programming Tools Suite
+Building and developing GHC
hunk ./docs/building/building.xml 16
- The Glasgow fptools suite is a collection of Functional
- Programming related tools, including the Glasgow Haskell
- Compiler (GHC). The source code for the whole suite is kept in
- a single CVS repository and shares a common build and
- installation system.
-
- This guide is intended for people who want to build or
- modify programs from the Glasgow fptools
- suite (as distinct from those who merely want to
- run them). Installation instructions are
- now provided in the user guide.
+ This Guide is primarily aimed at those who want to build and/or
+ hack on GHC. It describes how to get started with building GHC on your
+ machine, and how to tweak the settings to get the kind of build you
+ want. It also describes the inner workings of the build system, so you
+ can extend it, modify it, and use it to build your code.
hunk ./docs/building/building.xml 32
- You can get your hands on the fptools
- in two ways:
+ You can get your hands on the GHC sources in two ways:
hunk ./docs/building/building.xml 47
- one or more projects in the fptools
- suite. Not only that, but the more awkward
+ GHC. Not only that, but the more awkward
hunk ./docs/building/building.xml 68
- All the fptools source code is held
+ All the GHC source code is held
hunk ./docs/building/building.xml 84
-
- If you are going to do any building from sources (either
- from a source distribution or the CVS repository) then you need to
- read all of this manual in detail.
hunk ./docs/building/building.xml 896
- What machines the Glasgow tools run on
+ What machines GHC runs on
hunk ./docs/building/building.xml 1083
-
- GHC currently works unregisterised. A registerised
- port is in progress.
-
-
-
-
- amd64-unknown-openbsd
+amd64-unknown-openbsd
hunk ./docs/building/building.xml 1087
- (This is the same as x86_64-unknown-openbsd). GHC
- currently works unregisterised. A registerised port is in
- progress.
+ Fully supported, with a native code generator and GHCi.
hunk ./docs/building/building.xml 1150
-
-
- What machines the other tools run on
-
- Unless you hear otherwise, the other tools work if GHC
- works.
-
hunk ./docs/building/building.xml 1152
-
hunk ./docs/building/building.xml 1218
- We recommend using GCC version 2.95.2 on all
- platforms. Failing that, version 2.7.2 is stable on most
- platforms. Earlier versions of GCC can be assumed not to
- work, and versions in between 2.7.2 and 2.95.2 (including
- egcs) have varying degrees of stability
- depending on the platform.
+ Most GCC versions should work with the most recent GHC
+ sources. Expect trouble if you use a recent GCC with
+ an older GHC, though (trouble in the form of mis-compiled code,
+ link errors, and errors from the ghc-asm
+ script).
hunk ./docs/building/building.xml 1224
- GCC 3.2 is currently known to have problems building
- GHC on Sparc, but is stable on x86.
-
hunk ./docs/building/building.xml 1251
- used to generate GHC's parsers. Happy is written in
+ used to generate GHC's parsers.
+
+ If you start from a source tarball of GHC (i.e. not a CVS
+ checkout), then you don't need Happy, because we supply the
+ pre-processed versions of the Happy parsers. If you intend to
+ modify the compiler and/or you're using a CVS checkout, then you
+ need Happy.
+
+ Happy version 1.15 is currently required to build GHC.
+
+ Happy is written in
hunk ./docs/building/building.xml 1267
- started. Happy distributions are available from Happy's Web
+ started. Happy distributions are available from Happy's Web
hunk ./docs/building/building.xml 1278
- which GHC uses to generate its lexer. Like Happy, Alex is
+ which GHC uses to generate its lexer.
+
+ Like Happy, you don't need Alex if you're building GHC from a
+ source tarball, but you do need it if you're modifying GHC and/or
+ building a CVS checkout.
+
+ Alex is
hunk ./docs/building/building.xml 1286
- Alex distributions are available from Alex's Web
+ Alex distributions are available from Alex's Web
hunk ./docs/building/building.xml 1411
- You've been rash enough to want to build some of the Glasgow
- Functional Programming tools (GHC, Happy, nofib, etc.) from
- source. You've slurped the source, from the CVS repository or
- from a source distribution, and now you're sitting looking at a
- huge mound of bits, wondering what to do next.
+ “I just want to build it!”
hunk ./docs/building/building.xml 1413
- Gingerly, you type make. Wrong
- already!
+ No problem. This recipe should build and install a working GHC with
+ all the default settings. (unless you're
+ on Windows, in which case go to ).
hunk ./docs/building/building.xml 1417
- This rest of this guide is intended for duffers like me, who
- aren't really interested in Makefiles and systems configurations,
- but who need a mental model of the interlocking pieces so that
- they can make them work, extend them consistently when adding new
- software, and lay hands on them gently when they don't
- work.
-
-
- Quick Start
-
- If you are starting from a source distribution, and just
- want a completely standard build, then the following procedure should
- work (unless you're on Windows, in which case go to ).
-
-$ autoreconf
+$ autoreconfnot necessary if you started from a source tarball
+
hunk ./docs/building/building.xml 1425
- results.
+ results in the default location (under /usr/local on
+ Unix, for example).
+
+ The configure script is a standard GNU
+ autoconf script, and accepts the usual options for
+ changing install locations and the like. Run
+ ./configure --help for a list of options.
hunk ./docs/building/building.xml 1435
-
+
+
+
+ Quick start for GHC developers
+
+ This section is a copy of the file
+ ghc/HACKING from the GHC source tree. It describes
+ how to get started with setting up your build tree for developing GHC
+ or its libraries, and how to start building.
+
+
+&hacking;
+
+
+
+
+ Working with the build system
+
+ This rest of this guide is intended for duffers like me, who
+ aren't really interested in Makefiles and systems configurations,
+ but who need a mental model of the interlocking pieces so that
+ they can make them work, extend them consistently when adding new
+ software, and lay hands on them gently when they don't
+ work.
}