[project @ 2003-08-27 15:18:29 by panne]
[ghc-hetmet.git] / docs / building / building.sgml
index 84bbc61..bd5246c 100644 (file)
 
 
        <para>
-       [Windows users.] The programs <command>ssh-keygen1</command>, <command>ssh1</command>, and <command>cvs</command>,
-       seem to lock up <command>bash</command> entirely if they try to get user input (e.g. if
-       they ask for a password).  To solve this, start up <filename>cmd.exe</filename> 
-       and run it as follows:
-       <Screen>
-       c:\tmp> set CYGWIN32=tty
-       c:\tmp> c:/user/local/bin/ssh-keygen1
-       </Screen> </para>
+       <emphasis>Windows users: see the notes in <xref linkend="configure-ssh"> about <command>ssh</command> wrinkles!</emphasis>
+         </para>
+
 
-           <para>[Windows users.] To protect your
-            <literal>.ssh</literal> from access by anyone else,
-            right-click your <literal>.ssh</literal> directory, and
-            select <literal>Properties</literal>.  If you are not on
-            the access control list, add yourself, and give yourself
-            full permissions (the second panel).  Remove everyone else
-            from the access control list.  Don't leave them there but
-            deny them access, because 'they' may be a list that
-            includes you!</para>
-           <para>[March 2003] In fact <command>ssh</command> 3.6.1 now seems to <emphasis>require</emphasis>
-             you to have Unix permissions 600 (read/write for owner only) 
-             on the <literal>.ssh/identity</literal> file, else it 
-             bombs out.  For your local C drive, it seems that <literal>chmod 600 identity</literal> works,
-             but on Windows NT/XP, it doesn't work on a network drive (exact dteails obscure).  
-             The solution seems to be to set the CYGWIN environment
-             variable to "<literal>ntsec neta</literal>".  The CYGWIN environment variable is discussed
-             in <ulink url="http://cygwin.com/cygwin-ug-net/using-cygwinenv.html">the Cygwin User's Guide</ulink>,
-             and there are more details in <ulink url="http://cygwin.com/faq/faq_4.html#SEC44">the Cygwin FAQ</ulink>.
-             </para>
          </listitem>
 
          <listitem>
@@ -585,10 +561,7 @@ $ cvs commit -F <replaceable>commit-message</replaceable> <replaceable>directory
       major cause of headaches. </para>
 
       <para>So, to avoid a lot of hassle, follow this recipe for
-      updating your tree.  Usually you will only want to run cvs update
-      in the sub-projects because running <literal>cvs update -Pd</literal>
-      on top-level will also retrieve any directories you intentionally did
-      not check out:</para>
+      updating your tree:</para>
 
 <screen>
 $ cd fptools
@@ -768,11 +741,11 @@ $ cvs checkout nofib/spectral
       </varlistentry>
 
       <varlistentry>
-       <term><literal>green-card</literal></term>
-       <indexterm><primary><literal>green-card</literal></primary><secondary>project</secondary></indexterm>
+       <term><literal>greencard</literal></term>
+       <indexterm><primary><literal>greencard</literal></primary><secondary>project</secondary></indexterm>
        <listitem>
          <para>The <ulink
-         url="http://www.haskell.org/greencard/">Green Card</ulink>
+         url="http://www.haskell.org/greencard/">GreenCard</ulink>
          system for generating Haskell foreign function
          interfaces.</para>
        </listitem>
@@ -1285,7 +1258,7 @@ $ cvs checkout nofib/spectral
          6.1.</para>
 
          <para>Autoconf builds the <command>configure</command>
-          script from <filename>configure.in</filename> and
+          script from <filename>configure.ac</filename> and
           <filename>aclocal.m4</filename>.  If you modify either of
           these files, you'll need <command>autoconf</command> to
           rebuild <filename>configure</filename>.</para>
@@ -1442,7 +1415,7 @@ $ make install
        </listitem>
 
        <listitem>
-         <para><filename>configure.in</filename>,
+         <para><filename>configure.ac</filename>,
           <filename>config.sub</filename>,
           <filename>config.guess</filename>: these files support the
           configuration process.</para>
@@ -1465,7 +1438,7 @@ $ make install
       only one project (<literal>happy</literal>, say), you must have
       a source tree whose root directory contains
       <filename>Makefile</filename>, <filename>mk/</filename>,
-      <filename>configure.in</filename>, and the project(s) you want
+      <filename>configure.ac</filename>, and the project(s) you want
       (<filename>happy/</filename> in this case).  You cannot get by
       with just the <filename>happy/</filename> directory.</para>
     </sect2>
@@ -1582,20 +1555,20 @@ $ make install
             issue the command
             <command>autoconf</command><indexterm><primary>autoconf</primary></indexterm>
             (with no arguments). This GNU program converts
-            <filename><constant>&dollar;(FPTOOLS&lowbar;TOP)</constant>/configure.in</filename>
+            <filename><constant>&dollar;(FPTOOLS&lowbar;TOP)</constant>/configure.ac</filename>
             to a shell script called
             <filename><constant>&dollar;(FPTOOLS&lowbar;TOP)</constant>/configure</filename>.
             </para>
 
            <para>Some projects, including GHC, have their own
             configure script.  If there's an
-            <constant>&dollar;(FPTOOLS&lowbar;TOP)/&lt;project&gt;/configure.in</constant>,
+            <constant>&dollar;(FPTOOLS&lowbar;TOP)/&lt;project&gt;/configure.ac</constant>,
             then you need to run <command>autoconf</command> in that
             directory too.</para>
 
            <para>Both these steps are completely
             platform-independent; they just mean that the
-            human-written file (<filename>configure.in</filename>) can
+            human-written file (<filename>configure.ac</filename>) can
             be short, although the resulting shell script,
             <command>configure</command>, and
             <filename>mk/config.h.in</filename>, are long.</para>
@@ -1616,7 +1589,7 @@ $ make install
             round your computer working out what architecture it has,
             what operating system, whether it has the
             <Function>vfork</Function> system call, where
-            <command>yacc</command> is kept, whether
+            <command>tar</command> is kept, whether
             <command>gcc</command> is available, where various obscure
             <literal>&num;include</literal> files are, whether it's a
             leap year, and what the systems manager had for lunch.  It
@@ -1796,17 +1769,17 @@ GhcHcOpts=-DDEBUG -Rghc-timing
       For example, there's a line that says:</para>
 
 <ProgramListing>
-YACC = @YaccCmd@
+TAR = @TarCmd@
 </ProgramListing>
 
-      <para>This defines the Make variables <constant>YACC</constant>
-      to the pathname for a <command>yacc</command> that
+      <para>This defines the Make variables <constant>TAR</constant>
+      to the pathname for a <command>tar</command> that
       <command>configure</command> finds somewhere.  If you have your
-      own pet <command>yacc</command> you want to use instead, that's
+      own pet <command>tar</command> you want to use instead, that's
       fine. Just add this line to <filename>mk/build.mk</filename>:</para>
 
 <ProgramListing>
-YACC = myyacc
+TAR = mytar
 </ProgramListing>
 
       <para>You do not <emphasis>have</emphasis> to have a
@@ -4351,6 +4324,73 @@ variable.  You can always invoke <command>find</command> with an absolute path,
 
 </Sect2>
 
+<Sect2 id="configure-ssh"><Title>Configuring SSH</Title>
+
+<para><command>ssh</command> comes with Cygwin, provided you remember to ask for it when
+you install Cygwin.  (If not, the installer lets you update easily.)  Look for <command>openssh</command> 
+(not ssh) in the Cygwin list of applications!</para>
+
+<para>There are several strange things about <command>ssh</command> on Windows that you need to know.
+<itemizedlist>
+<listitem>
+<para>
+       The programs <command>ssh-keygen1</command>, <command>ssh1</command>, and <command>cvs</command>,
+       seem to lock up <command>bash</command> entirely if they try to get user input (e.g. if
+       they ask for a password).  To solve this, start up <filename>cmd.exe</filename> 
+       and run it as follows:
+       <Screen>
+       c:\tmp> set CYGWIN32=tty
+       c:\tmp> c:/user/local/bin/ssh-keygen1
+       </Screen> </para>
+</listitem>
+
+<listitem><para>
+<command>ssh</command> needs to access your directory <filename>.ssh</filename>, in your home directory.  
+To determine your home directory <command>ssh</command> first looks in 
+<filename>c:/cygwin/etc/passwd</filename> (or wherever you have Cygwin installed).  If there's an entry
+there with your userid, it'll use that entry to determine your home directory, <emphasis>ignoring
+the setting of the environment variable $HOME</emphasis>.  If the home directory is
+bogus, <command>ssh</command> fails horribly.   The best way to see what is going on is to say
+<programlisting>
+  ssh -v cvs.haskell.org
+</programlisting>
+which makes <command>ssh</command> print out information about its activity.
+</para>
+<para> You can fix this problem, either by correcting the home-directory field in 
+<filename>c:/cygwin/etc/passwd</filename>, or by simply deleting the entire entry for your userid. If
+you do that, <command>ssh</command> uses the $HOME environment variable instead.
+</para>
+
+</listitem>
+
+<listitem>
+           <para>To protect your
+            <literal>.ssh</literal> from access by anyone else,
+            right-click your <literal>.ssh</literal> directory, and
+            select <literal>Properties</literal>.  If you are not on
+            the access control list, add yourself, and give yourself
+            full permissions (the second panel).  Remove everyone else
+            from the access control list.  Don't leave them there but
+            deny them access, because 'they' may be a list that
+            includes you!</para>
+</listitem>
+
+<listitem>
+           <para>In fact <command>ssh</command> 3.6.1 now seems to <emphasis>require</emphasis>
+             you to have Unix permissions 600 (read/write for owner only) 
+             on the <literal>.ssh/identity</literal> file, else it 
+             bombs out.  For your local C drive, it seems that <literal>chmod 600 identity</literal> works,
+             but on Windows NT/XP, it doesn't work on a network drive (exact dteails obscure).  
+             The solution seems to be to set the $CYGWIN environment
+             variable to "<literal>ntsec neta</literal>".  The $CYGWIN environment variable is discussed
+             in <ulink url="http://cygwin.com/cygwin-ug-net/using-cygwinenv.html">the Cygwin User's Guide</ulink>,
+             and there are more details in <ulink url="http://cygwin.com/faq/faq_4.html#SEC44">the Cygwin FAQ</ulink>.
+             </para>
+</listitem>
+</itemizedlist>
+</para>
+</sect2>
+
 <Sect2><Title>Other things you need to install</Title>
 
 <para>You have to install the following other things to build GHC: