PromptProduct and engineeringOpen
Makefile taste
Makefile taste of a developer who uses make as the project's front door - Treat the Makefile as a thin task runner that calls real scripts and tools, not as a place to hide hundreds of lines of shell logic. Confidence: 0.90 - Put a help target first and make it the default goal, generated from
Front matter
name: Makefile taste
description: # Makefile taste of a developer who uses make as the project's front door - Treat the Makefile as a thin task runner that calls real scripts and tools, not as a place to hide hundreds of lines of shell logic. Confidence: 0.90 - Put a `help` target first and make it the default goal, generated from `
kind: Prompt
audience: DevelopersMakefile taste
Makefile taste of a developer who uses make as the project's front door
- Treat the Makefile as a thin task runner that calls real scripts and tools, not as a place to hide hundreds of lines of shell logic. Confidence: 0.90
- Put a
helptarget first and make it the default goal, generated from## descriptioncomments next to each target. Confidence: 0.85 - Declare every non-file target in
.PHONYso a stray file namedtestorbuildnever silently skips a task. Confidence: 0.95 - Set
SHELL := bashand.SHELLFLAGS := -eu -o pipefail -cso recipes fail on errors, unset variables and broken pipes. Confidence: 0.85 - Add
.DELETE_ON_ERROR:so a failed recipe never leaves a half-written target that looks up to date. Confidence: 0.80 - Use
MAKEFLAGS += --warn-undefined-variables --no-builtin-rulesto catch typos and drop surprising implicit rules. Confidence: 0.75 - Keep target names short, lowercase and verb-like:
setup,build,test,lint,fmt,run,clean. Confidence: 0.85 - Make
make setupthe single command a new contributor needs to go from fresh clone to working environment. Confidence: 0.90 - Use
?=for user-overridable variables likePORT,ENVorIMAGE_TAG, somake run PORT=4000just works. Confidence: 0.85 - Prefer
:=over=for internal variables to avoid repeated, surprising lazy evaluation of shell commands. Confidence: 0.80 - Use real file targets and prerequisites for generated artifacts so make only rebuilds what actually changed. Confidence: 0.85
- Use order-only prerequisites (
| build/) for output directories so touching a directory does not trigger rebuilds. Confidence: 0.70 - Prefix only genuinely noisy commands with
@; keep the important commands visible so CI logs show what ran. Confidence: 0.75 - Never use
-to ignore errors unless the reason is documented in a comment on the same line. Confidence: 0.85 - Run the same
make lint testtargets in CI that developers run locally, instead of duplicating steps in workflow YAML. Confidence: 0.90 - Split very large Makefiles into
included files undermk/grouped by concern, such as docker, db and release. Confidence: 0.65 - Use tabs for recipe lines and set
.editorconfigaccordingly so editors never turn them into spaces. Confidence: 0.90 - Keep recipes portable across GNU make versions found on macOS and Linux, or document that GNU make 4+ is required. Confidence: 0.70
- Make
cleanremove only generated files and keep a separatedistcleanfor caches, dependencies and local databases. Confidence: 0.75 - Check required tools at the top with a small
requiremacro that prints a clear install hint when something is missing. Confidence: 0.70 - Avoid recursive
$(MAKE) -Cacross many subdirectories when one non-recursive Makefile can express the whole graph. Confidence: 0.65 - Keep
makewith no arguments safe: it should print help, never deploy, migrate or delete anything. Confidence: 0.95
Contributor: f
Source: https://github.com/f/prompts.chat/blob/main/prompts/03005.md
Author: f, prompts.chat prompt library. License: CC0-1.0.
Shown here with formatting for the web. Keep the author and license notice when you reuse it.
Related entries
There are more like this in the members library
The Business prompt library holds 3,008 entries. Members can search all of them by meaning and read every one in full.