Minimal Rebuilds with the Build System


It's common for a developer to change a header file deep in the code base, and do a minimal rebuild, only rebuilding objects which depend upon the change. This is supported in the build system, but there are some problems, and strange behaviors you need to be aware of.

The first time the build system checks out code, and builds a target, it runs mkdepend for each Makefile. This uses the extracts a list of header files included in each source file, and writes a dependency for it in the Makefile. When the build is finished, all the Makefiles have the dependency information in them.

The developer then makes some code changes, and wants to re-run the build. By default, the build system will re-generate the Makefiles from Umakefil/*.pcf files, then run mkdepend to re-generate the dependency information. This may not be necessary if the changes do not effect pre-processor macros, include paths, or header file includes. The build system options -n and -e can be used to disable re-generation of Makefiles, and skip running make depend.