docs: Modify Makefile and indexes to generate cPy-differences pages.
This commit is contained in:
parent
b7fa63c7ce
commit
3218ccd70d
|
@ -38,3 +38,7 @@ __pycache__/
|
||||||
######################
|
######################
|
||||||
GNUmakefile
|
GNUmakefile
|
||||||
user.props
|
user.props
|
||||||
|
|
||||||
|
# Generated rst files
|
||||||
|
######################
|
||||||
|
genrst/
|
||||||
|
|
|
@ -6,6 +6,9 @@ SPHINXOPTS =
|
||||||
SPHINXBUILD = sphinx-build
|
SPHINXBUILD = sphinx-build
|
||||||
PAPER =
|
PAPER =
|
||||||
BUILDDIR = build/$(MICROPY_PORT)
|
BUILDDIR = build/$(MICROPY_PORT)
|
||||||
|
CPYDIFFDIR = ../tools
|
||||||
|
CPYDIFF = gen-cpydiff.py
|
||||||
|
GENRSTDIR = genrst
|
||||||
# Run "make FORCE= ..." to avoid rebuilding from scratch (and risk
|
# Run "make FORCE= ..." to avoid rebuilding from scratch (and risk
|
||||||
# producing incorrect docs).
|
# producing incorrect docs).
|
||||||
FORCE = -E
|
FORCE = -E
|
||||||
|
@ -48,11 +51,18 @@ help:
|
||||||
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
|
||||||
@echo " linkcheck to check all external links for integrity"
|
@echo " linkcheck to check all external links for integrity"
|
||||||
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
|
||||||
|
@echo " cpydiff to generate the MicroPython differences from CPython"
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
rm -rf $(BUILDDIR)/*
|
rm -rf $(BUILDDIR)/*
|
||||||
|
rm -f $(GENRSTDIR)/*
|
||||||
|
|
||||||
html:
|
cpydiff:
|
||||||
|
@echo "Generating MicroPython Differences."
|
||||||
|
rm -f $(GENRSTDIR)/*
|
||||||
|
cd $(CPYDIFFDIR) && python $(CPYDIFF)
|
||||||
|
|
||||||
|
html: cpydiff
|
||||||
$(SPHINXBUILD) $(FORCE) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
$(SPHINXBUILD) $(FORCE) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
||||||
|
@ -106,20 +116,20 @@ epub:
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
||||||
|
|
||||||
latex:
|
latex: cpydiff
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
@echo
|
@echo
|
||||||
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
|
||||||
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
@echo "Run \`make' in that directory to run these through (pdf)latex" \
|
||||||
"(use \`make latexpdf' here to do that automatically)."
|
"(use \`make latexpdf' here to do that automatically)."
|
||||||
|
|
||||||
latexpdf:
|
latexpdf: cpydiff
|
||||||
$(SPHINXBUILD) $(FORCE) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
$(SPHINXBUILD) $(FORCE) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
@echo "Running LaTeX files through pdflatex..."
|
@echo "Running LaTeX files through pdflatex..."
|
||||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
$(MAKE) -C $(BUILDDIR)/latex all-pdf
|
||||||
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
||||||
|
|
||||||
latexpdfja:
|
latexpdfja: cpydiff
|
||||||
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
||||||
@echo "Running LaTeX files through platex and dvipdfmx..."
|
@echo "Running LaTeX files through platex and dvipdfmx..."
|
||||||
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
||||||
|
|
|
@ -8,4 +8,5 @@ MicroPython documentation contents
|
||||||
esp8266/tutorial/index.rst
|
esp8266/tutorial/index.rst
|
||||||
library/index.rst
|
library/index.rst
|
||||||
reference/index.rst
|
reference/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
|
|
|
@ -5,6 +5,7 @@ MicroPython documentation and references
|
||||||
|
|
||||||
esp8266/quickref.rst
|
esp8266/quickref.rst
|
||||||
library/index.rst
|
library/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
esp8266_contents.rst
|
esp8266_contents.rst
|
||||||
|
|
||||||
|
|
|
@ -9,5 +9,6 @@ MicroPython documentation contents
|
||||||
library/index.rst
|
library/index.rst
|
||||||
reference/index.rst
|
reference/index.rst
|
||||||
pyboard/hardware/index.rst
|
pyboard/hardware/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
|
|
||||||
|
|
|
@ -8,6 +8,7 @@ MicroPython documentation and references
|
||||||
pyboard/tutorial/index.rst
|
pyboard/tutorial/index.rst
|
||||||
library/index.rst
|
library/index.rst
|
||||||
pyboard/hardware/index.rst
|
pyboard/hardware/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
pyboard_contents.rst
|
pyboard_contents.rst
|
||||||
|
|
||||||
|
|
|
@ -47,6 +47,10 @@
|
||||||
<span class="linkdescr">MicroPython libraries, including the <a href="{{ pathto("library/machine") }}">machine module</a></span>
|
<span class="linkdescr">MicroPython libraries, including the <a href="{{ pathto("library/machine") }}">machine module</a></span>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</p>
|
</p>
|
||||||
|
<p class="biglink">
|
||||||
|
<a class="biglink" href="{{ pathto("genrst/index") }}">Micropython Differences</a><br/>
|
||||||
|
<span class="linkdescr">MicroPython operations which differ from CPython</span>
|
||||||
|
</p>
|
||||||
</td>
|
</td>
|
||||||
<td width="40%" style="padding-left:2em;">
|
<td width="40%" style="padding-left:2em;">
|
||||||
<p class="biglink">
|
<p class="biglink">
|
||||||
|
|
|
@ -5,4 +5,5 @@ MicroPython documentation contents
|
||||||
|
|
||||||
library/index.rst
|
library/index.rst
|
||||||
reference/index.rst
|
reference/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
|
|
|
@ -4,6 +4,7 @@ MicroPython documentation and references
|
||||||
.. toctree::
|
.. toctree::
|
||||||
|
|
||||||
library/index.rst
|
library/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
unix_contents.rst
|
unix_contents.rst
|
||||||
|
|
||||||
|
|
|
@ -8,4 +8,5 @@ MicroPython documentation contents
|
||||||
wipy/tutorial/index.rst
|
wipy/tutorial/index.rst
|
||||||
library/index.rst
|
library/index.rst
|
||||||
reference/index.rst
|
reference/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
|
|
|
@ -7,6 +7,7 @@ MicroPython documentation and references
|
||||||
wipy/general.rst
|
wipy/general.rst
|
||||||
wipy/tutorial/index.rst
|
wipy/tutorial/index.rst
|
||||||
library/index.rst
|
library/index.rst
|
||||||
|
genrst/index.rst
|
||||||
license.rst
|
license.rst
|
||||||
wipy_contents.rst
|
wipy_contents.rst
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue