Changes between Version 20 and Version 21 of Commentary/SourceTree


Ignore:
Timestamp:
May 9, 2009 8:12:16 PM (5 years ago)
Author:
igloo
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Commentary/SourceTree

    v20 v21  
    66This page summarises the overall file and directory structure of GHC.  We include both source files and generated files; the latter are always identified "build-tree only". 
    77 
    8 Everything starts with the main GHC repository (see [wiki:Building/GettingTheSources]).   The biuld system calls that directory `$(TOP)`.  All the paths below are relative to `$(TOP)`. 
     8Everything starts with the main GHC repository (see [wiki:Building/GettingTheSources]).   The build system calls that directory `$(TOP)`.  All the paths below are relative to `$(TOP)`. 
    99 
    1010== Files in `$(TOP)` == 
     
    2929== `libraries/` == 
    3030 
    31 The `libraries/` directory contains all the packages that GHC needs to build.  It has one sub-directory for each package repository (e.g. `base`, `haskell98`, `random`). Usually each such repository builds just one package but sometimes more than one (e.g DPH). 
    32  
    33 '''NOT RIGHT: PLEASE FIX''' 
    34  
    35  * '''`libraries/cabal-bin.hs`''' is a little program we use for building the libraries. It's similar to cabal-install, but without the dependencies on `http` etc. 
    36  * '''`libraries/ifBuildable/`''' is a utility that we use in the build system. It allows the build to continue if an extralib is not buildable (e.g., if we are missing a C library that an extralib depends on then we can still build the compiler). We expect this to disappear soon, when extralibs are removed. 
    37  * '''`libraries/bootstrapping/`''': In order to build `cabal-bin` we need to compile `cabal-bin.hs`, as well as a few libraries that we can't rely on the bootstrapping compiler having. We put the `.hi` and `.o` files that result from this in `bootstrapping/`. 
     31The `libraries/` directory contains all the packages that GHC needs to build.  It has one sub-directory for each package repository (e.g. `base`, `haskell98`, `random`). Usually each such repository builds just one package, but there is more than one in `dph`. 
    3832 
    3933== `compiler/`, `docs/`, `ghc/` ==  
     
    6660The `utils` directory contains support utilities that GHC uses.  Some of these are themselves separate repositories that `darcs-all` pulls; others are part of the main GHC repository.  
    6761 
    68 These utils may be built with the bootstrapping compiler, for use during the build, or with the stage2 compiler, for installing. Some of them are built with both; we can't install the utils built with the bootstrapping compiler as they may use different versions of C libraries. The reason we use stage2 rather than stage1 is that some utils, e.g. haddock, need the GHC API package.  The file `utils/Makefile` controls all this. 
     62These utils may be built with the bootstrapping compiler, for use during the build, or with the stage1 or stage2 compiler, for installing. Some of them are built with both; we can't install the utils built with the bootstrapping compiler as they may use different versions of C libraries. The reason we use sometimes use stage2 rather than stage1 is that some utils, e.g. haddock, need the GHC API package. 
     63 
     64 * '''`utils/ghc-pwd`''' is a little program we use for getting the current directory. We use this, rather than `pwd`, as the latter may give reults that we can't use on Windows. 
     65 * '''`utils/ghc-cabal`''' is a little program we use for building the libraries. It's similar to cabal-install, but without the dependencies on `http` etc. 
    6966 
    7067''Why isn't libffi in utils/?''