[project @ 2002-11-13 12:21:08 by simonmar]
authorsimonmar <unknown>
Wed, 13 Nov 2002 12:21:09 +0000 (12:21 +0000)
committersimonmar <unknown>
Wed, 13 Nov 2002 12:21:09 +0000 (12:21 +0000)
commit351afa5ad7cc7012d5460c126cad4999e457a30d
tree71bd2388d2a5c19c2dbf6fc5102880c238717ee3
parent3212d689cc0a66e3c9e1f9bd745f20160df90642
[project @ 2002-11-13 12:21:08 by simonmar]
Add support for gcc-style "make bootstrap" which will build the stage
1, 2 and 3 compilers in the same build tree.

The idea is to simplify building a stage 2 or 3 compiler (now you only
need one build tree), and also speed up the build: there's no need to
compile the libraries more than once, because the stage 1 libraries
are used for stages 2 & 3.

In ghc/compiler, the objects and .hi files are now placed in
subdirectories: ghc/compiler/stage1 has the stage1 objects,
ghc/compiler/stage2 has the stage2 objects, etc.

The story from the top-level (fptools) is this:

  make all    works as before (i.e. builds ghc (stage 1),
  libraries, etc.)

  make stage2     builds the stage 2 compiler
  make stage3     builds the stage 3 compiler

  make bootstrap  does 'make all' followed by 'make stage2'
  make bootstrap3 does 'make all' followed by 'make stage2; make stage3'

In ghc/compiler, the story is now:

  make all      works as before (i.e. builds stage 1 only)

  make boot          generate build dirs and dependencies for stage 1
  make boot stage=N  generate build dirs and dependencies for stage N

  make stageN
  make stage=N       builds stage N compiler.  Run it in-place using
    ./stageN/ghc-inplace.

I haven't decided what to do about 'make install' yet, and this still
needs documenting in the Building Guide.  Also, you still get the same
$(GhcHcOpts) for each stage.
Makefile
ghc/compiler/Makefile
mk/boilerplate.mk
mk/config.mk.in
mk/suffix.mk
mk/target.mk