Use lockfile-based install inside a phony or stamp target.
Section: Parallel builds and CI patterns
Reproducible dependency install target
makefile
makefile
.PHONY: deps
deps:
npm ciExplanation
Replace with the appropriate package manager for your stack.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Parallel builds and CI patterns
Synchronized parallel output
Keep log lines grouped by target when running with jobs.
CI aggregate target
Create a single target for consistent pipeline execution.
Local override include for CI-safe defaults
Load machine-specific settings without hardcoding them in shared files.
Respect jobserver in recursive make
Propagate parallelism automatically using `$(MAKE)`.