| 1 | MANAGE_PY = python manage.py |
| 2 | ROOT_DIR = xnet |
| 3 | APPS = $(shell find $(ROOT_DIR) -name 'models.py' | sed 's,/models.py$$,,; s:.*/::') |
| 4 | |
| 5 | |
| 6 | default: all |
| 7 | |
| 8 | |
| 9 | all: |
| 10 | |
| 11 | |
| 12 | run: |
| 13 | $(MANAGE_PY) runserver |
| 14 | |
| 15 | shell: |
| 16 | $(MANAGE_PY) shell |
| 17 | |
| 18 | test: |
| 19 | $(MANAGE_PY) test $(APPS) |
| 20 | |
| 21 | resetdb: |
| 22 | rm -f xnet/db.sqlite |
| 23 | $(MANAGE_PY) syncdb --noinput |
| 24 | |
| 25 | clean: |
| 26 | find . "(" -name "*.pyc" -or -name "*.pyo" -or -name "*.mo" ")" -delete |
| 27 | find . -type d -empty -delete |
| 28 | |
| 29 | doc: |
| 30 | $(MAKE) -C doc html |
| 31 | |
| 32 | |
| 33 | .PHONY: default all run shell test resetdb doc |