GNUmakefile 598 B

12345678910111213141516171819202122232425262728293031323334353637
  1. # DT Home
  2. #
  3. # Douglas Thrift
  4. #
  5. # GNUmakefile
  6. ifeq ($(OS),Windows_NT)
  7. ATTRIB := attrib
  8. RM_F := del /F /A
  9. TOUCH := python touch.py
  10. else
  11. ATTRIB := true
  12. RM_F := rm -f
  13. TOUCH := touch
  14. endif
  15. pyc := $(patsubst %.py,%.pyc,$(wildcard *.py */*.py))
  16. .PHONY: all requirements clean
  17. all: dthome.wsgi
  18. dthome.wsgi: .requirements $(pyc) $(wildcard views/*.tpl)
  19. $(TOUCH) $@
  20. requirements: .requirements
  21. .requirements: requirements.txt
  22. python pkg.py install -r requirements.txt
  23. $(TOUCH) $@
  24. $(ATTRIB) +H $@
  25. %.pyc: %.py
  26. python -m py_compile $<
  27. clean:
  28. -$(RM_F) .requirements $(pyc)