Learning path

Full curriculum

Full curriculum

Unit content

Build systems and build dependencies

A build transforms source inputs into outputs such as generated code, libraries, executables or packages.

A build system records which outputs depend on which inputs. If executable app depends on object files produced from a.c and b.c, changing only a.c should require rebuilding the affected path rather than unrelated outputs.

Build steps should declare their real inputs and outputs. Hidden dependencies on a developer's shell state, working directory, previously generated files or manually installed tools make builds difficult to reproduce and cache correctly.

The dependency structure also determines ordering: a generated header must exist before compiling source that consumes it, while independent steps can run in parallel.

A useful build is therefore more than a script that happens to work in one directory. It is an explicit description of transformations and their dependencies, allowing the system to rebuild exactly the artifacts invalidated by a change.