2023-04-17 21:16:31 +02:00
|
|
|
# Minimal makefile for Sphinx documentation
|
|
|
|
#
|
|
|
|
|
|
|
|
# You can set these variables from the command line.
|
|
|
|
SPHINXOPTS =
|
|
|
|
SPHINXBUILD = sphinx-build
|
2023-08-18 17:01:39 +02:00
|
|
|
SPHINXINTL = sphinx-intl
|
2023-04-17 21:16:31 +02:00
|
|
|
SOURCEDIR = source
|
|
|
|
BUILDDIR = build
|
2023-08-18 17:01:39 +02:00
|
|
|
DISTDIR = dist
|
|
|
|
SOURCELANG = fr
|
|
|
|
OTHERLANGS = en
|
|
|
|
ALLLANGS = $(SOURCELANG) $(OTHERLANGS)
|
|
|
|
BASEURL = "nerv-project.eu"
|
2023-04-17 21:16:31 +02:00
|
|
|
|
2023-09-27 22:09:17 +02:00
|
|
|
all: translation html gemini epub weasyprint pyppeteer
|
2023-04-17 21:16:31 +02:00
|
|
|
|
2023-08-18 17:01:39 +02:00
|
|
|
clean:
|
|
|
|
rm -rf "$(BUILDDIR)"
|
2023-04-17 21:16:31 +02:00
|
|
|
|
2023-08-18 17:01:39 +02:00
|
|
|
translation:
|
2023-09-27 22:09:17 +02:00
|
|
|
$(SPHINXBUILD) --color -b gettext $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/gettext"; \
|
2023-08-18 17:01:39 +02:00
|
|
|
for lang in $(OTHERLANGS); \
|
|
|
|
do \
|
|
|
|
$(SPHINXINTL) update -p "$(BUILDDIR)/gettext" -l $$lang; \
|
|
|
|
done
|
|
|
|
|
2023-09-27 22:09:17 +02:00
|
|
|
html:
|
2023-08-18 17:01:39 +02:00
|
|
|
mkdir -p "$(BUILDDIR)/html"; \
|
|
|
|
for lang in $(ALLLANGS); \
|
|
|
|
do \
|
|
|
|
mkdir -p "$(DISTDIR)/html/$$lang"; \
|
|
|
|
$(SPHINXBUILD) -d "$(BUILDDIR)/doctrees" --color -b html -D language="$$lang" -D html_baseurl="https://$(BASEURL)/$$lang/" -D blog_baseurl="https://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/html/$$lang"; \
|
|
|
|
rsync -av --delete "$(BUILDDIR)/html/$$lang/" "$(DISTDIR)/html/$$lang"; \
|
|
|
|
done
|
2023-08-19 00:47:12 +02:00
|
|
|
cp $(DISTDIR)/html/$(SOURCELANG)/favicon.ico $(DISTDIR)/html/
|
|
|
|
cp $(DISTDIR)/html/$(SOURCELANG)/robots.txt $(DISTDIR)/html/
|
2023-08-19 02:12:03 +02:00
|
|
|
cp $(DISTDIR)/html/$(SOURCELANG)/google82f190054a773ed9.html $(DISTDIR)/html/
|
2023-08-18 17:01:39 +02:00
|
|
|
|
2023-09-27 22:09:17 +02:00
|
|
|
gemini:
|
2023-08-18 17:01:39 +02:00
|
|
|
mkdir -p "$(BUILDDIR)/gemini"; \
|
|
|
|
for lang in $(ALLLANGS); \
|
|
|
|
do \
|
|
|
|
mkdir -p "$(DISTDIR)/gemini/$$lang"; \
|
|
|
|
$(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b gemini -D language="$$lang" -D blog_baseurl="gemini://$(BASEURL)/$$lang/" -D gemini_baseurl="gemini://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/gemini/$$lang"; \
|
|
|
|
rsync -av --delete "$(BUILDDIR)/gemini/$$lang/" "$(DISTDIR)/gemini/$$lang"; \
|
|
|
|
done
|
|
|
|
cp index.gmi $(DISTDIR)/gemini/index.gmi
|
2023-09-27 22:09:17 +02:00
|
|
|
|
|
|
|
pyppeteer:
|
|
|
|
mkdir -p "$(BUILDDIR)/pyppeteer"; \
|
|
|
|
for lang in $(ALLLANGS); \
|
|
|
|
do \
|
|
|
|
mkdir -p "$(DISTDIR)/pyppeteer/$$lang"; \
|
|
|
|
$(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b pyppeteer -D language="$$lang" -D blog_baseurl="pyppeteer://$(BASEURL)/$$lang/" -D pyppeteer_baseurl="pyppeteer://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/pyppeteer/$$lang"; \
|
|
|
|
rsync -av --delete "$(BUILDDIR)/pyppeteer/$$lang/" "$(DISTDIR)/pyppeteer/$$lang"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
weasyprint:
|
|
|
|
mkdir -p "$(BUILDDIR)/weasyprint"; \
|
|
|
|
for lang in $(ALLLANGS); \
|
|
|
|
do \
|
|
|
|
mkdir -p "$(DISTDIR)/weasyprint/$$lang"; \
|
|
|
|
$(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b weasyprint -D language="$$lang" -D blog_baseurl="weasyprint://$(BASEURL)/$$lang/" -D weasyprint_baseurl="weasyprint://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/weasyprint/$$lang"; \
|
|
|
|
rsync -av --delete "$(BUILDDIR)/weasyprint/$$lang/" "$(DISTDIR)/weasyprint/$$lang"; \
|
|
|
|
done
|
|
|
|
|
|
|
|
epub:
|
|
|
|
mkdir -p "$(BUILDDIR)/epub"; \
|
|
|
|
for lang in $(ALLLANGS); \
|
|
|
|
do \
|
|
|
|
mkdir -p "$(DISTDIR)/epub/$$lang"; \
|
|
|
|
$(SPHINXBUILD) --color -d "$(BUILDDIR)/doctrees" -b epub -D language="$$lang" -D blog_baseurl="epub://$(BASEURL)/$$lang/" -D epub_baseurl="epub://$(BASEURL)/$$lang/" $(SPHINXOPTS) "$(SOURCEDIR)" "$(BUILDDIR)/epub/$$lang"; \
|
|
|
|
rsync -av --delete "$(BUILDDIR)/epub/$$lang/" "$(DISTDIR)/epub/$$lang"; \
|
|
|
|
done
|