Makefile 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. @echo ""
  13. .PHONY: dev
  14. dev: fixed test safer todo
  15. tree ~/.drek/ -a -L 2
  16. .PHONY: fixed
  17. fixed:
  18. @black .
  19. @echo ""
  20. .PHONY: safer
  21. safer:
  22. @mypy \
  23. src/drek/__inti__.py \
  24. src/drek/business/__init__.py \
  25. src/drek/business/archive.py \
  26. src/drek/business/stats.py \
  27. src/drek/client.py \
  28. src/drek/config.py \
  29. src/drek/utils/__init__.py \
  30. src/drek/utils/environ.py \
  31. --disallow-untyped-defs \
  32. || echo ""
  33. @echo ""
  34. .PHONY: test
  35. test:
  36. @python3 -m unittest discover
  37. @echo ""
  38. .PHONY: todo
  39. todo:
  40. @echo "TODO:"
  41. @grep -Iirl 'todo' -A 1 ./ --color=always \
  42. --exclude=Makefile \
  43. --exclude-dir=.git \
  44. --exclude-dir=var \
  45. || echo "none"