From b2f37c2223b4be14d0d9d753198763fde93eb4d5 Mon Sep 17 00:00:00 2001 From: George Rawlinson Date: Thu, 1 Apr 2021 15:24:14 +1300 Subject: [PATCH] chore: simplify Makefile --- Makefile | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/Makefile b/Makefile index c50bdab..23dab8a 100644 --- a/Makefile +++ b/Makefile @@ -1,22 +1,19 @@ .DEFAULT: help .PHONY: help clean clean-pyc clean-build dist -help: - @echo "clean : delete all artifacts" - @echo "clean-pyc : delete python cache artifacts" - @echo "clean-build : delete distribution artifacts" - @echo "dist : generate distribution artifacts" +help: ## Display this help section + @awk 'BEGIN {FS = ":.*?## "} /^[a-zA-Z0-9_-]+:.*?## / {printf "\033[36m%-38s\033[0m %s\n", $$1, $$2}' $(MAKEFILE_LIST) -clean: clean-pyc clean-build +clean: clean-pyc clean-build ## Delete all artifacts -clean-pyc: +clean-pyc: ## Delete Python cache artifacts @find . -name '*.pyc' -delete @find . -name '*.pyo' -delete @find . -name __pycache__ -delete -clean-build: +clean-build: ## Delete distribution artifacts @rm --force --recursive build dist src/*.egg-info docs/_build -dist: clean +dist: clean ## Generate distribution artifacts poetry build