From 142e3ace54bb7aac1945b74589c8300246960435 Mon Sep 17 00:00:00 2001 From: simonpj Date: Fri, 13 Jun 2003 07:44:15 +0000 Subject: [PATCH] [project @ 2003-06-13 07:44:15 by simonpj] Clarifying remarks about libdir/bindir --- ghc/docs/users_guide/installing.sgml | 75 ++++++++++++++++++++-------------- 1 file changed, 44 insertions(+), 31 deletions(-) diff --git a/ghc/docs/users_guide/installing.sgml b/ghc/docs/users_guide/installing.sgml index e430ac1..fdfb078 100644 --- a/ghc/docs/users_guide/installing.sgml +++ b/ghc/docs/users_guide/installing.sgml @@ -703,22 +703,23 @@ the implementation. GHC is installed in two directory trees: -Binary directory - known as $(bindir), holds executables that -the user is expected to invoke. Notably, -ghc and ghci. On Unix, this directory -is typically something like /usr/local/bin. On Windows, -however, this directory is always $(libdir)/bin. - - - - Library directory, known as $(libdir), holds all the support files needed to run GHC. On Unix, this directory is usually something like /usr/lib/ghc/ghc-5.02. + +Binary directory + known as $(bindir), holds executables that +the user is expected to invoke. +Notably, it contains +ghc and ghci. On Unix, this directory +can be anywhere, but is typically something like /usr/local/bin. On Windows, +however, this directory must be $(libdir)/bin. + + + @@ -740,14 +741,41 @@ one wins.] On Windows (but not Unix), if no flag is given, GHC uses a system call to find the directory in which the running GHC executable lives, and derives $(libdir) from that. [Unix lacks such a system call.] +That is why $(bindir) must be $(libdir)/bin. - Layout of the library directory + The binary directory + +The binary directory, $(bindir) contains user-visible +executables, notably ghc and ghci. +You should add it to your $PATH + + +On Unix, the user-invokable ghc invokes $(libdir)/ghc-version, +passing a suitable flag to tell ghc-version where +$(libdir) is. +Similarly ghci, except the extra flag --interactive is passed. + + +On Win32, the user-invokable ghc binary +is the Real Thing (no intervening +shell scripts or .bat files). +Reason: we sometimes invoke GHC with very long command lines, +and cmd.exe (which executes .bat files) +truncates them. Similarly ghci is a C wrapper program that invokes ghc --interactive +(passing on all other arguments), not a .bat file. + + + + + + The library directory -The layout of the library directory is almost identical on -Windows and Unix, as follows: layout: +The layout of the library directory, $(libdir) is almost identical on +Windows and Unix, as follows. Differences between Windows and Unix +are noted thus [Win32 only] and are commented below. $(libdir)/ @@ -756,7 +784,7 @@ Windows and Unix, as follows: layout: bin/ [Win32 only] User-visible binaries ghc.exe - ghci.bat + ghci.exe unlit Remove literate markup @@ -805,24 +833,8 @@ Windows and Unix, as follows: layout: HSlang.o not grok .a files yet) -Note that: +Note that: - -On Win32, the $(libdir)/bin directory contains user-visible binaries; -add it to your PATH. The ghci executable is a .bat -file which invokes ghc. - -The GHC executable is the Real Thing (no intervening -shell scripts or .bat files). -Reason: we sometimes invoke GHC with very long command lines, -and cmd.exe (which executes .bat files) -truncates them. [We assume people won't invoke ghci with very long -command lines.] - -On Unix, the user-invokable ghc invokes $(libdir)/ghc-version, -passing a suitable flag. - - $(libdir) also contains support @@ -859,6 +871,7 @@ with the Win32 distribution of GHC. with GHC, rather than assume some installed one. + -- 1.7.10.4