From 9d8fadad60b02dc8cba79f85022f7e2dab0fcc2a Mon Sep 17 00:00:00 2001 From: Malin Freeborn Date: Fri, 13 Nov 2026 00:12:32 +0100 Subject: [PATCH] Add bespoke help descriptions --- Makefile | 32 +++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/Makefile b/Makefile index 83e59ad..c83293c 100644 --- a/Makefile +++ b/Makefile @@ -1,36 +1,42 @@ .PHONY: build events dev stop help prep lint format -help: - @echo "Available commands:" - @echo " make prep - Create venv and install requirements" - @echo " make events - Update site from CSV (build pages + images)" - @echo " make dev - Start development server" - @echo " make stop - Stop development server" - @echo " make build - Full website build sequence" - @echo " make help - Show this help message" +requirements += python3 +requirements += nginx -prep: +help: + @awk 'BEGIN {FS = ":.*?## "} /^[0-9a-zA-Z._-]+:.*?## / {printf "\033[36m%s\033[0m : %s\n", $$1, $$2}' $(MAKEFILE_LIST) | sort | column -s ':' -t + +.PHONY: check +check: ## Check you have the required dependencies + @$(foreach dep, $(requirements), type $(dep) >/dev/null || echo "Install $(dep)." ; ) + +prep: ## Create venv and install requirements python3 -m venv .venv ./.venv/bin/pip install --upgrade pip ./.venv/bin/pip install -r requirements.txt -build: +build: ## Full website build sequence ./.venv/bin/python atom_gen.py ./.venv/bin/python prep.py ./.venv/bin/python build_pages.py -events: +events: ## Update site from CSV (build pages + images) ./.venv/bin/python build_pages.py ./.venv/bin/python image_poster.py -dev: +dev: ## Start development server nginx -p . -c nginx.dev.conf stop: nginx -p . -c nginx.dev.conf -s stop -lint: +lint: ## Check syntax ./.venv/bin/flake8 . --config .flake8 --exclude .venv format: ./.venv/bin/black . + +.PHONY: clean +clean: ## Remove generated files. + $(RM) $(defaults) +