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.
makeused by · Make is a build automation tool that executes dependency-driven rules and commands defined in a makefile to create or update targets.
Dockerfileused by · A Dockerfile is a text file containing declarative instructions for building a container image and specifying its contents and runtime metadata.
package manageruses · A package manager is software that retrieves, installs, updates, removes, and manages software packages and their dependencies.
deployment pipelineimplements · A sequence of automated or manual stages that builds, tests or validates, packages, and delivers software or models toward deployment.
make targethas part · A Make target is a named build-automation goal associated with prerequisites and commands, often represented by a file or directory.
standardused by · A standard is an established rule, specification, or convention that defines a consistent reference for practice, representation, behavior, or evaluation.
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.