Skip to content
Latchkey

What Is Make? The Classic Build Automation Tool Explained

Make is a classic build automation tool that runs commands based on rules in a Makefile, rebuilding only the targets whose dependencies have changed.

Make has automated builds since the 1970s and is still everywhere. You write rules describing how to produce files (or run tasks) and their dependencies, and Make figures out what needs to run. Many projects use it simply as a convenient, language-agnostic task runner.

What Make is

Make is a build automation tool driven by a Makefile. Each rule has a target, prerequisites, and a recipe of shell commands. Make compares timestamps of targets and prerequisites to decide what is out of date and runs only the necessary recipes, in dependency order.

Targets and dependencies

A target depends on prerequisites; if any prerequisite is newer than the target, Make runs the recipe to rebuild it. This dependency tracking avoids redundant work. "Phony" targets (like "test" or "build") are tasks that do not produce a file, used to give projects simple named commands.

A Makefile example

Phony targets give a project handy commands.

A minimal Makefile
.PHONY: build test

build:
	npm run build

test:
	npm test

Role in CI/CD

In CI, Make is often used as a thin, language-agnostic task layer: the pipeline just runs "make build" and "make test", and the Makefile holds the real commands. This keeps CI config simple and lets developers run the exact same commands locally. Make's timestamp-based rebuild logic can also skip unchanged work in file-producing builds.

Alternatives

Just is a modern command runner with cleaner syntax and no build-graph baggage. Task (Taskfile) is a YAML-based alternative. For large builds, Bazel and CMake offer far more powerful dependency handling. Make persists for its ubiquity and simplicity as a task runner.

Key takeaways

  • Make runs recipes based on targets and their dependencies.
  • It rebuilds only what is out of date, using file timestamps.
  • In CI it often serves as a simple, shared task runner for build and test.

Related guides

Tired of flaky CI? Latchkey auto-heals failed jobs and retries them for you. Start free →