@@ -6,13 +6,16 @@ PYTHON = python3
6
6
SPHINXOPTS =
7
7
SPHINXBUILD = sphinx-build
8
8
PAPER =
9
- BUILDDIR = build/$(MICROPY_PORT )
10
- CPYDIFFDIR = ../tools
11
- CPYDIFF = gen-cpydiff.py
12
- GENRSTDIR = genrst
9
+ # path to build the generated docs
10
+ BUILDDIR = _build
11
+ # path to source files to process
12
+ SOURCEDIR = .
13
+ # path to conf.py
14
+ CONFDIR = .
13
15
# Run "make FORCE= ..." to avoid rebuilding from scratch (and risk
14
16
# producing incorrect docs).
15
17
FORCE = -E
18
+ VERBOSE = -v
16
19
17
20
# User-friendly check for sphinx-build
18
21
ifeq ($(shell which $(SPHINXBUILD ) >/dev/null 2>&1; echo $$? ) , 1)
22
25
# Internal variables.
23
26
PAPEROPT_a4 = -D latex_paper_size=a4
24
27
PAPEROPT_letter = -D latex_paper_size=letter
25
- ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(PAPEROPT_$(PAPER ) ) $(SPHINXOPTS ) .
28
+ BASEOPTS = -c $(CONFDIR ) $(PAPEROPT_$(PAPER ) ) $(FORCE ) $(VERBOSE ) $(SPHINXOPTS ) $(SOURCEDIR )
29
+ ALLSPHINXOPTS = -d $(BUILDDIR ) /doctrees $(BASEOPTS )
26
30
# the i18n builder cannot share the environment and doctrees with the others
27
- I18NSPHINXOPTS = $(PAPEROPT_ $( PAPER ) ) $( SPHINXOPTS ) .
31
+ I18NSPHINXOPTS = $(BASEOPTS )
28
32
29
33
.PHONY : help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
30
34
@@ -52,19 +56,12 @@ help:
52
56
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
53
57
@echo " linkcheck to check all external links for integrity"
54
58
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
55
- @echo " cpydiff to generate the MicroPython differences from CPython"
56
59
57
60
clean :
58
61
rm -rf $(BUILDDIR ) /*
59
- rm -f $(GENRSTDIR ) /*
60
62
61
- cpydiff :
62
- @echo " Generating MicroPython Differences."
63
- rm -f $(GENRSTDIR ) /*
64
- cd $(CPYDIFFDIR ) && $(PYTHON ) $(CPYDIFF )
65
-
66
- html : cpydiff
67
- $(SPHINXBUILD ) $(FORCE ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
63
+ html :
64
+ $(SPHINXBUILD ) -b html $(ALLSPHINXOPTS ) $(BUILDDIR ) /html
68
65
@echo
69
66
@echo " Build finished. The HTML pages are in $( BUILDDIR) /html."
70
67
@@ -117,30 +114,34 @@ epub:
117
114
@echo
118
115
@echo " Build finished. The epub file is in $( BUILDDIR) /epub."
119
116
120
- latex : cpydiff
117
+ latex :
121
118
$(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
122
119
@echo
123
120
@echo " Build finished; the LaTeX files are in $( BUILDDIR) /latex."
124
121
@echo " Run \` make' in that directory to run these through (pdf)latex" \
125
122
" (use \` make latexpdf' here to do that automatically)."
126
123
127
- latexpdf : cpydiff
128
- $(SPHINXBUILD ) $(FORCE ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
124
+ # seems to be malfunctioning
125
+ latexpdf :
126
+ $(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
129
127
@echo " Running LaTeX files through pdflatex..."
130
128
$(MAKE ) -C $(BUILDDIR ) /latex all-pdf
131
129
@echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
132
130
133
- latexpdfja : cpydiff
131
+ # seems to be malfunctioning
132
+ latexpdfja :
134
133
$(SPHINXBUILD ) -b latex $(ALLSPHINXOPTS ) $(BUILDDIR ) /latex
135
134
@echo " Running LaTeX files through platex and dvipdfmx..."
136
135
$(MAKE ) -C $(BUILDDIR ) /latex all-pdf-ja
137
136
@echo " pdflatex finished; the PDF files are in $( BUILDDIR) /latex."
138
137
138
+ # seems to be malfunctioning
139
139
text :
140
140
$(SPHINXBUILD ) -b text $(ALLSPHINXOPTS ) $(BUILDDIR ) /text
141
141
@echo
142
142
@echo " Build finished. The text files are in $( BUILDDIR) /text."
143
143
144
+ # seems to be malfunctioning
144
145
man :
145
146
$(SPHINXBUILD ) -b man $(ALLSPHINXOPTS ) $(BUILDDIR ) /man
146
147
@echo
0 commit comments