Skip to content
This repository was archived by the owner on May 24, 2018. It is now read-only.

Commit bd1e6b7

Browse files
committed
Updated Makefile and configuration
Removed language-related build aspects from the Makefile, as we're no longer building multiple languages. Updated `conf.py` to add `en` as the language (instead of having that value scripted).
1 parent 4eef822 commit bd1e6b7

File tree

2 files changed

+5
-32
lines changed

2 files changed

+5
-32
lines changed

docs/Makefile

Lines changed: 4 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,38 +6,22 @@ SPHINXOPTS =
66
SPHINXBUILD = sphinx-build
77
PAPER =
88
BUILDDIR = _build
9-
LANG = en
109

1110
CALIBRE ?= ebook-convert
1211

1312
# Internal variables.
1413
PAPEROPT_a4 = -D latex_paper_size=a4
1514
PAPEROPT_letter = -D latex_paper_size=letter
16-
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) tmp/$(LANG)
15+
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) tmp/
1716
# the i18n builder cannot share the environment and doctrees with the others
1817
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
1918

2019
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
2120

2221
pre-build:
23-
@rm -rf tmp/$(LANG)
24-
@mkdir -p tmp/$(LANG)
25-
@cp -Rp languages/en/* tmp/$(LANG)/
26-
ifneq ($(LANG),en)
27-
@for f in $$(cd languages/$(LANG) && find . -type f \( ! -iname ".*" \) | sort); do \
28-
if [ -f languages/en/$$f ]; then \
29-
if [ $$(stat -c %s languages/$(LANG)/$$f) = $$(stat -c %s languages/en/$$f) ]; then \
30-
echo "The file '$$f' seems to be exactly the same as English one, perhaps it could be deleted"; \
31-
fi; \
32-
cp languages/$(LANG)/$$f tmp/$(LANG)/$$f; \
33-
else \
34-
echo "The file '$$f' is not anymore in English directory, check if it's renamed or deleted"; \
35-
fi; \
36-
done
37-
endif
38-
@cp languages/en/conf.py tmp/$(LANG)/conf.py
39-
@sed -i.bak 's/#language = None/language = "$(LANG)"/' tmp/$(LANG)/conf.py
40-
@rm -f tmp/$(LANG)/conf.py.bak
22+
@rm -rf tmp/
23+
@mkdir -p tmp/
24+
@cp -Rp src/* tmp/
4125

4226
# Process latex to strip non-ascii characters and perform other necessary
4327
# changes
@@ -186,14 +170,3 @@ doctest: pre-build
186170
@echo "Testing of doctests in the sources finished, look at the " \
187171
"results in $(BUILDDIR)/doctest/output.txt."
188172

189-
add-missing-revchecktag:
190-
ifneq ($(LANG),en)
191-
@for f in $$(cd languages/$(LANG) && find . -type f \( ! -iname ".*" \)); do \
192-
if [ -f languages/en/$$f ]; then \
193-
rev=$$(head -n 3 languages/$(LANG)/$$f | grep -i EN-Revision | cut -f2 -d ':' | tr -d ' '); \
194-
if [ "$$rev" = "" ]; then \
195-
echo ".. EN-Revision: none"|cat - languages/$(LANG)/$$f > /tmp/zftmpfile && mv /tmp/zftmpfile languages/$(LANG)/$$f; \
196-
fi; \
197-
fi; \
198-
done
199-
endif

docs/src/conf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454

5555
# The language for content autogenerated by Sphinx. Refer to documentation
5656
# for a list of supported languages.
57-
#language = None
57+
language = 'en'
5858

5959
# There are two options for replacing |today|: either, you set today to some
6060
# non-false value, then it is used:

0 commit comments

Comments
 (0)