|
|
|
|
@ -1,4 +1,4 @@ |
|
|
|
|
.PHONY: requirements requirements-upgrade freeze syncdb run run-public makemessages compilemessages collectstatic cloc clean user |
|
|
|
|
.PHONY: requirements requirements-upgrade freeze syncdb run run-public makemessages compilemessages collectstatic cloc clean user south |
|
|
|
|
|
|
|
|
|
project_name=proj
|
|
|
|
|
|
|
|
|
|
@ -37,6 +37,17 @@ collectstatic: |
|
|
|
|
user: |
|
|
|
|
-@ipython manage.py createsuperuser
|
|
|
|
|
|
|
|
|
|
# If the first argument is "south"...
|
|
|
|
|
ifeq (south,$(firstword $(MAKECMDGOALS))) |
|
|
|
|
# use the rest as arguments for "south"
|
|
|
|
|
RUN_ARGS := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
|
|
|
|
# ...and turn them into do-nothing targets
|
|
|
|
|
$(eval $(RUN_ARGS):;@:)
|
|
|
|
|
endif |
|
|
|
|
south: |
|
|
|
|
-@python manage.py schemamigration $(RUN_ARGS) --auto
|
|
|
|
|
-@python manage.py migrate $(RUN_ARGS)
|
|
|
|
|
|
|
|
|
|
cloc: |
|
|
|
|
-@echo "### Counting lines of code within the project"
|
|
|
|
|
-@echo "# Total:" ; find . -iregex '.*\.py\|.*\.js\|.*\.html\|.*\.css' -type f -exec cat {} + | wc -l
|
|
|
|
|
|