Concept guide

Makefile architecture concepts

Explore Make and its surrounding shell, toolchain, and repository practices by subject instead of commit order. Each section begins with a free foundation, followed by deeper explanations included with full access.

Concepts

Read a section in order, or open a concept exactly when a lesson references it.

Concept library

16 concepts

Section 01

5 concepts

Makefiles and parsing

Understand what a makefile describes and how GNU Make finds the file it reads.

  1. 1.1Concept 1.1FreeMakefilesUnderstand the file that tells `make` how to build a project and run other project tasks.
  2. 1.2Concept 1.2FreeMakefile discoverySee how `make` searches for a makefile when no arguments are provided.
  3. 1.3Concept 1.3Full accessIncluded makefiles and path anchorsResolve included makefiles from a stable anchor instead of depending on the invocation directory.
  4. 1.4Concept 1.4Full accessVariable scope and expansion timingChoose when a Make variable expands and understand why included files share one parsed namespace.
  5. 1.5Concept 1.5Full accessMAKEFILES and recursive stateUse `MAKEFILES` as a scoped bootstrap while keeping recursive Make state from leaking into a fresh invocation.

Section 02

4 concepts

Rules and targets

Understand the parts of a rule and the special targets used to name build behavior.

  1. 2.1Concept 2.1FreeRule anatomySee how a rule connects a target, its prerequisites, and the recipe that can update it.
  2. 2.2Concept 2.2Full accessPhony targetsUse phony targets for named build behavior that must never be confused with a file.
  3. 2.3Concept 2.3Full accessPattern rules and automatic variablesUse `%` to describe a family of targets and automatic variables to refer to each concrete match.
  4. 2.4Concept 2.4Full accessPrerequisites and freshnessModel what makes a target stale while separating real inputs from prerequisites needed only for ordering.

Section 03

2 concepts

Goals and execution

Follow how selected goals lead Make through the dependency graph in a particular run.

  1. 3.1Concept 3.1FreeTargets and goalsDistinguish every target Make knows about from the goal selected to start a particular run.
  2. 3.2Concept 3.2Full accessHow Make walks the graphFollow how Make starts from a goal and recursively considers the prerequisites it can reach.

Section 04

2 concepts

Recipes and shells

See where Make expansion ends and the recipe shell's variables, processes, and sourced state begin.

  1. 4.1Concept 4.1FreeThe Make-to-shell boundaryTrace dollar signs, variables, and environment values across Make's recipe expansion and the shell that executes it.
  2. 4.2Concept 4.2Full accessSourced shell stateTreat sourced POSIX shell code as shared state and use naming conventions to make collisions visible.

Section 05

2 concepts

Managed installations

Build reproducible tool installations from verified artifacts, immutable releases, and stable command paths.

  1. 5.1Concept 5.1FreeStaged tool installationDownload into a temporary area, verify the artifact, and expose it only after the complete result is ready.
  2. 5.2Concept 5.2Full accessVersioned releases and stable symlinksKeep installed releases additive and select one through stable symlink paths instead of overwriting it in place.

Section 06

1 concept

Repository practice

Keep repository instructions and review boundaries explicit as conventions grow across languages and areas.

  1. 6.1Concept 6.1FreeLayered repository conventionsCompose repository-wide, language, and area instructions without turning one entry document into a monolith.

Not sure where Concepts fit? See how the learning views work.