diff options
-rw-r--r-- | buildstream/plugins/elements/__init__.py | 0 | ||||
-rw-r--r-- | buildstream/plugins/sources/__init__.py | 0 | ||||
-rw-r--r-- | doc/Makefile | 24 | ||||
-rw-r--r-- | doc/source/index.rst | 32 | ||||
-rw-r--r-- | doc/source/plugin.rsttemplate | 4 |
5 files changed, 31 insertions, 29 deletions
diff --git a/buildstream/plugins/elements/__init__.py b/buildstream/plugins/elements/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/buildstream/plugins/elements/__init__.py diff --git a/buildstream/plugins/sources/__init__.py b/buildstream/plugins/sources/__init__.py new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/buildstream/plugins/sources/__init__.py diff --git a/doc/Makefile b/doc/Makefile index 70e0ced95..7d3b3d789 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -48,14 +48,16 @@ all: docs # from plugin documentation. # define plugin-doc-skeleton - @for file in $$(find ${1} -name "*.py"); do \ - base=$$(basename $$file); \ - modname=$${base%.py}; \ - echo -n "Generating ${2}/$${modname}.rst... "; \ - sed -e "s|@@MODULE@@|$${modname}|g" \ - source/plugin.rsttemplate > \ - ${2}/$${modname}.rst.tmp && \ - mv ${2}/$${modname}.rst.tmp ${2}/$${modname}.rst || exit 1; \ + @for file in $$(find ${1} -name "*.py"); do \ + base=$$(basename $$file); \ + module=${2}.$${base%.py}; \ + modname=$${base%.py}; \ + echo -n "Generating source/${2}/$${modname}.rst... "; \ + sed -e "s|@@MODULENAME@@|$${modname}|g" \ + -e "s|@@MODULE@@|$${module}|g" \ + source/plugin.rsttemplate > \ + source/${2}/$${modname}.rst.tmp && \ + mv source/${2}/$${modname}.rst.tmp source/${2}/$${modname}.rst || exit 1; \ echo "Done."; \ done endef @@ -66,13 +68,13 @@ apidoc: mkdir -p source/elements mkdir -p source/sources sphinx-apidoc --separate -o source $(CURDIR)/../buildstream - $(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/elements,source/elements) - $(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/sources,source/sources) + $(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/elements,elements) + $(call plugin-doc-skeleton,$(CURDIR)/../buildstream/plugins/sources,sources) # We set PYTHONPATH here because source/conf.py sys.modules hacks dont seem to help sphinx-build import the plugins .PHONY: docs docs: apidoc - PYTHONPATH=$(CURDIR)/../buildstream/plugins/sources:$(CURDIR)/../buildstream/plugins/elements \ + PYTHONPATH=$(CURDIR)/../buildstream/plugins \ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html \ $(wildcard source/*.rst) \ $(wildcard source/elements/*.rst) \ diff --git a/doc/source/index.rst b/doc/source/index.rst index 648edd06d..9fbed85d5 100644 --- a/doc/source/index.rst +++ b/doc/source/index.rst @@ -43,32 +43,32 @@ Elements General Elements ~~~~~~~~~~~~~~~~ -* :mod:`stack` - Symbolic Element for dependency grouping -* :mod:`import` - Import sources directly -* :mod:`compose` - Compose the output of multiple elements -* :mod:`script` - Run scripts to create output +* :mod:`stack <elements.stack>` - Symbolic Element for dependency grouping +* :mod:`import <elements.import>` - Import sources directly +* :mod:`compose <elements.compose>` - Compose the output of multiple elements +* :mod:`script <elements.script>` - Run scripts to create output Build Elements ~~~~~~~~~~~~~~ -* :mod:`manual` - Manual Build Element -* :mod:`autotools` - Autotools Build Element -* :mod:`cmake` - CMake Build Element -* :mod:`qmake` - QMake Build Element -* :mod:`distutils` - Python Distutils Build Element -* :mod:`makemaker` - Perl MakeMaker Build Element -* :mod:`modulebuild` - Perl Module::Build Build Element -* :mod:`meson` - Meson Build Element +* :mod:`manual <elements.manual>` - Manual Build Element +* :mod:`autotools <elements.autotools>` - Autotools Build Element +* :mod:`cmake <elements.cmake>` - CMake Build Element +* :mod:`qmake <elements.qmake>` - QMake Build Element +* :mod:`distutils <elements.distutils>` - Python Distutils Build Element +* :mod:`makemaker <elements.makemaker>` - Perl MakeMaker Build Element +* :mod:`modulebuild <elements.modulebuild>` - Perl Module::Build Build Element +* :mod:`meson <elements.meson>` - Meson Build Element Sources -------- The following source types are provided with BuildStream: -* :mod:`local` - A Source implementation for local files and directories -* :mod:`tar` - A Source implementation for tarballs -* :mod:`git` - A Source implementation for git -* :mod:`ostree` - A Source implementation for ostree +* :mod:`local <sources.local>` - A Source implementation for local files and directories +* :mod:`tar <sources.tar>` - A Source implementation for tarballs +* :mod:`git <sources.git>` - A Source implementation for git +* :mod:`ostree <sources.ostree>` - A Source implementation for ostree Core Framework diff --git a/doc/source/plugin.rsttemplate b/doc/source/plugin.rsttemplate index f9307fab3..11e090f8b 100644 --- a/doc/source/plugin.rsttemplate +++ b/doc/source/plugin.rsttemplate @@ -1,4 +1,4 @@ -@@MODULE@@ plugin -======================= +@@MODULENAME@@ plugin +============================================ .. automodule:: @@MODULE@@ |