The GHC build system
johan.tibell at gmail.com
Thu Jul 21 15:19:35 CEST 2011
On Thu, Jul 21, 2011 at 11:20 AM, Johan Tibell <johan.tibell at gmail.com> wrote:
> After having spent about 8 hours trying to add a new static library as
> a dependency of ghc-prim I feel with you. I've read all the wiki
> pages, make -p:ed myself to death, tried to imitate other files, read
> through examples, read through the make docs, but to no avail. I
> cannot make it work.
I've been mulling this over and here's some constructive criticism:
* The wiki does an OK job of explaining the mechanisms we use, but
doesn't actually talk about how we use them (e.g. that all libraries
define variables on the form
* The code suffers from low greppability, as almost everything is
generated by something else. Even the output of make -p contains lots
of yet unresolved variables.
* There are lots of implicit things going on. We're (as far as I
understand) globbing up lots of files and making them deps of in
rules. At work (we're we have a few orders of magnitude larger code
base) we found that this doesn't work well. It's worth the extra
typing to be explicit in what depends on what. This might be difficult
to change anytime soon.
More information about the Cvs-ghc