From 4d701f4f2ea99ac95bd4235adef1998f3abdc9f9 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 6 May 2020 18:26:53 -0700 Subject: start a Makefile Move all "index" functions into classes, each in a separate file. Add lots of type annotations. Use dataclass objects to hold database rows. This aspect will need further refactoring to remove "extra" usage, probably by adding database rows to align with DatabaseInfo more closely. --- Makefile | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 Makefile (limited to 'Makefile') diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..7d5ec24 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ + +.PHONY: help +help: + @grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}' + +.PHONY: test +test: ## Run all tests and lints + pipenv run pytest + pipenv run mypy *.py chocula/*.py --ignore-missing-imports + +.PHONY: build +build: src/*.rs src/bin/*.rs + cargo build --release + +.PHONY: install +install: + $(INSTALL) -t $(PREFIX)/bin target/release/einhyrningsins + $(INSTALL) -t $(PREFIX)/bin target/release/einhyrningsinsctl + # Trying to install manpages; ok if this fails + $(INSTALL) -m 644 -t $(PREFIX)/share/man/man1 doc/einhyrningsins.1 + $(INSTALL) -m 644 -t $(PREFIX)/share/man/man1 doc/einhyrningsinsctl.1 + -- cgit v1.2.3