Add checks to Makefile (#642)

This commit is contained in:
Christophe Nanteuil 2019-03-30 09:30:23 +01:00 committed by Julien Palard
parent e6da265f74
commit 596b7d4aff
1 changed files with 21 additions and 0 deletions

View File

@ -4,6 +4,9 @@
#
# - make # Automatically build an html local version
# - make todo # To list remaining tasks
# - make verifs # To check for correctness: wrapping, spelling
# - make powrap # To check for wrapping
# - make pospell # To check for spelling
# - make merge # To merge pot from upstream
# - make fuzzy # To find fuzzy strings
# - make progress # To compute current progression
@ -42,6 +45,7 @@ $(SPHINX_CONF):
.PHONY: upgrade_venv
upgrade_venv:
$(MAKE) -C $(CPYTHON_CLONE)/Doc/ VENVDIR=$(VENV) PYTHON=$(PYTHON) venv
$(VENV)/bin/pip install -U potodo powrap pospell
$(VENV)/bin/activate: $(SPHINX_CONF)
@ -58,10 +62,27 @@ progress:
$(VENV)/bin/potodo: $(VENV)/bin/activate
$(VENV)/bin/pip install potodo
$(VENV)/bin/powrap: $(VENV)/bin/activate
$(VENV)/bin/pip install powrap
$(VENV)/bin/pospell: $(VENV)/bin/activate
$(VENV)/bin/pip install pospell
.PHONY: todo
todo: $(VENV)/bin/potodo
$(VENV)/bin/potodo --github python/python-docs-fr
.PHONY: verifs
verifs: powrap pospell
.PHONY: powrap
powrap: $(VENV)/bin/powrap
$(VENV)/bin/powrap --check --quiet *.po */*.po
.PHONY: pospell
pospell: $(VENV)/bin/pospell
$(VENV)/bin/pospell -p dict -l fr_FR *.po */*.po
.PHONY: merge
merge: upgrade_venv
ifneq "$(shell cd $(CPYTHON_CLONE) 2>/dev/null && git describe --contains --all HEAD)" "$(BRANCH)"