User guide tweaks
[ghc-hetmet.git] / docs / users_guide / installing.xml
index 8615002..fba07e3 100644 (file)
@@ -76,29 +76,27 @@ Then you should find the bundle contents inside a single directory,
 
 <para>
 OK, so let's assume that you have unpacked your chosen bundles. What
-next? Well, you will at least need to run the
+next? Well, you will first need to
 <literal>configure</literal><indexterm><primary>configure</primary></indexterm>
-script by changing directory into the top-level directory for the
-bundle and typing <literal>./configure</literal>.  That should convert
-<literal>Makefile.in</literal> to <literal>Makefile</literal>.
+the bundle by
+changing to the bundle's top-level directory
+and typing <literal>./configure</literal>. That should convert
+<literal>Makefile-vars.in</literal> to <literal>Makefile-vars</literal>.
 </para>
 
 <para>
-<indexterm><primary>installing in-place</primary></indexterm>
-<indexterm><primary>in-place installation</primary></indexterm>
-You can now either start using the tools <emphasis>in-situ</emphasis> without going
-through any installation process, just type <literal>make in-place</literal> to set the
-tools up for this. You'll also want to add the path which <literal>make</literal> will
-now echo to your <literal>PATH</literal> environment variable. This option is useful if
-you simply want to try out the package and/or you don't have the
-necessary privileges (or inclination) to properly install the tools
-locally. Note that if you do decide to install the package `properly'
-at a later date, you have to go through the installation steps that
-follow.
+The <literal>configure</literal> script takes a number of flags. The most
+commonly used is the
+<literal>--prefix=<replaceable>/path/to/install/in</replaceable></literal>
+flag, which tells the bundle that you want it to be installed in
+<replaceable>/path/to/install/in</replaceable> rather than the default
+location (/usr/local).
+To see all the flags that configure accepts, run
+<literal>configure --help</literal>.
 </para>
 
 <para>
-To install a package, you'll have to do the following:
+Then do the following:
 </para>
 
 <para>
@@ -107,112 +105,35 @@ To install a package, you'll have to do the following:
 <listitem>
 
 <para>
- Edit the <literal>Makefile</literal> and check the settings of the following variables:
-
-<indexterm><primary>directories, installation</primary></indexterm>
-<indexterm><primary>installation directories</primary></indexterm>
-
-<variablelist>
-
-<varlistentry>
-<term><literal>platform</literal></term>
-<listitem>
-<para>
-the platform you are going to install for.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>bindir</literal></term>
-<listitem>
-<para>
-the directory in which to install user-invokable
-binaries.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>libdir</literal></term>
-<listitem>
-<para>
-the directory in which to install
-platform-dependent support files.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>datadir</literal></term>
-<listitem>
-<para>
-the directory in which to install
-platform-independent support files.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>infodir</literal></term>
-<listitem>
-<para>
-the directory in which to install Emacs info
-files.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>htmldir</literal></term>
-<listitem>
-<para>
-the directory in which to install HTML
-documentation.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>dvidir</literal></term>
-<listitem>
-<para>
-the directory in which to install DVI
-documentation.
-</para>
-</listitem></varlistentry>
-</variablelist>
-
-The values for these variables can be set through invocation of the
-<command>configure</command><indexterm><primary>configure</primary></indexterm>
-script that comes with the distribution, but doing an optical diff to
-see if the values match your expectations is always a Good Idea.
-</para>
-
-<para>
-<emphasis>Instead of running <command>configure</command>, it is
-perfectly OK to copy <filename>Makefile.in</filename> to
-<filename>Makefile</filename> and set all these variables directly
-yourself.  But do it right!</emphasis>
-</para>
-
-</listitem>
-<listitem>
-
-<para>
 Run <literal>make install</literal>.  This <emphasis>
 should</emphasis> work with ordinary Unix
 <literal>make</literal>&mdash;no need for fancy stuff like GNU
 <literal>make</literal>.
-
 </para>
 </listitem>
-<listitem>
 
+<listitem>
 <para>
-<literal>rehash</literal> (t?csh or zsh users), so your shell will see the new
-stuff in your bin directory.
-
+If appropriate, add the bin directory to your PATH, as instructed.
 </para>
 </listitem>
+
 <listitem>
+<para>
+You may need to run <literal>rehash</literal> (t?csh or zsh users), in
+order for your shell to see the new stuff in your bin directory.
+</para>
+</listitem>
 
+<listitem>
 <para>
  Once done, test your &ldquo;installation&rdquo; as suggested in 
 <xref linkend="GHC-test"/>.  Be sure to use a <literal>-v</literal>
 option, so you can see exactly what pathnames it's using.
-
 If things don't work as expected, check the list of known pitfalls in
 the <ulink url="http://hackage.haskell.org/trac/ghc/wiki/Building">building guide</ulink>.
 </para>
+
 </listitem>
 
 </orderedlist>
@@ -233,78 +154,6 @@ regardless, <literal>ghc-x.xx</literal> should always invoke GHC version <litera
 </sect3>
 
 
-<sect3>
-<title>What bundles there are</title>
-
-<para>
-<indexterm><primary>bundles, binary</primary></indexterm> There are
-plenty of &ldquo;non-basic&rdquo; GHC bundles.  The files for them are
-called
-<literal>ghc-x.xx-<replaceable>bundle</replaceable>-<replaceable>platform</replaceable>.tar.gz</literal>,
-where the <replaceable>platform</replaceable> is as above, and
-<replaceable>bundle</replaceable> is one of these:
-</para>
-
-<para>
-<variablelist>
-
-<varlistentry>
-<term><literal>prof</literal>:</term>
-<listitem>
-<para>
-Profiling with cost-centres.  You probably want this.
-<indexterm><primary>profiling bundles</primary></indexterm>
-<indexterm><primary>bundles, profiling</primary></indexterm>
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>par</literal>:</term>
-<listitem>
-<para>
-Parallel Haskell features (sits on top of PVM).
-You'll want this if you're into that kind of thing.
-<indexterm><primary>parallel bundles</primary></indexterm>
-<indexterm><primary>bundles, parallel</primary></indexterm>
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>gran</literal>:</term>
-<listitem>
-<para>
-The &ldquo;GranSim&rdquo; parallel-Haskell simulator
-(hmm&hellip; mainly for implementors).
-<indexterm><primary>bundles, gransim</primary></indexterm>
-<indexterm><primary>gransim bundles</primary></indexterm>
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>ticky</literal>:</term>
-<listitem>
-<para>
-&ldquo;Ticky-ticky&rdquo; profiling; very detailed
-information about &ldquo;what happened when I ran this program&rdquo;&mdash;really
-for implementors.
-<indexterm><primary>bundles, ticky-ticky</primary></indexterm>
-<indexterm><primary>ticky-ticky bundles</primary></indexterm>
-</para>
-</listitem></varlistentry>
-</variablelist>
-</para>
-
-<para>
-One likely scenario is that you will grab <emphasis>two</emphasis>
-binary bundles&mdash;basic, and profiling.  We don't usually make the
-rest, although you can build them yourself from a source distribution.
-</para>
-
-<para>The various GHC bundles are designed to be unpacked into the
-same directory; then installing as per the directions above will
-install the whole lot in one go.  Note: you <emphasis>must</emphasis>
-at least have the basic GHC binary distribution bundle, these extra
-bundles won't install on their own.</para>
-
-</sect3>
-
 <sect3 id="GHC-test">
 <title>Testing that GHC seems to be working
 </title>
@@ -344,14 +193,6 @@ Hello, world!</screen>
 
 </para>
 
-<para>
-Some simple-but-profitable tests are to compile and run the notorious
-<literal>nfib</literal><indexterm><primary>nfib</primary></indexterm> program, using different numeric types.  Start with
-<literal>nfib :: Int -&gt; Int</literal>, and then try <literal>Integer</literal>, <literal>Float</literal>, <literal>Double</literal>,
-<literal>Rational</literal> and perhaps the overloaded version.  Code for this is
-distributed in <literal>ghc/misc/examples/nfib/</literal> in a source distribution.
-</para>
-
 <para>For more information on how to &ldquo;drive&rdquo; GHC, read
 on...</para>
 
@@ -388,7 +229,7 @@ You can override it, but by default this directory is
 The executable binary for GHC will be installed in the
 <filename>bin/</filename> sub-directory of the installation directory.
 If you want to invoke GHC from a command line, add this
-to your PATH environment variable.
+to your <literal>$PATH</literal> environment variable.
 </para>
 <para>
 When installation is complete, you should find GHCi and the GHC
@@ -551,9 +392,9 @@ That is why <filename>$(bindir)</filename> must be <filename>$(libdir)/bin</file
 
 <sect2> <title>The binary directory</title>
 
-<para>The binary directory, <filename>$(bindir)</filename> contains user-visible
+<para>The binary directory, <filename>$(bindir)</filename>, contains user-visible
 executables, notably <filename>ghc</filename> and <filename>ghci</filename>.
-You should add it to your <literal>$PATH</literal>
+You should add it to your <literal>$PATH</literal>.
 </para>
 
 <para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
@@ -576,9 +417,10 @@ truncates them.  Similarly <filename>ghci</filename> is a C wrapper program that
 
 <sect2> <title>The library directory</title>
 
-<para>The layout of the library directory, <filename>$(libdir)</filename> is almost identical on
+<para>The layout of the library directory, <filename>$(libdir)</filename>,
+is almost identical on
 Windows and Unix, as follows.  Differences between Windows and Unix
-are noted thus <literal>[Win32 only]</literal> and are commented below.</para>
+are annoted <literal>[Win32 only]</literal> and are commented below.</para>
 
 <programlisting>
   $(libdir)/