Requirements for a better buildsystem
- be usable without autoconf
- be usable on any platform that has gmake (thinking of native mingw here)
- automatic dependency generation
- no ANSI colours to display stuff
- hide compiler and link stages with CC & LINK (like current)
- query git for branch name and commit id and include this when building
- use fewer makefiles
- allows multiple dist targets: osx, src, windows
Makefile.nds Makefile.osx Makefile.std Makefile.win | | | | | | | | | | Makefile <------' '-------. | .------------' | | | | | | .---------------------' | | v v v v | | Makefile.inc Makefile.nmake | | | | | '------------------. | | | | | | | | | | | | | | v v v | mk/buildsys.mk Makefile.src <------------------------'
Build system design
The existing configure/make/package system relies on autoconf and atheme's buildsys. Unfortunately, documentation for the latter is scant. See an oook thread discussing it, or atheme's github repository for buildsys. Note that Angband forked from atheme, which in turn forked from Midar (Jonathan Schleifer). Aerdan brought in buildsys in June 2009, and merged from atheme in August 2011. While the original import was compatible with BSD make, it was slow. The current version is definitely reliant on GNU make extensions, and most likely cannot be made portable to other makes without extreme effort, if at all.
Some documents of note:
- A tutorial on FreeBSD's pmake, as reasonable a representative of the BSD make family as any. See also bmake, theoretically a portable version of NetBSD's make.
- Recursive Make Considered Harmful and a sample implementation of a non-recursive Makefile scheme. We definitely have problems with slow dependency detection at present. CMCrossroads has a couple more articles on non-recursive make and dependency generation, too.
- document how buildbot works, including slave dependencies (rst, sqlite, doxygen, ncursesw, SDL)
- extract the doxygen build step from the Linux builder and create a utility builder that runs doxygen, builds and runs stats, etc.