I have often vented about how most modern build systems are either too complicated or not expressive enough, which in both cases lead to poorly-written build scripts that require a lot of maintenance and distract the developers from maintaining and extending the project itself. I discovered through trial and error that the venerable Make build system is still one of the best build-system solutions 30 years after it was first developed owing to its simplicity, but that the lack of a general scripting system made Make difficult to adapt to modern projects.
In an attempt to design a better build architecture that builds upon the expressiveness and ease of use of Make, I will now examine the theory behind how Make works and attempt to construct an abstract, executable model of Make written in Haskell. This model will both help illuminate how Make works at a high level of abstraction and serve as a foundation upon which a new, better build architecture can be designed.