forked from AFPy/python-docs-fr
Amélioration du Makefile (#23)
- ajout du nettoyage de locales/$(LANGUAGE)/LC_MESSAGES/ dans la cible 'clean'
- variable supplémentaire pour préciser en ligne de commande la gestion des
erreurs par Sphinx
- séparation dans l'appel au Makefile de cpython du paramètre JOBS pour qu'il
soit pris en compte (en lien avec une PR vers cpython)
- suppression de la variable SERVE_PORT devenue inutile depuis le commit
da21f1dbe0
Co-authored-by: Christophe Nanteuil <christophe.nanteuil@gmail.com>
Reviewed-on: AFPy/python-docs-fr#23
Reviewed-by: Julien Palard <julien@palard.fr>
Co-authored-by: Christophe Nanteuil <christophenan@noreply.localhost>
Co-committed-by: Christophe Nanteuil <christophenan@noreply.localhost>
This commit is contained in:
parent
1e0489fcee
commit
75f7e91fcb
9
Makefile
9
Makefile
|
@ -65,7 +65,7 @@ PYTHON := $(shell which python3)
|
||||||
MODE := html
|
MODE := html
|
||||||
POSPELL_TMP_DIR := .pospell/
|
POSPELL_TMP_DIR := .pospell/
|
||||||
JOBS := auto
|
JOBS := auto
|
||||||
SERVE_PORT :=
|
SPHINXERRORHANDLING = -W
|
||||||
|
|
||||||
# Detect OS
|
# Detect OS
|
||||||
|
|
||||||
|
@ -90,13 +90,14 @@ all: ensure_prerequisites
|
||||||
mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/
|
mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/
|
||||||
$(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/
|
$(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/
|
||||||
$(MAKE) -C venv/cpython/Doc/ \
|
$(MAKE) -C venv/cpython/Doc/ \
|
||||||
SPHINXOPTS='-j$(JOBS) \
|
JOBS='$(JOBS)' \
|
||||||
-D locale_dirs=$(abspath locales) \
|
SPHINXOPTS='-D locale_dirs=$(abspath locales) \
|
||||||
-D language=$(LANGUAGE) \
|
-D language=$(LANGUAGE) \
|
||||||
-D gettext_compact=0 \
|
-D gettext_compact=0 \
|
||||||
-D latex_engine=xelatex \
|
-D latex_engine=xelatex \
|
||||||
-D latex_elements.inputenc= \
|
-D latex_elements.inputenc= \
|
||||||
-D latex_elements.fontenc=' \
|
-D latex_elements.fontenc=' \
|
||||||
|
SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \
|
||||||
$(MODE)
|
$(MODE)
|
||||||
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them."
|
@echo "Build success, open file://$(abspath venv/cpython/)/Doc/build/html/index.html or run 'make htmlview' to see them."
|
||||||
|
|
||||||
|
@ -162,7 +163,7 @@ verifs: spell line-length sphinx-lint
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
clean:
|
clean:
|
||||||
@echo "Cleaning *.mo and $(POSPELL_TMP_DIR)"
|
@echo "Cleaning *.mo and $(POSPELL_TMP_DIR)"
|
||||||
rm -fr $(POSPELL_TMP_DIR)
|
rm -fr $(POSPELL_TMP_DIR) locales/$(LANGUAGE)/LC_MESSAGES/
|
||||||
find -name '*.mo' -delete
|
find -name '*.mo' -delete
|
||||||
@echo "Cleaning build directory"
|
@echo "Cleaning build directory"
|
||||||
$(MAKE) -C venv/cpython/Doc/ clean
|
$(MAKE) -C venv/cpython/Doc/ clean
|
||||||
|
|
Loading…
Reference in New Issue