sphinx/Makefile

117 lines
2.9 KiB
Makefile
Raw Normal View History

PYTHON ?= python
2007-07-23 04:02:25 -05:00
2017-02-12 11:08:42 -06:00
DONT_CHECK = -i .ropeproject \
-i .tox \
-i build \
-i dist \
-i doc/_build \
-i sphinx/pycode/pgen2 \
2014-10-09 09:53:33 -05:00
-i sphinx/search/da.py \
-i sphinx/search/de.py \
-i sphinx/search/en.py \
-i sphinx/search/es.py \
-i sphinx/search/fi.py \
-i sphinx/search/fr.py \
-i sphinx/search/hu.py \
-i sphinx/search/it.py \
-i sphinx/search/ja.py \
-i sphinx/search/nl.py \
-i sphinx/search/no.py \
-i sphinx/search/pt.py \
-i sphinx/search/ro.py \
-i sphinx/search/ru.py \
-i sphinx/search/sv.py \
-i sphinx/search/tr.py \
2017-02-12 11:08:42 -06:00
-i sphinx/style/jquery.js \
-i sphinx/util/smartypants.py \
-i tests/build \
-i tests/path.py \
-i tests/roots/test-directive-code/target.py \
-i tests/roots/test-warnings/undecodable.rst \
-i tests/test_autodoc_py35.py \
-i tests/typing_test_data.py \
-i utils/convert.py
.PHONY: all
2016-11-06 22:15:18 -06:00
all: clean-pyc clean-backupfiles style-check type-check test
2007-07-23 04:02:25 -05:00
.PHONY: style-check
style-check:
2017-02-12 11:02:51 -06:00
@PYTHONWARNINGS=all $(PYTHON) utils/check_sources.py $(DONT_CHECK) .
2007-07-23 04:02:25 -05:00
.PHONY: type-check
2016-11-06 22:15:18 -06:00
type-check:
mypy sphinx/
.PHONY: clean
2016-12-13 08:59:01 -06:00
clean: clean-pyc clean-pycache clean-patchfiles clean-backupfiles clean-generated clean-testfiles clean-buildfiles clean-mypyfiles
2007-07-23 04:02:25 -05:00
.PHONY: clean-pyc
2007-07-23 04:02:25 -05:00
clean-pyc:
find . -name '*.pyc' -exec rm -f {} +
find . -name '*.pyo' -exec rm -f {} +
.PHONY: clean-pycache
clean-pycache:
find . -name __pycache__ -exec rm -rf {} +
.PHONY: clean-patchfiles
clean-patchfiles:
find . -name '*.orig' -exec rm -f {} +
find . -name '*.rej' -exec rm -f {} +
.PHONY: clean-backupfiles
clean-backupfiles:
find . -name '*~' -exec rm -f {} +
find . -name '*.bak' -exec rm -f {} +
2016-12-18 20:50:35 -06:00
find . -name '*.swp' -exec rm -f {} +
find . -name '*.swo' -exec rm -f {} +
.PHONY: clean-generated
clean-generated:
2016-12-18 20:50:35 -06:00
find . -name '.DS_Store' -exec rm -f {} +
2017-04-05 19:41:49 -05:00
rm -rf Sphinx.egg-info/
rm -rf doc/_build/
2016-12-18 20:50:35 -06:00
rm -f sphinx/pycode/*.pickle
rm -f utils/*3.py*
2016-12-18 20:50:35 -06:00
rm -f utils/regression_test.js
.PHONY: clean-testfiles
clean-testfiles:
2016-12-18 20:50:35 -06:00
rm -rf tests/.coverage
rm -rf tests/build
rm -rf .tox/
2017-01-07 05:37:01 -06:00
rm -rf .cache/
.PHONY: clean-buildfiles
clean-buildfiles:
rm -rf build
.PHONY: clean-mypyfiles
2016-12-13 08:59:01 -06:00
clean-mypyfiles:
rm -rf .mypy_cache/
.PHONY: pylint
2007-07-23 04:02:25 -05:00
pylint:
2008-03-16 08:12:48 -05:00
@pylint --rcfile utils/pylintrc sphinx
2007-07-23 04:02:25 -05:00
.PHONY: reindent
2010-05-22 18:34:52 -05:00
reindent:
2010-05-16 19:26:31 -05:00
@$(PYTHON) utils/reindent.py -r -n .
.PHONY: test
test:
2017-01-03 07:24:00 -06:00
@cd tests; $(PYTHON) run.py --ignore py35 -v $(TEST)
.PHONY: test-async
test-async:
2017-01-03 07:24:00 -06:00
@cd tests; $(PYTHON) run.py -v $(TEST)
.PHONY: covertest
covertest:
2017-01-03 07:24:00 -06:00
@cd tests; $(PYTHON) run.py -v --cov=sphinx --junitxml=.junit.xml $(TEST)
.PHONY: build
build:
@$(PYTHON) setup.py build