@@ -6,38 +6,22 @@ SPHINXOPTS =
6
6
SPHINXBUILD = sphinx-build
7
7
PAPER =
8
8
BUILDDIR = _build
9
- LANG = en
10
9
11
10
CALIBRE ?= ebook-convert
12
11
13
12
# Internal variables.
14
13
PAPEROPT_a4 = -D latex_paper_size=a4
15
14
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/
17
16
# the i18n builder cannot share the environment and doctrees with the others
18
17
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
19
18
20
19
.PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
21
20
22
21
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/
41
25
42
26
# Process latex to strip non-ascii characters and perform other necessary
43
27
# changes
@@ -186,14 +170,3 @@ doctest: pre-build
186
170
@echo " Testing of doctests in the sources finished, look at the " \
187
171
" results in $( BUILDDIR) /doctest/output.txt."
188
172
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
0 commit comments