sphinx/Makefile

89 lines
1.8 KiB
Makefile
Raw Normal View History

PYTHON ?= python3
2007-07-23 04:02:25 -05:00
.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: 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/
2020-03-28 07:54:26 -05:00
rm -rf dist/
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:
2020-04-10 10:14:52 -05:00
find . -name '.mypy_cache' -exec rm -rf {} +
2016-12-13 08:59:01 -06:00
.PHONY: style-check
style-check:
@flake8
.PHONY: type-check
type-check:
2018-11-27 11:02:53 -06:00
mypy sphinx
2019-05-29 11:07:03 -05:00
.PHONY: doclinter
doclinter:
python utils/doclinter.py CHANGES *.rst doc/
.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: test
test:
@$(PYTHON) -m pytest -v $(TEST)
.PHONY: covertest
covertest:
@$(PYTHON) -m pytest -v --cov=sphinx --junitxml=.junit.xml $(TEST)
.PHONY: build
build:
@$(PYTHON) setup.py build
.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)