aboutsummaryrefslogtreecommitdiff
path: root/docs/Makefile
diff options
context:
space:
mode:
authorRami Ali2017-02-07 16:00:34 +1100
committerDamien George2017-02-20 17:14:35 +1100
commit3218ccd70d8f387662987f6c1beb79102288b13d (patch)
tree5c8a45fba3e6e235159b87693299cab5c8bd5025 /docs/Makefile
parentb7fa63c7ced460fd2d3aceb35257a62ff08831c1 (diff)
docs: Modify Makefile and indexes to generate cPy-differences pages.
Diffstat (limited to 'docs/Makefile')
-rw-r--r--docs/Makefile18
1 files changed, 14 insertions, 4 deletions
diff --git a/docs/Makefile b/docs/Makefile
index d81d11eeb..b4e338ad5 100644
--- a/docs/Makefile
+++ b/docs/Makefile
@@ -6,6 +6,9 @@ SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = build/$(MICROPY_PORT)
+CPYDIFFDIR = ../tools
+CPYDIFF = gen-cpydiff.py
+GENRSTDIR = genrst
# Run "make FORCE= ..." to avoid rebuilding from scratch (and risk
# producing incorrect docs).
FORCE = -E
@@ -48,11 +51,18 @@ help:
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
+ @echo " cpydiff to generate the MicroPython differences from CPython"
clean:
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
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
@@ -106,20 +116,20 @@ epub:
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
-latex:
+latex: cpydiff
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
-latexpdf:
+latexpdf: cpydiff
$(SPHINXBUILD) $(FORCE) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
-latexpdfja:
+latexpdfja: cpydiff
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja