In the users guide, talk about configure flags
[ghc-hetmet.git] / docs / users_guide / installing.xml
index 70ea199..dc0251a 100644 (file)
@@ -37,7 +37,7 @@ binary-distributed GHC to do so is a sensible way to proceed.)
     <sect2>
       <title>When a platform-specific package is available</title>
       
-      <para>For certain platforms, we provide GHC binaries packaged
+      <para>Most common OSes provide GHC binaries packaged
       using the native package format for the platform.  This is
       likely to be by far the best way to install GHC for your
       platform if one of these packages is available, since
@@ -45,39 +45,7 @@ binary-distributed GHC to do so is a sensible way to proceed.)
       system normally provides a way to uninstall the package at a
       later date.</para>
 
-      <para>We generally provide the following packages:</para>
-
-      <variablelist>
-       <varlistentry>
-         <term>RedHat or SuSE Linux/x86</term>
-         <listitem>
-           <para>RPM source &amp; binary packages for RedHat and SuSE
-           Linux (x86 only) are available for most major
-           releases.</para>
-         </listitem>
-       </varlistentry>
-
-       <varlistentry>
-         <term>Debian Linux/x86</term>
-         <listitem>
-           <para>Debian packages for Linux (x86 only), also for most
-           major releases.</para>
-         </listitem>
-       </varlistentry>
-
-       <varlistentry>
-         <term>FreeBSD/x86</term>
-         <listitem>
-           <para>On FreeBSD/x86, GHC can be installed using either
-           the ports tree (<literal>cd /usr/ports/lang/ghc &amp;&amp; make
-           install</literal>) or from a pre-compiled package
-           available from your local FreeBSD mirror.</para>
-         </listitem>
-       </varlistentry>
-      </variablelist>
-      
-      <para>Other platform-specific packages may be available, check
-      the GHC download page for details.</para>
+      <para>Check the <ulink url="http://www.haskell.org/ghc/distribution_packages.html">distribution packages</ulink> page to see if there is a package available for your platform.</para>
     </sect2>
 
 <sect2>
@@ -88,151 +56,19 @@ binary-distributed GHC to do so is a sensible way to proceed.)
 </para>
 
 <para>
-Binary distributions come in &ldquo;bundles,&rdquo; one bundle per file called
-<literal><replaceable>bundle</replaceable>-<replaceable>platform</replaceable>.tar.gz</literal>.  (See the <ulink url="http://hackage.haskell.org/trac/ghc/wiki/Building">building guide</ulink> for the definition of a platform.)  Suppose that you untar a binary-distribution bundle, thus:
+Binary distributions come in &ldquo;bundles,&rdquo; called
+<literal>ghc-<replaceable>version</replaceable>-<replaceable>platform</replaceable>.tar.bz2</literal>. (See the <ulink url="http://hackage.haskell.org/trac/ghc/wiki/Building">building guide</ulink> for the definition of a platform.)  Suppose that you untar a binary-distribution bundle, thus:
 </para>
 
 <para>
-
 <screen>
 % cd /your/scratch/space
-% gunzip &#60; ghc-x.xx-sun-sparc-solaris2.tar.gz | tar xvf -</screen>
-
-</para>
-
-<para>
-Then you should find a single directory,
-<literal>ghc-<replaceable>version</replaceable></literal>, with the
-following structure:
-</para>
-
-<para>
-<indexterm><primary>binary distribution, layout</primary></indexterm>
-<indexterm><primary>directory layout (binary distributions)</primary></indexterm>
-<variablelist>
-
-<varlistentry>
-<term><literal>Makefile.in</literal></term>
-<listitem>
-<para>
-the raw material from which the <literal>Makefile</literal>
-will be made (<xref linkend="install"/>).
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>configure</literal></term>
-<listitem>
-<para>
-the configuration script (<xref linkend="install"/>).
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>README</literal></term>
-<listitem>
-<para>
-Contains this file summary.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>INSTALL</literal></term>
-<listitem>
-<para>
-Contains this description of how to install
-the bundle.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>ANNOUNCE</literal></term>
-<listitem>
-<para>
-The announcement message for the bundle.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>NEWS</literal></term>
-<listitem>
-<para>
-release notes for the bundle&mdash;a longer version
-of <literal>ANNOUNCE</literal>.  For GHC, the release notes are contained in the User
-Guide and this file isn't present.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-           <term><literal>bin/<replaceable>platform</replaceable></literal></term>
-<listitem>
-<para>
-contains platform-specific executable
-files to be invoked directly by the user.  These are the files that
-must end up in your path.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>lib/<replaceable>platform</replaceable>/</literal></term>
-<listitem>
-<para>
-contains platform-specific support
-files for the installation.  Typically there is a subdirectory for
-each <literal>fptools</literal> project, whose name is the name of the project with its
-version number.  For example, for GHC there would be a sub-directory
-<literal>ghc-x.xx</literal>/ where <literal>x.xx</literal> is the version number of GHC in the bundle.
+% bunnzip2 &#60; ghc-<replaceable>version</replaceable>-<replaceable>platform</replaceable>.tar.bz2 | tar xvf -</screen>
 </para>
 
 <para>
-These sub-directories have the following general structure:
-</para>
-
-<para>
-<variablelist>
-
-<varlistentry>
-<term><literal>libHSstd.a</literal> etc:</term>
-<listitem>
-<para>
-supporting library archives.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>ghc-iface.prl</literal> etc:</term>
-<listitem>
-<para>
-support scripts.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>import/</literal></term>
-<listitem>
-<para>
-<indexterm><primary>Interface files</primary></indexterm> (<literal>.hi</literal>) for the prelude.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>include/</literal></term>
-<listitem>
-<para>
-A few C <literal>&num;include</literal> files.
-</para>
-</listitem></varlistentry>
-</variablelist>
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>share/</literal></term>
-<listitem>
-<para>
-contains platform-independent support files
-for the installation.  Again, there is a sub-directory for each
-<literal>fptools</literal> project.
-</para>
-</listitem></varlistentry>
-<varlistentry>
-<term><literal>html/</literal></term>
-<listitem>
-<para>
-contains HTML documentation files (one
-sub-directory per project).
-</para>
-</listitem></varlistentry>
-</variablelist>
+Then you should find the bundle contents inside a single directory,
+<literal>ghc-<replaceable>version</replaceable></literal>.
 </para>
 
 <sect3 id="install">
@@ -244,21 +80,18 @@ next? Well, you will at least need to run the
 <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>.
+<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>
@@ -271,87 +104,6 @@ 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