2010-07-28 19:49:06 +02:00
|
|
|
PYTHON ?= python
|
2007-07-23 09:02:25 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: all
|
2016-11-07 13:15:18 +09:00
|
|
|
all: clean-pyc clean-backupfiles style-check type-check test
|
2007-07-23 09:02:25 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: style-check
|
2015-09-19 07:24:13 +02:00
|
|
|
style-check:
|
2017-10-01 16:26:40 +01:00
|
|
|
@flake8
|
2007-07-23 09:02:25 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: type-check
|
2016-11-07 13:15:18 +09:00
|
|
|
type-check:
|
|
|
|
|
mypy sphinx/
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean
|
2016-12-13 23:59:01 +09:00
|
|
|
clean: clean-pyc clean-pycache clean-patchfiles clean-backupfiles clean-generated clean-testfiles clean-buildfiles clean-mypyfiles
|
2007-07-23 09:02:25 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-pyc
|
2007-07-23 09:02:25 +00:00
|
|
|
clean-pyc:
|
|
|
|
|
find . -name '*.pyc' -exec rm -f {} +
|
|
|
|
|
find . -name '*.pyo' -exec rm -f {} +
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-pycache
|
2016-05-30 23:44:45 +09:00
|
|
|
clean-pycache:
|
|
|
|
|
find . -name __pycache__ -exec rm -rf {} +
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-patchfiles
|
2007-08-15 09:00:54 +00:00
|
|
|
clean-patchfiles:
|
|
|
|
|
find . -name '*.orig' -exec rm -f {} +
|
|
|
|
|
find . -name '*.rej' -exec rm -f {} +
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-backupfiles
|
2010-05-16 14:00:50 +02:00
|
|
|
clean-backupfiles:
|
|
|
|
|
find . -name '*~' -exec rm -f {} +
|
|
|
|
|
find . -name '*.bak' -exec rm -f {} +
|
2016-12-19 11:50:35 +09:00
|
|
|
find . -name '*.swp' -exec rm -f {} +
|
|
|
|
|
find . -name '*.swo' -exec rm -f {} +
|
2010-05-16 14:00:50 +02:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-generated
|
2010-05-16 22:19:38 +02:00
|
|
|
clean-generated:
|
2016-12-19 11:50:35 +09:00
|
|
|
find . -name '.DS_Store' -exec rm -f {} +
|
2017-04-06 09:41:49 +09:00
|
|
|
rm -rf Sphinx.egg-info/
|
2017-02-25 14:45:49 +09:00
|
|
|
rm -rf doc/_build/
|
2016-12-19 11:50:35 +09:00
|
|
|
rm -f sphinx/pycode/*.pickle
|
2010-05-17 01:28:50 +02:00
|
|
|
rm -f utils/*3.py*
|
2016-12-19 11:50:35 +09:00
|
|
|
rm -f utils/regression_test.js
|
2010-05-16 22:19:38 +02:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-testfiles
|
2016-05-30 23:44:45 +09:00
|
|
|
clean-testfiles:
|
2016-12-19 11:50:35 +09:00
|
|
|
rm -rf tests/.coverage
|
2016-05-30 23:44:45 +09:00
|
|
|
rm -rf tests/build
|
|
|
|
|
rm -rf .tox/
|
2017-01-07 20:37:01 +09:00
|
|
|
rm -rf .cache/
|
2016-05-30 23:44:45 +09:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-buildfiles
|
2016-10-02 00:25:58 +09:00
|
|
|
clean-buildfiles:
|
|
|
|
|
rm -rf build
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: clean-mypyfiles
|
2016-12-13 23:59:01 +09:00
|
|
|
clean-mypyfiles:
|
|
|
|
|
rm -rf .mypy_cache/
|
|
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: pylint
|
2007-07-23 09:02:25 +00:00
|
|
|
pylint:
|
2008-03-16 13:12:48 +00:00
|
|
|
@pylint --rcfile utils/pylintrc sphinx
|
2007-07-23 09:02:25 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: reindent
|
2010-05-23 01:34:52 +02:00
|
|
|
reindent:
|
2017-10-01 16:31:32 +01:00
|
|
|
@echo "This target no longer does anything and will be removed imminently"
|
2008-06-05 08:58:43 +00:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: test
|
2014-09-21 17:17:02 +02:00
|
|
|
test:
|
2017-12-22 18:50:51 +00:00
|
|
|
@$(PYTHON) -m pytest -v $(TEST)
|
2015-11-10 04:09:05 +01:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: test-async
|
2015-11-10 04:09:05 +01:00
|
|
|
test-async:
|
2017-10-26 16:49:44 +01:00
|
|
|
@echo "This target no longer does anything and will be removed imminently"
|
2009-02-22 19:00:36 +01:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: covertest
|
2014-09-21 17:17:02 +02:00
|
|
|
covertest:
|
2017-12-22 18:50:51 +00:00
|
|
|
@$(PYTHON) -m pytest -v --cov=sphinx --junitxml=.junit.xml $(TEST)
|
2010-05-16 16:54:15 +02:00
|
|
|
|
2017-10-04 20:22:34 +02:00
|
|
|
.PHONY: build
|
2010-05-16 16:54:15 +02:00
|
|
|
build:
|
|
|
|
|
@$(PYTHON) setup.py build
|
2017-10-04 20:31:50 +02:00
|
|
|
|
|
|
|
|
.PHONY: docs
|
|
|
|
|
docs:
|
|
|
|
|
ifndef target
|
|
|
|
|
$(info You need to give a provide a target variable, e.g. `make docs target=html`.)
|
|
|
|
|
endif
|
|
|
|
|
$(MAKE) -C doc $(target)
|