Better Makefile.
authorRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 6 Feb 2013 22:08:33 +0000 (23:08 +0100)
committerRaphaël Barrois <raphael.barrois@polytechnique.org>
Wed, 6 Feb 2013 22:08:33 +0000 (23:08 +0100)
Signed-off-by: Raphaël Barrois <raphael.barrois@polytechnique.org>
Makefile

index 86cc29e..852b339 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,6 @@
 MANAGE_PY = python manage.py
+ROOT_DIR = xnet
+APPS = $(shell find $(ROOT_DIR) -name 'models.py' | sed 's,/models.py$$,,; s:.*/::')
 
 
 default: all
@@ -14,7 +16,7 @@ shell:
        $(MANAGE_PY) shell
 
 test:
-       $(MANAGE_PY) test example accounts site news
+       $(MANAGE_PY) test $(APPS)
 
 resetdb:
        rm -f xnet/db.sqlite