X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=docs%2Fbuilding.sgml;h=2c9d107637f4546997beb646e0cbc95d034bcc90;hb=ec86294b5e6d9aeef1d23e9a18fe71f2210eb4de;hp=b7c3fbba51677781543db64d96ffe004b69e38e7;hpb=ffb4740c066444e9fc97bfe337ca39ec74f67c65;p=ghc-hetmet.git diff --git a/docs/building.sgml b/docs/building.sgml index b7c3fbb..2c9d107 100644 --- a/docs/building.sgml +++ b/docs/building.sgml @@ -1,10 +1,10 @@ -
+
-Building and Installing the Glasgow Functional Programming Tools Suite +Building the Glasgow Functional Programming Tools Suite The GHC Team
glasgow-haskell-{users,bugs}@haskell.org
January 2000 @@ -172,7 +172,7 @@ manual in detail. - + Things to check before you start typing @@ -182,32 +182,26 @@ Here's a list of things to check before you get started. -Disk space neededDisk space needed: About 30MB (five hamburgers' worth) of disk space -for the most basic binary distribution of GHC; more for some -platforms, e.g., Alphas. An extra ``bundle'' (e.g., concurrent -Haskell libraries) might take you to 8–10 hamburgers. - -You'll need over 100MB (say, 20 hamburgers' worth) if you need to -build the basic stuff from scratch. - - -All of the above are estimates of disk-space needs. (I don't yet -know the disk requirements for the non-GHC tools). - +Disk space needed +Disk space needed: About 40MB (one tenth of one hamburger's worth) of disk +space for the most basic binary distribution of GHC; more for some +platforms, e.g., Alphas. An extra ``bundle'' (e.g., concurrent Haskell +libraries) might take you to up to one fifth of a hamburger. You'll need +over 100MB (say, one fifth a hamburger's worth) if you need to build the +basic stuff from scratch. All of the above are +estimates of disk-space needs. (Note: our benchmark hamburger is a standard Double Whopper with Cheese, with an RRP of UKP2.99.) Use an appropriate machine, compilers, and things. - SPARC boxes, and PCs running Linux, FreeBSD, NetBSD, or Solaris are all fully supported. Win32 and HP boxes are in pretty good shape. DEC Alphas running OSF/1, Linux or some BSD variant, MIPS and AIX boxes will need some minimal porting effort before they work (as of 4.06). gives the full run-down on ports or lack thereof. - @@ -317,14 +311,12 @@ by their ``canonical'' CPU/Manufacturer/OS triple. alpha-dec-{osf,linux,freebsd,openbsd,netbsd}: - - alpha-dec-osf alpha-dec-linux alpha-dec-freebsd alpha-dec-openbsd alpha-dec-netbsd - + Currently non-working. The last working version (osf[1-3]) is GHC @@ -338,8 +330,8 @@ either need Alpha support and/or can provide access to boxes. sparc-sun-sunos4: - sparc-sun-sunos4 + Probably works with minor tweaks, hasn't been tested for a while. @@ -348,8 +340,8 @@ Probably works with minor tweaks, hasn't been tested for a while. sparc-sun-solaris2: - sparc-sun-solaris2 + Fully supported, including native-code generator. @@ -358,8 +350,8 @@ Fully supported, including native-code generator. hppa1.1-hp-hpux (HP-PA boxes running HPUX 9.x) - hppa1.1-hp-hpux + Works registerised. No native-code generator. @@ -367,9 +359,9 @@ Works registerised. No native-code generator. -i386-unknown-linux (PCs running Linux—ELF format): - +i386-unknown-linux (PCs running Linux—ELF binary format): i386-*-linux + GHC works registerised. You must have GCC 2.7.x @@ -384,12 +376,10 @@ versions, even if the shared library version hasn't changed. i386-unknown-{freebsd,netbsd,openbsd) (PCs running FreeBSD 2.2 or higher, NetBSD, and possibly OpenBSD): - - i386-unknown-freebsd i386-unknown-netbsd i386-unknown-openbsd - + GHC works registerised. These systems provide ready-built packages of @@ -400,10 +390,8 @@ the package. i386-unknown-cygwin32: - - i386-unknown-cygwin32 - + Fully supported under Win9x/NT, including a native code @@ -415,10 +403,8 @@ etc.). mips-sgi-irix5: - - mips-sgi-irix[5-6] - + Port currently doesn't work, needs some minimal porting effort. As @@ -470,8 +456,11 @@ Unless you hear otherwise, the other tools work if GHC works. Here are the gory details about some utility programs you may need; -perl and gcc are the only important ones. (PVMPVM is important -if you're going for Parallel Haskell.) The configureconfigure +perl, gcc and +happy are the only important +ones. (PVMPVM is important +if you're going for Parallel Haskell.) The +configureconfigure script will tell you if you are missing something. @@ -480,13 +469,13 @@ script will tell you if you are missing something. Perl: - - pre-supposed: Perl Perl, pre-supposed -You have to have Perl to proceed! Perl is a language quite good -for doing shell-scripty tasks that involve lots of text processing. -It is pretty easy to install. + + +You have to have Perl to proceed! Perl is a +language quite good for doing shell-scripty tasks that involve lots of +text processing. It is pretty easy to install. @@ -508,11 +497,9 @@ systems. GNU C (gcc): - - pre-supposed: GCC (GNU C compiler) GCC (GNU C compiler), pre-supposed - + We recommend using GCC version 2.95.2 on all platforms. Failing that, @@ -530,14 +517,27 @@ please let us know, so we can report it and get things improved. + +Happy: +Happy + +Happy is a parser generator tool for Haskell, and is used to +generate GHC's parsers. Happy is written in Haskell, and is a project +in the CVS repository (fptools/happy). It can be +built from source, but bear in mind that you'll need GHC installed in +order to build it. To avoid the chicken/egg problem, install a binary +distribtion of either Happy or GHC to get started. Happy +distributions are available from Happy's Web Page. + + + + Autoconf: - - pre-supposed: Autoconf Autoconf, pre-supposed - - + GNU Autoconf is needed if you intend to build from the CVS sources, it is not needed if you just intend to build a @@ -554,11 +554,10 @@ If you modify either of these files, you'll need Autoconf to rebuild sed - - pre-supposed: sed sed, pre-supposed - + + You need a working sed if you are going to build from sources. The build-configuration stuff needs it. GNU sed version 2.0.4 is no good! It has a bug in it that is tickled by the @@ -586,11 +585,9 @@ particularly Glasgow-ish, but Occasionally Indispensable. Like PVM version 3: - - pre-supposed: PVM3 (Parallel Virtual Machine) PVM3 (Parallel Virtual Machine), pre-supposed - + PVM is the Parallel Virtual Machine on which Parallel Haskell programs @@ -613,9 +610,9 @@ the Readme instructions. bash: +bash, presupposed (Parallel Haskell only) -bash, presupposed (Parallel Haskell only) Sadly, the gr2ps script, used to convert ``parallelism profiles'' to PostScript, is written in Bash (GNU's Bourne Again shell). This bug will be fixed (someday). @@ -640,25 +637,22 @@ documentation that comes with the fptools projects: DocBook: +pre-supposed: DocBook +DocBook, pre-supposed -pre-supposed: DocBook -DocBook, pre-supposed All -our documentation is written in SGML, using the DocBook DTD and -processed using the Cygnus DocBook -tools, which is the most shrink-wrapped SGML suite that we -could find. Unfortunately, it's only packaged as RPMs. You can use it -to generate HTML, DVI (and hence PDF and Postscript) and RTF from any -DocBook source file (including this manual). N.B. The Cygnus version of the tools is assumed. Others, such as the SuSE version, may not work. +All our documentation is written in SGML, using the DocBook DTD. +Instructions on installing and configuring the DocBook tools are in the +installation guide (in the GHC user guide). + TeX: - - pre-supposed: TeX TeX, pre-supposed + + A decent TeX distribution is required if you want to produce printable documentation. We recomment teTeX, which includes just about everything you need. @@ -673,16 +667,12 @@ everything you need. Other useful tools - - Flex: - - pre-supposed: flex flex, pre-supposed - + This is a quite-a-bit-better-than-Lex lexer. Used to build a couple @@ -692,7 +682,6 @@ work; you should get the GNU version. - @@ -897,6 +886,13 @@ no arguments). This GNU program converts $(FPTOOLS&lo to a shell script called $(FPTOOLS_TOP)/configure. + +Some projects, including GHC, have their own configure script. If +there's an +$(FPTOOLS_TOP)/<project>/configure.in, +then you need to run autoconf in that directory too. + + Both these steps are completely platform-independent; they just mean that the human-written file (configure.in) can be short, although @@ -1267,23 +1263,56 @@ install them? That is specified by reverses the effect of install. + clean: -remove all easily-rebuilt files. - +Delete all files from the current directory that are normally +created by building the program. Don't delete the files that +record the configuration. Also preserve files that could be made +by building, but normally aren't because the distribution comes +with them. + + +distclean: + +Delete all files from the current directory that are created by +configuring or building the program. If you have unpacked the source +and built the program without creating any other files, make +distclean should leave only the files that were in the +distribution. + + + + +mostlyclean: + +Like clean, but may refrain from deleting a +few files that people normally don't want to recompile. + + + -veryclean: +maintainer-clean: -remove all files that can be rebuilt at all. -There's a danger here that you may remove a file that needs a more -obscure utility to rebuild it (especially if you started from a source -distribution). - - +Delete everything from the current directory that can be reconstructed +with this Makefile. This typically includes everything deleted by +distclean, plus more: C source files produced by +Bison, tags tables, Info files, and so on. + +One exception, however: make maintainer-clean +should not delete configure even if +configure can be remade using a rule in the +Makefile. More generally, make +maintainer-clean should not delete anything that needs to +exist in order to run configure and then begin to +build the program. + + + check: @@ -1360,11 +1389,33 @@ Most Makefiles have targets other than these. You can disc + +Using a project from the build tree + +If you want to build GHC (say) and just use it direct from the build +tree without doing make install first, you can run +the in-place driver script: +ghc/driver/ghc-inplace. + + + Do NOT use +ghc/driver/ghc, or +ghc/driver/ghc-4.xx, as these are the scripts +intended for installation, and contain hard-wired paths to the +installed libraries, rather than the libraries in the build tree. + + + +Happy can similarly be run from the build tree, using +happy/src/happy-inplace. + + + -Fast Making -<IndexTerm><Primary>fastmake</Primary></IndexTerm> +<Title>Fast Making <IndexTerm><Primary>fastmake</Primary></IndexTerm> <IndexTerm><Primary>dependencies, omitting</Primary></IndexTerm> -<IndexTerm><Primary>FAST, makefile variable</Primary></IndexTerm> +FAST, makefile +variable Sometimes the dependencies get in the way: if you've made a small @@ -1400,7 +1451,7 @@ User's Guide section on "Separate Compilation"). - + The <Filename>Makefile</Filename> architecture <IndexTerm><Primary>makefile architecture</Primary></IndexTerm>