From 75f7e91fcb29d40faa7ec0f485f2bf2cf521c5f5 Mon Sep 17 00:00:00 2001 From: Christophe Nanteuil Date: Sat, 4 Feb 2023 07:26:16 +0000 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20du=20Makefile=20(#23)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 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 da21f1dbe04e36a21da14bbb38f843125e07f237 Co-authored-by: Christophe Nanteuil Reviewed-on: https://git.afpy.org/AFPy/python-docs-fr/pulls/23 Reviewed-by: Julien Palard Co-authored-by: Christophe Nanteuil Co-committed-by: Christophe Nanteuil --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 0e9d42d6..1b1f238b 100644 --- a/Makefile +++ b/Makefile @@ -65,7 +65,7 @@ PYTHON := $(shell which python3) MODE := html POSPELL_TMP_DIR := .pospell/ JOBS := auto -SERVE_PORT := +SPHINXERRORHANDLING = -W # Detect OS @@ -90,13 +90,14 @@ all: ensure_prerequisites mkdir -p locales/$(LANGUAGE)/LC_MESSAGES/ $(CP_CMD) -u --parents *.po */*.po locales/$(LANGUAGE)/LC_MESSAGES/ $(MAKE) -C venv/cpython/Doc/ \ - SPHINXOPTS='-j$(JOBS) \ - -D locale_dirs=$(abspath locales) \ + JOBS='$(JOBS)' \ + SPHINXOPTS='-D locale_dirs=$(abspath locales) \ -D language=$(LANGUAGE) \ -D gettext_compact=0 \ -D latex_engine=xelatex \ -D latex_elements.inputenc= \ -D latex_elements.fontenc=' \ + SPHINXERRORHANDLING=$(SPHINXERRORHANDLING) \ $(MODE) @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 clean: @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 @echo "Cleaning build directory" $(MAKE) -C venv/cpython/Doc/ clean