diff options
| author | Nicolas Dechesne <nicolas.dechesne@linaro.org> | 2020-05-26 19:14:48 +0200 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2020-09-16 18:14:07 +0100 |
| commit | 69ed72025ad48ef042bb80cdc912c8486cf635bc (patch) | |
| tree | 01e0bd54a302ee6f8e94fb377e6fb27fbae36d5d | |
| parent | 42bbf1451ac67675de52f7dc0285b1f3bb24216b (diff) | |
| download | poky-69ed72025ad48ef042bb80cdc912c8486cf635bc.tar.gz | |
bitbake: sphinx: add initial build infrastructure
Used sphinx-quickstart to generate top level config and
Makefile.sphinx, to allow side by side DocBook and Sphinx
co-existence.
(Bitbake rev: 84ccba0f4aff91528f764523fe1205a354c889ed)
Signed-off-by: Nicolas Dechesne <nicolas.dechesne@linaro.org>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | bitbake/doc/.gitignore | 1 | ||||
| -rw-r--r-- | bitbake/doc/Makefile.sphinx | 20 | ||||
| -rw-r--r-- | bitbake/doc/conf.py | 66 | ||||
| -rw-r--r-- | bitbake/doc/genindex.rst | 3 | ||||
| -rw-r--r-- | bitbake/doc/index.rst | 11 |
5 files changed, 101 insertions, 0 deletions
diff --git a/bitbake/doc/.gitignore b/bitbake/doc/.gitignore new file mode 100644 index 0000000000..69fa449dd9 --- /dev/null +++ b/bitbake/doc/.gitignore | |||
| @@ -0,0 +1 @@ | |||
| _build/ | |||
diff --git a/bitbake/doc/Makefile.sphinx b/bitbake/doc/Makefile.sphinx new file mode 100644 index 0000000000..933c77ee5f --- /dev/null +++ b/bitbake/doc/Makefile.sphinx | |||
| @@ -0,0 +1,20 @@ | |||
| 1 | # Minimal makefile for Sphinx documentation | ||
| 2 | # | ||
| 3 | |||
| 4 | # You can set these variables from the command line, and also | ||
| 5 | # from the environment for the first two. | ||
| 6 | SPHINXOPTS ?= | ||
| 7 | SPHINXBUILD ?= sphinx-build | ||
| 8 | SOURCEDIR = . | ||
| 9 | BUILDDIR = _build | ||
| 10 | |||
| 11 | # Put it first so that "make" without argument is like "make help". | ||
| 12 | help: | ||
| 13 | @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
| 14 | |||
| 15 | .PHONY: help Makefile.sphinx | ||
| 16 | |||
| 17 | # Catch-all target: route all unknown targets to Sphinx using the new | ||
| 18 | # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). | ||
| 19 | %: Makefile.sphinx | ||
| 20 | @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) | ||
diff --git a/bitbake/doc/conf.py b/bitbake/doc/conf.py new file mode 100644 index 0000000000..1cac186d4b --- /dev/null +++ b/bitbake/doc/conf.py | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | # Configuration file for the Sphinx documentation builder. | ||
| 2 | # | ||
| 3 | # This file only contains a selection of the most common options. For a full | ||
| 4 | # list see the documentation: | ||
| 5 | # https://www.sphinx-doc.org/en/master/usage/configuration.html | ||
| 6 | |||
| 7 | # -- Path setup -------------------------------------------------------------- | ||
| 8 | |||
| 9 | # If extensions (or modules to document with autodoc) are in another directory, | ||
| 10 | # add these directories to sys.path here. If the directory is relative to the | ||
| 11 | # documentation root, use os.path.abspath to make it absolute, like shown here. | ||
| 12 | # | ||
| 13 | # import os | ||
| 14 | # import sys | ||
| 15 | # sys.path.insert(0, os.path.abspath('.')) | ||
| 16 | |||
| 17 | import datetime | ||
| 18 | |||
| 19 | # -- Project information ----------------------------------------------------- | ||
| 20 | |||
| 21 | project = 'Bitbake' | ||
| 22 | copyright = '2004-%s, Richard Purdie, Chris Larson, and Phil Blundell' \ | ||
| 23 | % datetime.datetime.now().year | ||
| 24 | author = 'Richard Purdie, Chris Larson, and Phil Blundell' | ||
| 25 | |||
| 26 | |||
| 27 | # -- General configuration --------------------------------------------------- | ||
| 28 | |||
| 29 | # Add any Sphinx extension module names here, as strings. They can be | ||
| 30 | # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom | ||
| 31 | # ones. | ||
| 32 | extensions = [ | ||
| 33 | 'sphinx.ext.autosectionlabel', | ||
| 34 | ] | ||
| 35 | autosectionlabel_prefix_document = True | ||
| 36 | |||
| 37 | # Add any paths that contain templates here, relative to this directory. | ||
| 38 | templates_path = ['_templates'] | ||
| 39 | |||
| 40 | # List of patterns, relative to source directory, that match files and | ||
| 41 | # directories to ignore when looking for source files. | ||
| 42 | # This pattern also affects html_static_path and html_extra_path. | ||
| 43 | exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
| 44 | |||
| 45 | # master document name. The default changed from contents to index. so better | ||
| 46 | # set it ourselves. | ||
| 47 | master_doc = 'index' | ||
| 48 | |||
| 49 | # create substitution for project configuration variables | ||
| 50 | rst_prolog = """ | ||
| 51 | .. |project_name| replace:: %s | ||
| 52 | .. |copyright| replace:: %s | ||
| 53 | .. |author| replace:: %s | ||
| 54 | """ % (project, copyright, author) | ||
| 55 | |||
| 56 | # -- Options for HTML output ------------------------------------------------- | ||
| 57 | |||
| 58 | # The theme to use for HTML and HTML Help pages. See the documentation for | ||
| 59 | # a list of builtin themes. | ||
| 60 | # | ||
| 61 | html_theme = 'alabaster' | ||
| 62 | |||
| 63 | # Add any paths that contain custom static files (such as style sheets) here, | ||
| 64 | # relative to this directory. They are copied after the builtin static files, | ||
| 65 | # so a file named "default.css" will overwrite the builtin "default.css". | ||
| 66 | html_static_path = ['_static'] | ||
diff --git a/bitbake/doc/genindex.rst b/bitbake/doc/genindex.rst new file mode 100644 index 0000000000..a4af06f656 --- /dev/null +++ b/bitbake/doc/genindex.rst | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | ===== | ||
| 2 | Index | ||
| 3 | ===== | ||
diff --git a/bitbake/doc/index.rst b/bitbake/doc/index.rst new file mode 100644 index 0000000000..1cc9a4d849 --- /dev/null +++ b/bitbake/doc/index.rst | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | .. The Yocto Project documentation master file, created by | ||
| 2 | sphinx-quickstart on Mon Apr 13 09:38:33 2020. | ||
| 3 | You can adapt this file completely to your liking, but it should at least | ||
| 4 | contain the root `toctree` directive. | ||
| 5 | |||
| 6 | Welcome to Bitbake documentation! | ||
| 7 | ================================= | ||
| 8 | |||
| 9 | .. toctree:: | ||
| 10 | :maxdepth: 1 | ||
| 11 | |||
