Makefile Style Guide

Use the shared registry for reusable targets and retain specialized recipes that cannot yet be expressed there.

  • Use descriptive target names and declare non-file targets in .PHONY. Express build order through prerequisites and avoid duplicate recursion.
  • Indent recipes with literal tabs. Quote paths and preserve overridable settings.
  • Use existing tool variables and environment activation rather than hard-coded global executables.
  • Separate check and fix targets. Ensure lint and security aggregates cover all selected checks and preserve compatibility aliases.
  • Keep publication, cleanup and deployment explicit; never hide destructive actions in lint or test targets.
.PHONY: check test

check: test
test:
	$(PYTHON) -m pytest

Inspect make -n for dependency order and shell arguments, then execute nondestructive targets in an isolated directory.