liveBook · Manning

Makefile

As explained in Shipping Go: Develop, deliver, discuss, design, and go again

A Makefile is a configuration file that defines inputs, targets, and command recipes for the Make build automation tool.

A Makefile turns recurring development commands into named, repeatable tasks. Instead of asking each developer to remember installation or build details, a team can document commands once and run them consistently on local machines and in automation. section 2.2

A small Makefile can provide:

  • A standard build target that developers and continuous integration can invoke with the same command. section 2.3

One command for local setup and CI

A developer can run `sudo make setup`, while a pipeline can run `make build`. The same named targets connect documented local work with the automated build process, so a process change can be reflected in both environments. section 2.3

How Shipping Go: Develop, deliver, discuss, design, and go again covers it

How deep it goes
Demonstrates small setup and build targets, while deferring more complex build configurations and broader platform support.
Examples
Uses Go setup targets, `sudo make setup`, `sudo make install-go`, and `make build` as concrete workflows.
What it assumes
Assumes a Unix-like environment and Bash-compatible setup, while supplying Go installation steps from the project workflow.
What you can do after
Operate/configure repeatable setup and build workflows locally and from a continuous integration pipeline.
How it connects
Connects configuration with README documentation, Go installation, continuous integration, GitHub Actions, and repository hygiene.

Also explained in

Compare how 2 books explain Makefile →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Shipping Go: Develop, deliver, discuss, design, and go again. The section links point to the parts of the book it draws on.