1- .PHONY : example test coverage translatable_strings update_translations
1+ .PHONY : example test coverage translatable_strings update_translations help
2+ .DEFAULT_GOAL := help
23
3- example :
4+ example : # # Run the example application
45 python example/manage.py migrate --noinput
56 -DJANGO_SUPERUSER_PASSWORD=p python example/manage.py createsuperuser \
67 --noinput --username=" $( USER) " --email=" $( USER) @mailinator.com"
@@ -12,34 +13,38 @@ example_async:
1213 --noinput --username=" $( USER) " --email=" $( USER) @mailinator.com"
1314 daphne example.asgi:application
1415
15- example_test :
16+ example_test : # # Run the test suite for the example application
1617 python example/manage.py test example
1718
18- test :
19+ test : # # Run the test suite
1920 DJANGO_SETTINGS_MODULE=tests.settings \
2021 python -m django test $$ {TEST_ARGS:-tests}
2122
22- test_selenium :
23+ test_selenium : # # Run frontend tests written with Selenium
2324 DJANGO_SELENIUM_TESTS=true DJANGO_SETTINGS_MODULE=tests.settings \
2425 python -m django test $$ {TEST_ARGS:-tests}
2526
26- coverage :
27+ coverage : # # Run the test suite with coverage enabled
2728 python --version
2829 DJANGO_SETTINGS_MODULE=tests.settings \
2930 python -b -W always -m coverage run -m django test -v2 $$ {TEST_ARGS:-tests}
3031 coverage report
3132 coverage html
3233 coverage xml
3334
34- translatable_strings :
35+ translatable_strings : # # Update the English '.po' file
3536 cd debug_toolbar && python -m django makemessages -l en --no-obsolete
3637 @echo " Please commit changes and run 'tx push -s' (or wait for Transifex to pick them)"
3738
38- update_translations :
39+ update_translations : # # Download updated '.po' files from Transifex
3940 tx pull -a --minimum-perc=10
4041 cd debug_toolbar && python -m django compilemessages
4142
4243.PHONY : example/django-debug-toolbar.png
43- example/django-debug-toolbar.png : example/screenshot.py
44+ example/django-debug-toolbar.png : example/screenshot.py # # Update the screenshot in 'README.rst'
4445 python $< --browser firefox --headless -o $@
4546 optipng $@
47+
48+ help : # # Help message for targets
49+ @grep -E ' ^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST ) \
50+ | awk ' BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
0 commit comments