[[project @ 2003-06-13 07:44:15 by simonpj] simonpj**20030613074415 Clarifying remarks about libdir/bindir ] { hunk ./ghc/docs/users_guide/installing.sgml 706 -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. - - - - hunk ./ghc/docs/users_guide/installing.sgml 712 + +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. + + + hunk ./ghc/docs/users_guide/installing.sgml 744 +That is why $(bindir) must be $(libdir)/bin. hunk ./ghc/docs/users_guide/installing.sgml 749 - Layout of the library directory + The binary directory hunk ./ghc/docs/users_guide/installing.sgml 751 -The layout of the library directory is almost identical on -Windows and Unix, as follows: layout: +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, $(libdir) is almost identical on +Windows and Unix, as follows. Differences between Windows and Unix +are noted thus [Win32 only] and are commented below. hunk ./ghc/docs/users_guide/installing.sgml 787 - ghci.bat + ghci.exe hunk ./ghc/docs/users_guide/installing.sgml 836 -Note that: +Note that: hunk ./ghc/docs/users_guide/installing.sgml 838 - -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. - - hunk ./ghc/docs/users_guide/installing.sgml 874 + }