|
|
@@ -28,7 +28,7 @@ ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) -w
|
|
|
# the i18n builder cannot share the environment and doctrees with the others
|
|
|
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
|
|
|
|
|
|
-.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext dependencies version-specific-includes
|
|
|
+.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext dependencies version-specific-includes check_python_packages
|
|
|
|
|
|
help:
|
|
|
@echo "Please use \`make <target>\' where <target> is one of"
|
|
|
@@ -58,38 +58,44 @@ help:
|
|
|
clean:
|
|
|
rm -rf $(BUILDDIR)/*
|
|
|
|
|
|
-html:
|
|
|
+# Notify users when some of the required python packages are not installed.
|
|
|
+# Note: This is intended to help developers who generate the documentation on their local machine. Read The Docs uses
|
|
|
+# the requirements.txt file directly and calls sphinx also directly without the use of the makefile!
|
|
|
+check_python_packages:
|
|
|
+ $(IDF_PATH)/tools/check_python_dependencies.py -r $(IDF_PATH)/docs/requirements.txt
|
|
|
+
|
|
|
+html: | check_python_packages
|
|
|
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
|
|
|
@echo
|
|
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
|
|
|
|
|
|
-dirhtml:
|
|
|
+dirhtml: | check_python_packages
|
|
|
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
|
|
|
@echo
|
|
|
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
|
|
|
|
|
|
-singlehtml:
|
|
|
+singlehtml: | check_python_packages
|
|
|
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
|
|
|
@echo
|
|
|
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
|
|
|
|
|
|
-pickle:
|
|
|
+pickle: | check_python_packages
|
|
|
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
|
|
|
@echo
|
|
|
@echo "Build finished; now you can process the pickle files."
|
|
|
|
|
|
-json:
|
|
|
+json: | check_python_packages
|
|
|
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
|
|
|
@echo
|
|
|
@echo "Build finished; now you can process the JSON files."
|
|
|
|
|
|
-htmlhelp:
|
|
|
+htmlhelp: | check_python_packages
|
|
|
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
|
|
|
@echo
|
|
|
@echo "Build finished; now you can run HTML Help Workshop with the" \
|
|
|
".hhp project file in $(BUILDDIR)/htmlhelp."
|
|
|
|
|
|
-qthelp:
|
|
|
+qthelp: | check_python_packages
|
|
|
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
|
|
|
@echo
|
|
|
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
|
|
|
@@ -98,7 +104,7 @@ qthelp:
|
|
|
@echo "To view the help file:"
|
|
|
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ReadtheDocsTemplate.qhc"
|
|
|
|
|
|
-devhelp:
|
|
|
+devhelp: | check_python_packages
|
|
|
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
|
|
|
@echo
|
|
|
@echo "Build finished."
|
|
|
@@ -107,70 +113,70 @@ devhelp:
|
|
|
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ReadtheDocsTemplate"
|
|
|
@echo "# devhelp"
|
|
|
|
|
|
-epub:
|
|
|
+epub: | check_python_packages
|
|
|
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
|
|
|
@echo
|
|
|
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
|
|
|
|
|
|
-latex:
|
|
|
+latex: | check_python_packages
|
|
|
$(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: | check_python_packages
|
|
|
$(SPHINXBUILD) -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: | check_python_packages
|
|
|
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
|
|
|
@echo "Running LaTeX files through platex and dvipdfmx..."
|
|
|
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
|
|
|
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
|
|
|
|
|
|
-text:
|
|
|
+text: | check_python_packages
|
|
|
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
|
|
|
@echo
|
|
|
@echo "Build finished. The text files are in $(BUILDDIR)/text."
|
|
|
|
|
|
-man:
|
|
|
+man: | check_python_packages
|
|
|
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
|
|
|
@echo
|
|
|
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
|
|
|
|
|
|
-texinfo:
|
|
|
+texinfo: | check_python_packages
|
|
|
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
|
@echo
|
|
|
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
|
|
|
@echo "Run \`make' in that directory to run these through makeinfo" \
|
|
|
"(use \`make info' here to do that automatically)."
|
|
|
|
|
|
-info:
|
|
|
+info: | check_python_packages
|
|
|
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
|
|
|
@echo "Running Texinfo files through makeinfo..."
|
|
|
make -C $(BUILDDIR)/texinfo info
|
|
|
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
|
|
|
|
|
|
-gettext:
|
|
|
+gettext: | check_python_packages
|
|
|
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
|
|
|
@echo
|
|
|
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
|
|
|
|
|
|
-changes:
|
|
|
+changes: | check_python_packages
|
|
|
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
|
|
|
@echo
|
|
|
@echo "The overview file is in $(BUILDDIR)/changes."
|
|
|
|
|
|
-linkcheck:
|
|
|
+linkcheck: | check_python_packages
|
|
|
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
|
|
|
@echo
|
|
|
@echo "Link check complete; look for any errors in the above output " \
|
|
|
"or in $(BUILDDIR)/linkcheck/output.txt."
|
|
|
|
|
|
-gh-linkcheck:
|
|
|
+gh-linkcheck: | check_python_packages
|
|
|
@echo "Checking for hardcoded GitHub links"
|
|
|
@if (find ../ -name '*.rst' | xargs grep \
|
|
|
'https://github.com/espressif/esp-idf/tree\|https://github.com/espressif/esp-idf/blob\|https://github.com/espressif/esp-idf/raw'\
|
|
|
@@ -194,17 +200,17 @@ gh-linkcheck:
|
|
|
fi
|
|
|
@echo "No hardcoded links found"
|
|
|
|
|
|
-doctest:
|
|
|
+doctest: | check_python_packages
|
|
|
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
|
|
|
@echo "Testing of doctests in the sources finished, look at the " \
|
|
|
"results in $(BUILDDIR)/doctest/output.txt."
|
|
|
|
|
|
-xml:
|
|
|
+xml: | check_python_packages
|
|
|
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
|
|
|
@echo
|
|
|
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
|
|
|
|
|
|
-pseudoxml:
|
|
|
+pseudoxml: | check_python_packages
|
|
|
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
|
|
|
@echo
|
|
|
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."
|