aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorn-peugnet <n.peugnet@free.fr>2022-04-02 04:32:55 +0200
committern-peugnet <n.peugnet@free.fr>2022-04-02 04:32:55 +0200
commit9a62aeb8ea3954a37362d6b5b9a16b4599c9d1d4 (patch)
tree0ee59e85f800b81b6307377ef437a4e591292159 /Makefile
parent6c010163910995421e9f5409c9be8ce0c567b63f (diff)
downloadclub1-docs-n-peugnet-add-favicon.tar.gz
club1-docs-n-peugnet-add-favicon.zip
build: small fixes & enhancementsn-peugnet-add-favicon
- rename LANGUAGE exported env var to LOCAL, not to disturb Make messages - remove failing sphinx commands - remove quotes around BUILDDIR and SOURCEDIR as these will never have spaces - share doctrees for localized builders for perf. This also fixes warning for epub about .doctrees unknown mimetype - fix LaTeX paper size to always use A4 - fix today format to use a localized version
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile12
1 files changed, 6 insertions, 6 deletions
diff --git a/Makefile b/Makefile
index ae60ab5..6b74ac3 100644
--- a/Makefile
+++ b/Makefile
@@ -10,8 +10,8 @@ export PACKAGE := CLUB1
export VERSION := main
export EMAIL := nicolas@club1.fr
-export LANGUAGE := fr
-export LANGUAGES := $(LANGUAGE) $(LOCALES)
+export LOCALE := fr
+export LANGUAGES := $(LOCALE) $(LOCALES)
export LATEXMKOPTS := -quiet
SPHINXLANG := -D language=$(LOCALE)
@@ -19,7 +19,7 @@ SPHINXOPTS += -a $(if $(CI),,-q)
SPHINXBUILD ?= sphinx-build
SPHINXBUILDERS := html dirhtml singlehtml epub latex text man texinfo
SPHINXLBUILDERS := $(foreach b,$(SPHINXBUILDERS),$(LANGUAGES:%=$b/%))
-SPHINXCMDS := gettext pickle json htmlhelp changes xml pseudoxml linkcheck doctest coverage
+SPHINXCMDS := gettext changes xml pseudoxml linkcheck
SOURCEDIR := .
BUILDDIR := _build
@@ -28,7 +28,7 @@ PUBDIR ?= /var/www/docs
# Put it first so that "make" without argument is like "make help".
help:
- $(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $O
+ $(SPHINXBUILD) -M help $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $O
.PHONY: help clean update-po latexpdf info publish $(SPHINXBUILDERS) $(SPHINXLBUILDERS) $(SPHINXCMDS)
@@ -66,11 +66,11 @@ $(SPHINXBUILDERS): %: $(LANGUAGES:%=\%/%);
# Localized Sphinx builders
.SECONDEXPANSION:
$(SPHINXLBUILDERS): $$(if $$(filter fr,$$(@F)),,locales/$$(@F)/LC_MESSAGES/package.mo locales/$$(@F)/LC_MESSAGES/sphinx.mo)
- LANGUAGE=$(@F) $(SPHINXBUILD) -b $(@D) "$(SOURCEDIR)" "$(BUILDDIR)/$(@D)/$(@F)" $(SPHINXOPTS) $O
+ LOCALE=$(@F) $(SPHINXBUILD) -b $(@D) -d $(BUILDDIR)/doctrees/$(@F) $(SOURCEDIR) $(BUILDDIR)/$(@D)/$(@F) $(SPHINXOPTS) $O
# Other Sphinx commands for autocompletion
$(SPHINXCMDS):
- $(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $O
+ $(SPHINXBUILD) -M $@ $(SOURCEDIR) $(BUILDDIR) $(SPHINXOPTS) $O
clean:
rm -f locales/*/LC_MESSAGES/*.mo