Changes between Version 24 and Version 25 of Attic/Building/BuildSystem/New


Ignore:
Timestamp:
Jan 14, 2009 9:16:56 AM (7 years ago)
Author:
simonmar
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Attic/Building/BuildSystem/New

    v24 v25  
    6464   contains the build instructions for that directory.
    6565
    66  * The top-level of the build system is in `Makefile` and `ghc.mk`.
    67 
    6866 * Other parts of the build system are in `mk/*.mk` and `rules/*.mk`.
     67
     68 * The top-level `ghc.mk` file includes all the other `*.mk` files in
     69   the tree.  The top-level `Makefile` invokes '''make''' on `ghc.mk`
     70   (this is the only recursive invocation of '''make'''; see the "phase
     71   ordering" idiom below).
    6972
    7073== Idiom: stub makefiles and standard targets (e.g. "all" and "clean") ==
     
    9093}}}
    9194
    92 where `mk/sub-makefile.mk` knows how to recursively invoke the giant top-level '''make'''.  This in turn includes the `ghc.mk` from all sub-directories, presumably including the one where you invoked the original `make`.
     95where `mk/sub-makefile.mk` knows how to recursively invoke the giant top-level '''make'''.
     96
     97== Idiom: standard targets (all, clean, etc.) ==
    9398
    9499We want an `all` target that builds everything, but we also want a way to build individual components (say, everything in `rts/`).  This is achieved by having a separate "all" target for each directory, named `all_`''directory''.  For example in `rts/ghc.mk` we might have this: