<xref linkend="projects">).</para>
<para>Remember that if you do not have
- <literal>happy</literal> installed, you need to check it out
- as well.</para>
+ <literal>happy</literal> and/or <literal>Alex</literal>
+ installed, you need to check them out as well.</para>
</listitem>
</itemizedlist>
</sect2>
</varlistentry>
<varlistentry>
+ <term>Alex</term>
+ <indexterm><primary>Alex</primary></indexterm>
+ <listitem>
+ <para>Alex is a lexical-analyser generator for Haskell,
+ which GHC uses to generate its lexer. Like Happy, Alex is
+ written in Haskell and is a project in the CVS repository.
+ Alex distributions are available from <ulink
+ url="http://www.haskell.org/alex/">Alex's Web
+ Page</ulink>.</para>
+ </listitem>
+ </varlistentry>
+
+ <varlistentry>
<term>Autoconf</term>
<indexterm><primary>pre-supposed: Autoconf</primary></indexterm>
<indexterm><primary>Autoconf, pre-supposed</primary></indexterm>
build tree.</para>
<para>Happy can similarly be run from the build tree, using
- <filename>happy/src/happy-inplace</filename>.</para>
+ <filename>happy/src/happy-inplace</filename>, and similarly for
+ Alex and Haddock.</para>
</sect2>
<sect2>
<listitem>
<screen>
+$ cd <replaceable>T</replaceable>
$ ./configure --enable-hc-boot --enable-hc-boot-unregisterised
</screen>
</listitem>
<listitem>
- <para>Copy
- <filename><replaceable>T</replaceable>/ghc/includes/config.h</filename>
- to
- <filename><replaceable>H</replaceable>/ghc/includes</filename>.
- Note that we are building on the host machine, using the
- target machine's <literal>config.h</literal> file. This
- is so that the intermediate C files generated here will
- be suitable for compiling on the target system.</para>
- </listitem>
-
- <listitem>
<para>Edit
<filename><replaceable>H</replaceable>/mk/config.mk</filename>:</para>
<itemizedlist>
</listitem>
<listitem>
-<screen>
-$ cd <replaceable>H</replaceable>/glafp-utils && make boot && make
-</screen>
+ <para>Copy
+ <filename><replaceable>T</replaceable>/ghc/includes/config.h</filename>
+ to
+ <filename><replaceable>H</replaceable>/ghc/includes</filename>.
+ Note that we are building on the host machine, using the
+ target machine's <literal>config.h</literal> file. This
+ is so that the intermediate C files generated here will
+ be suitable for compiling on the target system.</para>
+
</listitem>
-
+
+ <listitem>
+ <para>Touch <literal>config.h</literal>, just to make
+ sure it doesn't get replaced during the build:</para>
+<screen>
+$ touch <replaceable>H</replaceable>/ghc/includes/config.h</screen>
+ </listitem>
+
<listitem>
+ <para>Now build the compiler:</para>
<screen>
+$ cd <replaceable>H</replaceable>/glafp-utils && make boot && make
$ cd <replaceable>H</replaceable>/ghc && make boot && make
</screen>
-
<para>Don't worry if the build falls over in the RTS, we
don't need the RTS yet.</para>
</listitem>
</para>
</listitem>
+ <listitem>
+ <para>Install Alex. This can be done by building from the
+ source distribution in the usual way. Sources are
+ available from <ulink
+ url="http://www.haskell.org/alex">http://www.haskell.org/alex</ulink>.</para>
+ </listitem>
<listitem>
<para>GHC uses the <emphasis>mingw</emphasis> C compiler to