GNUmakefile 635 B

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