From c56e2da26033ef0a6bdac94c0c32060bc7a57b52 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Mon, 6 Feb 2023 11:42:12 -0600 Subject: [PATCH] chore: initialize .task.mk --- .gitignore | 1 + .task.cfg.mk | 3 +++ Makefile | 24 ++++++------------------ 3 files changed, 10 insertions(+), 18 deletions(-) create mode 100644 .task.cfg.mk diff --git a/.gitignore b/.gitignore index e626d4f..89cc51b 100644 --- a/.gitignore +++ b/.gitignore @@ -170,3 +170,4 @@ cython_debug/ docs/* !docs/index.html +.task.mk diff --git a/.task.cfg.mk b/.task.cfg.mk new file mode 100644 index 0000000..6223373 --- /dev/null +++ b/.task.cfg.mk @@ -0,0 +1,3 @@ +USAGE={a.b_magenta}daylin's logo{a.end}\n +-include .task.mk +$(if $(filter help,$(MAKECMDGOALS)),$(if $(wildcard .task.mk),,.task.mk: ; curl -fsSL https://raw.githubusercontent.com/daylinmorgan/task.mk/v23.1.2/task.mk -o .task.mk)) diff --git a/Makefile b/Makefile index 8162c7a..73bf8ac 100644 --- a/Makefile +++ b/Makefile @@ -16,8 +16,7 @@ all: @$(MAKE) pngs .PHONY: pngs -## generate all of the logo pngs -pngs: $(PNGS) +pngs: $(PNGS) ## generate all of the logo pngs docs/png/index.html: docs/index.html @cat docs/index.html |\ @@ -30,20 +29,17 @@ docs/png/%.png: docs/svg/%.svg @inkscape --export-filename=$@ $< .PHONY: logos -## generate all of the logo svgs -svgs: $(SRC) +svgs: $(SRC) ## generate all of the logo svgs ./generate-all.py $(REV) .PHONY: lint -## apply isort/black/flake8 -lint: +lint: ## apply isort/black/flake8 @isort logo @black logo @flake8 logo .PHONY: bootstrap pdm-env conda-env -## bootstrap the conda environment -bootstrap: pdm-env +bootstrap: pdm-env ## bootstrap the conda environment conda-env: $(CONDA) CONDA_ALWAYS_YES="true" mamba create -p ./env python --force @@ -54,18 +50,10 @@ pdm-env: conda-env pdm install .PHONY: clean -## remove old files -clean: +clean: ## remove old files rm -f *.svg *.png rm -f docs/*.svg rm -f docs/svg/* rm -f docs/png/* - -.PHONY: help -help: ## try `make help` - @awk '/^[a-z.A-Z_-]+:/ { helpMessage = match(lastLine, /^##(.*)/); \ - if (helpMessage) { helpCommand = substr($$1, 0, index($$1, ":")-1); \ - helpMessage = substr(lastLine, RSTART + 3, RLENGTH); \ - printf "\033[36m%-9s\033[0m - %s\n", \ - helpCommand, helpMessage;}} { lastLine = $$0 }' $(MAKEFILE_LIST) +-include .task.cfg.mk