diff options
| author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-10-05 14:19:32 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-10-06 13:52:25 +0100 |
| commit | 18016c1ef86f6b6307399229b496547ee6a77291 (patch) | |
| tree | 20d4514b149aca3a01650bd430400c762d3b52ca /bitbake/doc | |
| parent | ac8257be721b8f4600d86f2073ce74bfb8fe360d (diff) | |
| download | poky-18016c1ef86f6b6307399229b496547ee6a77291.tar.gz | |
bitbake: docs: sphinx: report errors when dependencies are not met
(Bitbake rev: 9ae5cce76693d7c12396cee1183aaf371bb3d66c)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'bitbake/doc')
| -rw-r--r-- | bitbake/doc/Makefile.sphinx | 4 | ||||
| -rw-r--r-- | bitbake/doc/conf.py | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/bitbake/doc/Makefile.sphinx b/bitbake/doc/Makefile.sphinx index c663c29540..c9518558bb 100644 --- a/bitbake/doc/Makefile.sphinx +++ b/bitbake/doc/Makefile.sphinx | |||
| @@ -9,6 +9,10 @@ SOURCEDIR = . | |||
| 9 | BUILDDIR = _build | 9 | BUILDDIR = _build |
| 10 | DESTDIR = final | 10 | DESTDIR = final |
| 11 | 11 | ||
| 12 | ifeq ($(shell if which $(SPHINXBUILD) >/dev/null 2>&1; then echo 1; else echo 0; fi),0) | ||
| 13 | $(error "The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed") | ||
| 14 | endif | ||
| 15 | |||
| 12 | # Put it first so that "make" without argument is like "make help". | 16 | # Put it first so that "make" without argument is like "make help". |
| 13 | help: | 17 | help: |
| 14 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | 18 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) |
diff --git a/bitbake/doc/conf.py b/bitbake/doc/conf.py index 197f2757aa..354dff36f7 100644 --- a/bitbake/doc/conf.py +++ b/bitbake/doc/conf.py | |||
| @@ -73,7 +73,13 @@ rst_prolog = """ | |||
| 73 | # The theme to use for HTML and HTML Help pages. See the documentation for | 73 | # The theme to use for HTML and HTML Help pages. See the documentation for |
| 74 | # a list of builtin themes. | 74 | # a list of builtin themes. |
| 75 | # | 75 | # |
| 76 | html_theme = 'sphinx_rtd_theme' | 76 | try: |
| 77 | import sphinx_rtd_theme | ||
| 78 | html_theme = 'sphinx_rtd_theme' | ||
| 79 | except ImportError: | ||
| 80 | sys.stderr.write("The Sphinx sphinx_rtd_theme HTML theme was not found.\ | ||
| 81 | \nPlease make sure to install the sphinx_rtd_theme python package.\n") | ||
| 82 | sys.exit(1) | ||
| 77 | 83 | ||
| 78 | # Add any paths that contain custom static files (such as style sheets) here, | 84 | # Add any paths that contain custom static files (such as style sheets) here, |
| 79 | # relative to this directory. They are copied after the builtin static files, | 85 | # relative to this directory. They are copied after the builtin static files, |
