[project @ 2004-06-23 22:43:20 by ross]
[ghc-hetmet.git] / ghc / docs / users_guide / installing.sgml
index 42f48c1..f96494e 100644 (file)
@@ -16,16 +16,23 @@ having a Haskell compiler.)
 </Para>
 
 <Para>This guide is in several parts:</para>
-<itemizedlist>
-<listitem> <para> Installing on Unix-a-likes (<Xref LinkEnd="sec-unix-a-likes">). </para>  </listitem>
-<listitem> <para> Installing on Windows  (<Xref LinkEnd="sec-install-windows">).   </para> </listitem>
-<listitem> <para> The layout of installed files  (<Xref LinkEnd="sec-install-files">).  
-You don't need to know this to install GHC,
-but it's useful if you are changing the implementation.   </para>  </listitem>
-<listitem> <para> Installing or building the documentation (<Xref LinkEnd="building-docs">).  </para> </listitem>
-</itemizedlist>
-
 
+  <itemizedlist>
+    <listitem>
+      <para> Installing on Unix-a-likes (<Xref
+      LinkEnd="sec-unix-a-likes">). </para>
+    </listitem>
+    <listitem>
+      <para> Installing on Windows (<Xref
+      LinkEnd="sec-install-windows">).  </para>
+    </listitem>
+    <listitem>
+      <para> The layout of installed files (<Xref
+      LinkEnd="sec-install-files">).  You don't need to know this to
+      install GHC, but it's useful if you are changing the
+      implementation.</para>
+    </listitem>
+  </itemizedlist>
   
   <Sect1 id="sec-unix-a-likes"><Title>Installing on Unix-a-likes</Title>
 
@@ -227,13 +234,6 @@ contains HTML documentation files (one
 sub-directory per project).
 </Para>
 </ListItem></VarListEntry>
-<VarListEntry>
-<Term><Literal>man/</Literal></Term>
-<ListItem>
-<Para>
-contains Unix manual pages.
-</Para>
-</ListItem></VarListEntry>
 </VariableList>
 </Para>
 
@@ -241,10 +241,11 @@ contains Unix manual pages.
 <Title>Installing</Title>
 
 <Para>
-OK, so let's assume that you have unpacked your chosen bundles into a
-scratch directory <Literal>fptools</Literal>. What next? Well, you will at least need
-to run the <Literal>configure</Literal><IndexTerm><Primary>configure</Primary></IndexTerm> script by changing your
-directory to <Literal>fptools</Literal> and typing <Literal>./configure</Literal>.  That should convert
+OK, so let's assume that you have unpacked your chosen bundles. What
+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>.
 </Para>
 
@@ -263,7 +264,7 @@ follow.
 </Para>
 
 <Para>
-To install an <Literal>fptools</Literal> package, you'll have to do the following:
+To install a package, you'll have to do the following:
 </Para>
 
 <Para>
@@ -547,23 +548,28 @@ URL="http://www.haskell.org/ghc">haskell.org</ULink>.
 </para></listitem>
 
 <listitem><para>Run <Filename>setup.exe</Filename>.
-(If you have a previous version of GHC, Installshield will offer to "modify", 
+On Windows, all of GHC's files are installed in a single directory.
+If you choose ``Custom'' from the list of install options, you will be given a 
+choice about where this directory is; otherwise it will be installed 
+in <filename>c:/ghc/<replaceable>ghc-version</replaceable></filename>.
+The executable binary for GHC will be installed in the <filename>bin/</filename> sub-directory
+of the installation directory you choose.
+</para>
+<para>(If you have already installed the same version of GHC, Installshield will offer to "modify", 
 or "remove" GHC.  Choose "remove"; then run <Filename>setup.exe</Filename> a
 second time.  This time it should offer to install.)
 </para>
 <para>
-At this point you should find GHCi and the GHC documentation are 
+When installation is complete, you should find GHCi and the GHC documentation are 
 available in your Start menu under "Start/Programs/Glasgow Haskell Compiler".
 </para>
 </listitem>
 
 <listitem><para>
-The final dialogue box from the install process tells you where GHC has
-been installed.  If you want to invoke GHC from a command line, add this 
-to your PATH environment variable.  Usually, GHC installs into
-<Filename>c:/ghc/ghc-5.02</Filename>, though the last part of this path
-depends on which version of GHC you are installing, of course. 
-You need to add <Filename>c:/ghc/ghc-5.02/bin</Filename> to your path if yo
+The final dialogue box from the install process reminds you where the GHC binary 
+has been installed (usually <filename>c:/ghc/<replaceable>ghc-version</replaceable>/bin/</filename>.  
+If you want to invoke GHC from a command line, add this 
+to your PATH environment variable.  
 </para></listitem>
 
 <listitem><para>
@@ -677,6 +683,7 @@ on or rebooting may be the quickest cure.
 
 </QandASet>
 
+<!-- doesn't add much value any longer; leave out [sof 7/2002].
 <Para>
 Further information on using GHC under Windows can be found in <ULink
 URL="http://www.dcs.gla.ac.uk/~sof/ghc-win32.html">Sigbj&oslash;rn Finne's
@@ -685,6 +692,7 @@ out of date; the <Emphasis>Miscellaneous</Emphasis> section at the bottom of
 the page is of most interest, covering topics beyond the scope of this
 manual.
 </Para>
+-->
 </Sect2>
 
 </Sect1>
@@ -700,22 +708,23 @@ the implementation.
 <para> GHC is installed in two directory trees:</para>
 <variablelist>
 <varlistentry>
-<term>Binary directory</term>
-<listitem> <para> known as <Filename>$(bindir)</Filename>, holds executables that 
-the user is expected to invoke.  Notably,
-<Filename>ghc</Filename> and <Filename>ghci</FileName>.  On Unix, this directory
-is typically something like <Filename>/usr/local/bin</Filename>.  On Windows,
-however, this directory is always <Filename>$(libdir)/bin</Filename>.
-</para>
-</listitem>
-</varlistentry>
-<varlistentry>
 <term>Library directory,</term>
 <listitem> <para> known as <Filename>$(libdir)</Filename>, holds all the 
 support files needed to run GHC.  On Unix, this 
 directory is usually something like <Filename>/usr/lib/ghc/ghc-5.02</Filename>. </para>
 </listitem>
 </varlistentry>
+<varlistentry>
+<term>Binary directory</term>
+<listitem> <para> known as <Filename>$(bindir)</Filename>, holds executables that 
+the user is expected to invoke.
+Notably, it contains
+<Filename>ghc</Filename> and <Filename>ghci</FileName>.  On Unix, this directory
+can be anywhere, but is typically something like <Filename>/usr/local/bin</Filename>.  On Windows,
+however, this directory <emphasis>must be</emphasis> <Filename>$(libdir)/bin</Filename>.
+</para>
+</listitem>
+</varlistentry>
 </variablelist>
 
 <para>
@@ -737,14 +746,41 @@ one wins.]
 <para> On Windows (but not Unix), if no <option>-B</option> flag is given, GHC uses a system
 call to find the directory in which the running GHC executable lives, and derives 
 <Filename>$(libdir)</Filename> from that. [Unix lacks such a system call.]
+That is why <Filename>$(bindir)</Filename> must be <Filename>$(libdir)/bin</Filename>.
 </para>
 </listitem>
 </itemizedlist>
 
-<sect2> <title>Layout of the library directory</title>
+<sect2> <title>The binary directory</title>
+
+<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>
+</para>
 
-<para>The layout of the library directory is almost identical on
-Windows and Unix, as follows: layout:</para>
+<para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
+passing a suitable <option>-B</option> flag to tell <filename>ghc-<replaceable>version</replaceable></filename> where
+<Filename>$(libdir)</Filename> is.
+Similarly <filename>ghci</filename>, except the extra flag <literal>--interactive</literal> is passed.
+</para>
+
+<para>On Win32, the user-invokable <filename>ghc</filename> binary 
+is the Real Thing (no intervening
+shell scripts or <filename>.bat</filename> files). 
+Reason: we sometimes invoke GHC with very long command lines,
+and <filename>cmd.exe</filename> (which executes <filename>.bat</filename> files)
+truncates them.  Similarly <filename>ghci</filename> is a C wrapper program that invokes <filename>ghc --interactive</filename>
+(passing on all other arguments), not a <filename>.bat</filename> file.
+</para>
+
+
+</sect2>
+
+<sect2> <title>The library directory</title>
+
+<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>
 
 <programlisting>
   $(libdir)/
@@ -753,7 +789,7 @@ Windows and Unix, as follows: layout:</para>
     
     bin/                   [Win32 only]  User-visible binaries
          ghc.exe
-         ghci.bat
+         ghci.exe
 
     unlit                  Remove literate markup
     
@@ -802,24 +838,8 @@ Windows and Unix, as follows: layout:</para>
     HSlang.o                  not grok .a files yet)
 </programlisting>
 
-<para>Note that:</para>
+<para>Note that:
 <itemizedlist>
-<listitem>
-<para>On Win32, the <filename>$(libdir)/bin</filename> directory contains user-visible binaries; 
-add it to your <filename>PATH</filename>.  The <filename>ghci</filename> executable is a <filename>.bat</filename>
-file which invokes <filename>ghc</filename>.   </para>
-
-<para>The GHC executable is the Real Thing (no intervening
-shell scripts or <filename>.bat</filename> files).  
-Reason: we sometimes invoke GHC with very long command lines,
-and <filename>cmd.exe</filename> (which executes <filename>.bat</filename> files)
-truncates them.  [We assume people won't invoke ghci with very long
-command lines.]</para>
-
-<para>On Unix, the user-invokable <filename>ghc</filename> invokes <filename>$(libdir)/ghc-<replaceable>version</replaceable></filename>,
-passing a suitable <option>-B</option> flag. 
-</para>
-</listitem>
 
        <listitem>
          <para><filename>$(libdir)</filename> also contains support
@@ -856,153 +876,12 @@ with the Win32 distribution of GHC. </para>
           with GHC, rather than assume some installed one.  </para>
        </listitem>
 </itemizedlist>
+</para>
 
 </sect2>
 
 </sect1>
 
-
-<Sect1 id="building-docs">
-<Title>Building the documentation</Title>
-
-<Para>We use the DocBook DTD, which is widely used. Most shrink-wrapped
-distributions seem to be broken in one way or another; thanks to
-heroic efforts by Sven Panne and Manuel Chakravarty, we now support
-most of them, plus properly installed versions.
-</Para>
-
-<Para>Instructions on installing and configuring the DocBook tools follow.
-</Para>
-
-<Sect2>
-<Title>Installing the DocBook tools from RPMs</Title>
-
-<Para>If you're using a system that can handle RedHat RPM packages,
-you can probably use the <ULink
-URL="http://sourceware.cygnus.com/docbook-tools/">Cygnus DocBook
-tools</ULink>, which is the most shrink-wrapped SGML suite that we
-could find. You need all the RPMs except for psgml (i.e.
-<Filename>docbook</Filename>, <Filename>jade</Filename>,
-<Filename>jadetex</Filename>, <Filename>sgmlcommon</Filename> and
-<Filename>stylesheets</Filename>). Note that most of these RPMs are
-architecture neutral, so are likely to be found in a
-<Filename>noarch</Filename> directory. The SuSE RPMs also work; the
-RedHat ones <Emphasis>don't</Emphasis> in RedHat 6.2 (7.0 and later
-should be OK), but they are easy to fix: just make a symlink from
-<Filename>/usr/lib/sgml/stylesheets/nwalsh-modular/lib/dblib.dsl</Filename>
-to <Filename>/usr/lib/sgml/lib/dblib.dsl</Filename>. </Para>
-
-</Sect2>
-
-    <sect2>
-      <title>Installing DocBook on FreeBSD</title>
-
-      <para>On FreeBSD systems, the easiest way to get DocBook up and
-      running is to install it from the ports tree or a pre-compiled
-      package (packages are available from your local FreeBSD mirror
-      site).</para>
-
-      <para>To use the ports tree, do this:
-<screen>
-      $ cd /usr/ports/textproc/docproj
-      $ make install
-</screen>
-      This installs the FreeBSD documentation project tools, which
-      includes everything needed to format the GHC
-      documentation.</para>
-    </sect2>
-
-<Sect2>
-<Title>Installing from binaries on Windows</Title>
-
-<Para>It's a good idea to use Norman Walsh's <ULink
-URL="http://nwalsh.com/docbook/dsssl/doc/install.html">installation
-notes</ULink> as a guide. You should get version 3.1 of DocBook, and note
-that his file <Filename>test.sgm</Filename> won't work, as it needs version
-3.0. You should unpack Jade into <Filename>\Jade</Filename>, along with the
-entities, DocBook into <Filename>\docbook</Filename>, and the DocBook
-stylesheets into <Filename>\docbook\stylesheets</Filename> (so they actually
-end up in <Filename>\docbook\stylesheets\docbook</Filename>).
-</Para>
-
-</Sect2>
-
-
-<Sect2>
-<Title>Installing the DocBook tools from source</Title>
-
-<Sect3>
-<Title>Jade</Title>
-
-<Para>Install <ULink URL="http://openjade.sourceforge.net/">OpenJade</ULink> (Windows binaries are available as well as sources). If you want DVI, PS, or PDF then install JadeTeX from the <Filename>dsssl</Filename>
-subdirectory. (If you get the error:
-
-<Screen>
-! LaTeX Error: Unknown option implicit=false' for package hyperref'.
-</Screen>
-
-your version of <Command>hyperref</Command> is out of date; download it from
-CTAN (<Filename>macros/latex/contrib/supported/hyperref</Filename>), and
-make it, ensuring that you have first removed or renamed your old copy. If
-you start getting file not found errors when making the test for
-<Command>hyperref</Command>, you can abort at that point and proceed
-straight to <Command>make install</Command>, or enter them as
-<Filename>../</Filename><Emphasis>filename</Emphasis>.)
-</Para>
-
-<Para>Make links from <Filename>virtex</Filename> to <Filename>jadetex</Filename>
-and <Filename>pdfvirtex</Filename> to <Filename>pdfjadetex</Filename>
-(otherwise DVI, PostScript and PDF output will not work). Copy
-<Filename>dsssl/*.{dtd,dsl}</Filename> and <Filename>catalog</Filename> to <Filename>/usr/[local/]lib/sgml</Filename>.
-</Para>
-
-</Sect3>
-
-<Sect3>
-<Title>DocBook and the DocBook stylesheets</Title>
-
-<Para>Get a Zip of <ULink
-URL="http://www.oasis-open.org/docbook/sgml/3.1/index.html">DocBook</ULink> 
-and install the contents in <Filename>/usr/[local/]/lib/sgml</Filename>.
-</Para>
-
-<Para>Get the <ULink URL="http://nwalsh.com/docbook/dsssl/">DocBook
-stylesheets</ULink> and install in
-<Filename>/usr/[local/]lib/sgml/stylesheets</Filename> (thereby creating a
-subdirectory docbook). For indexing, copy or link <Filename>collateindex.pl</Filename> from the DocBook stylesheets archive in <Filename>bin</Filename> into a directory on your <Constant>PATH</Constant>.
-</Para>
-
-<Para>Download the <ULink
-URL="http://www.oasis-open.org/cover/ISOEnts.zip">ISO
-entities</ULink> into <Filename>/usr/[local/]lib/sgml</Filename>.
-</Para>
-
-</Sect3>
-
-</Sect2>
-
-<Sect2>
-<Title>Configuring the DocBook tools</Title>
-
-<Para>Once the DocBook tools are installed, the configure script will detect them and set up the build system accordingly. If you have a system that isn't supported, let us know, and we'll try to help.
-</Para>
-
-</Sect2>
-
-<Sect2>
-<Title>Remaining problems</Title>
-
-<Para>If you install from source, you'll get a pile of warnings of the form
-
-<Screen>DTDDECL catalog entries are not supported</Screen>
-
-every time you build anything. These can safely be ignored, but if you find them tedious you can get rid of them by removing all the <Constant>DTDDECL</Constant> entries from <Filename>docbook.cat</Filename>.
-</Para>
-
-</Sect2>
-
-</Sect1>
-
 </Chapter>
 
 <!-- Emacs stuff: