Adding support for DB access from unit tests
[ipypbx] / Makefile
index 746eb7e..4abc8ad 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,11 +2,12 @@ BASENAME=ipypbx
 TRANSLATION_LANGUAGES=ru fi
 TRANSLATIONS_PATH=src/ipypbx/locale
 PROJECT=$(BASENAME).pro
+UI=ui/layout.ui
 
-all: ui translation
+all: generate_sql generate_ui translation
 
-ui:
-       pyuic4 $(PROJECT)
+generate_ui:
+       pyuic4 $(UI) -o src/$(BASENAME)/ui.py
 
 translation: po2ts transupdate ts2po transrelease
 
@@ -30,3 +31,6 @@ ts2po:
 
 transrelease:
        lrelease $(PROJECT)
+
+generate_sql:
+       PYTHONPATH=projects/sample/:src DJANGO_SETTINGS_MODULE=settings django-admin dumpsql