groups/home: add a link to subscribe to a group
[xnet] / Makefile
index e69de29..df7847b 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -0,0 +1,84 @@
+MANAGE_PY = python manage.py
+ROOT_DIR = xnet
+APPS = $(shell find $(ROOT_DIR) -name 'models.py' | sed 's,/models.py$$,,; s:.*/::')
+
+
+# In order to help newcomers, this variable holds a full doc of the current Makefile.
+# Please keep it up to date with regard to new commands.
+#
+# Structure:
+# - Group commands in sections
+# - Align command descriptions
+
+define help
+Makefile command help
+
+Available targets are:
+
+Running:
+  run:       Start a development server on http://127.0.0.1:8000/
+  shell:      Open a development Python shell using the current database
+
+Database:
+  resetdb:    Reinitialize the database schema
+
+Testing:
+  test:              Run the test suite
+
+Misc:
+  clean:      Cleanup all temporary files (*.pyc, ...)
+  doc:        Generate the documentation
+  help:       Display this help message
+endef
+
+default: all
+
+
+all:
+
+
+help:
+       @echo -n ""  # Don't display extra lines.
+       $(info $(help))
+
+
+.PHONY: all default help
+
+
+# Running
+# =======
+
+run:
+       $(MANAGE_PY) runserver
+
+shell:
+       $(MANAGE_PY) shell
+
+
+.PHONY: run shell
+
+# Development
+# ===========
+
+
+test:
+       $(MANAGE_PY) test $(APPS)
+
+resetdb:
+       rm -f xnet/db.sqlite
+       $(MANAGE_PY) syncdb --noinput
+
+.PHONY: resetdb test
+
+# Misc
+# ====
+
+clean:
+       find . "(" -name "*.pyc" -or -name "*.pyo" -or -name "*.mo" ")" -delete
+       find . -type d -empty -delete
+
+doc:
+       $(MAKE) -C doc html
+
+
+.PHONY: clean doc