|
|
# Re-structuring the GHC build system
|
|
|
|
|
|
|
|
|
|
|
|
This page describes our current plan for making GHC's build system more
|
|
|
malleable. The new build system will be developed in a branch here:
|
|
|
|
|
|
[ http://darcs.haskell.org/ghc-new-build-system/](http://darcs.haskell.org/ghc-new-build-system/)
|
|
|
|
|
|
but if you want to grab it then you would probably prefer to start from a
|
... | ... | @@ -303,12 +305,17 @@ libraries/foo/dist/doc/foo.haddock: inplace/bin/haddock |
|
|
inplace/bin/ghc-cabal --in-dir libraries/foo haddock
|
|
|
```
|
|
|
|
|
|
>
|
|
|
> >
|
|
|
> >
|
|
|
> > and the rules for building tools and GHC will look similar.
|
|
|
> > There will also need to be rules for profiling libraries etc.
|
|
|
> > For the tools, there will be copies of the rules for the "in-place"
|
|
|
> > and "install" dist directories (or perhaps we have ghc-inplace.mk
|
|
|
> > and ghc-install.mk).
|
|
|
> >
|
|
|
> >
|
|
|
>
|
|
|
|
|
|
- The above makefile gets generated by something like
|
|
|
|
... | ... | @@ -319,8 +326,13 @@ libraries/%/ghc.mk: inplace/bin/ghc-cabal |
|
|
inplace/bin/ghc-cabal --in-dir $* generate $@
|
|
|
```
|
|
|
|
|
|
>
|
|
|
> >
|
|
|
> >
|
|
|
> > in the top-level Makefile.
|
|
|
> >
|
|
|
> >
|
|
|
>
|
|
|
|
|
|
- There are two ways that we could handle the generation. We could
|
|
|
generate the complete rules, as above, but that makes them harder to
|
... | ... | |