Makefile 1.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. # ---------- ---------- ---------- ---------- ---------- ----------
  2. # drek Makefile
  3. # ---------- ---------- ---------- ---------- ---------- ----------
  4. target: help
  5. .PHONY: help
  6. help:
  7. @echo "Usage: make [PHONY]"
  8. @sed -n -e '/sed/! s/\.PHONY: //p' Makefile
  9. .PHONY: clean
  10. clean:
  11. @py3clean .
  12. @rm -rf var/
  13. @echo ""
  14. .PHONY: dev
  15. dev: fixed test safer todo
  16. tree ~/.drek/ -a -L 2
  17. .PHONY: fixed
  18. fixed:
  19. @black .
  20. @echo ""
  21. .PHONY: safer
  22. safer:
  23. @mypy \
  24. src/drek/__inti__.py \
  25. src/drek/business/__init__.py \
  26. src/drek/business/archive.py \
  27. src/drek/business/stats.py \
  28. src/drek/client.py \
  29. src/drek/config.py \
  30. src/drek/utils/__init__.py \
  31. src/drek/utils/environ.py \
  32. --disallow-untyped-defs \
  33. --ignore-missing-imports \
  34. || echo ""
  35. @echo ""
  36. .PHONY: test
  37. test:
  38. @python3 -m unittest discover
  39. @echo ""
  40. .PHONY: todo
  41. todo:
  42. @echo "TODO:"
  43. @grep -Iirl 'todo' -A 1 ./ --color=always \
  44. --exclude=Makefile \
  45. --exclude-dir=.git \
  46. --exclude-dir=var \
  47. || echo "none"