-
Notifications
You must be signed in to change notification settings - Fork 61
/
Makefile
58 lines (39 loc) · 1.37 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
SHELL := /bin/bash
# Override this vars on the command line:
# Example:
# $ make DB_OPTS="-h 10.96.0.167 -U dbuser" DB_NAME="dbname"
DB_NAME=qgis-django
DB_OPTS=
PRJ_DIR=./qgis
all:
@echo "See Makefile source for targets details"
run: kill_server
cd $(PRJ_DIR) && python manage.py runserver 0.0.0.0:8000
kill_server:
@if /usr/sbin/lsof -i :8000; then \
echo "WARNING: A server was already listening on port 8000, I'm trying to kill it"; \
kill -9 `/usr/sbin/lsof -i :8000 -Fp|cut -c2-`; \
fi
clean:
find $(PRJ_DIR) -type f -name "*.pyc" -exec rm -rf \{\} \;
cleardb: clean
-dropdb $(DB_NAME) $(DB_OPTS)
createdb $(DB_NAME) $(DB_OPTS) -E UTF-8 -T template_postgis
reset: cleardb
cd $(PRJ_DIR) && python manage.py syncdb --noinput
cd $(PRJ_DIR) && python manage.py loaddata fixtures/auth.json
@echo 'Login as admin/admin'
runlocal: kill_server
cd $(PRJ_DIR) && python manage.py runserver 0.0.0.0:8000
shell:
cd $(PRJ_DIR) && python manage.py shell --plain
ishell:
cd $(PRJ_DIR) && python manage.py shell
dumpauth:
cd $(PRJ_DIR) && python manage.py dumpdata --format=json --indent=4 auth.user > fixtures/auth.json
dumpplugins:
cd $(PRJ_DIR) && python manage.py dumpdata --format=json --indent=4 plugins.plugin plugins.pluginversion > fixtures/plugins.json
loadplugins:
cd $(PRJ_DIR) && python manage.py loaddata fixtures/plugins.json
check:
$(MAKE) -C qgis $@