summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-06-12 13:59:12 -0400
committerTristan Van Berkom <tristan.vanberkom@codethink.co.uk>2018-06-12 17:38:26 -0400
commit4dfc8607172b217de844762e63474fff3b0ea131 (patch)
treecb1a8cf489c7939fbb1f39e31cc7813244ffabec
parentc900d42e51abbda36eef18aa3b18b937aa485a08 (diff)
downloadbuildstream-4dfc8607172b217de844762e63474fff3b0ea131.tar.gz
doc/source/examples.rst: Restructuring individual examples into an examples subdirectory
-rw-r--r--doc/Makefile1
-rw-r--r--doc/source/examples.rst4
-rw-r--r--doc/source/examples/flatpak-autotools.rst (renamed from doc/source/examples_flatpak_autotools.rst)14
3 files changed, 9 insertions, 10 deletions
diff --git a/doc/Makefile b/doc/Makefile
index 2bd07faae..dbb293449 100644
--- a/doc/Makefile
+++ b/doc/Makefile
@@ -96,6 +96,7 @@ html devhelp: templates $(SESSION_HTML)
PYTHONPATH=$(CURDIR)/../buildstream/plugins \
$(SPHINXBUILD) -b $@ $(ALLSPHINXOPTS) "$(BUILDDIR)/$@" \
$(wildcard source/*.rst) \
+ $(wildcard source/examples/*.rst) \
$(wildcard source/elements/*.rst) \
$(wildcard source/sources/*.rst)
@echo
diff --git a/doc/source/examples.rst b/doc/source/examples.rst
index e1511782b..aa100d007 100644
--- a/doc/source/examples.rst
+++ b/doc/source/examples.rst
@@ -1,6 +1,4 @@
-.. _examples:
-
Examples
========
This page contains documentation for real examples of BuildStream projects,
@@ -11,4 +9,4 @@ maintained and work as expected.
.. toctree::
:maxdepth: 1
- examples_flatpak_autotools
+ examples/flatpak-autotools
diff --git a/doc/source/examples_flatpak_autotools.rst b/doc/source/examples/flatpak-autotools.rst
index f2c66174d..78a3b9a24 100644
--- a/doc/source/examples_flatpak_autotools.rst
+++ b/doc/source/examples/flatpak-autotools.rst
@@ -22,7 +22,7 @@ project.conf
~~~~~~~~~~~~
The following is a simple :ref:`project <projectconf>` definition:
-.. literalinclude:: ../examples/flatpak-autotools/project.conf
+.. literalinclude:: ../../examples/flatpak-autotools/project.conf
:language: yaml
Here we use an :ref:`arch option <project_options_arch>` to allow
@@ -40,7 +40,7 @@ This is the :mod:`import <elements.import>` element used to import the
actual Flatpak SDK, it uses an :mod:`ostree <sources.ostree>` source to
download the Flatpak since these are hosted in OSTree repositories.
-.. literalinclude:: ../examples/flatpak-autotools/elements/base/sdk.bst
+.. literalinclude:: ../../examples/flatpak-autotools/elements/base/sdk.bst
:language: yaml
While declaring the :mod:`ostree <sources.ostree>` source, we specify a GPG
@@ -72,7 +72,7 @@ This is another :mod:`import <elements.import>` element, and it uses
the :mod:`local <sources.local>` source type so that we can stage files
literally stored in the same repository as the project.
-.. literalinclude:: ../examples/flatpak-autotools/elements/base/usrmerge.bst
+.. literalinclude:: ../../examples/flatpak-autotools/elements/base/usrmerge.bst
:language: yaml
The purpose of this element is simply to add the symlinks for
@@ -88,7 +88,7 @@ base.bst
~~~~~~~~
This is just a :mod:`stack <elements.stack>` element for convenience sake.
-.. literalinclude:: ../examples/flatpak-autotools/elements/base.bst
+.. literalinclude:: ../../examples/flatpak-autotools/elements/base.bst
:language: yaml
Often times you will have a more complex base to build things on, and it
@@ -102,7 +102,7 @@ hello.bst
Finally, we show an example of an :mod:`autotools <elements.autotools>` element
to build our sample "Hello World" program.
-.. literalinclude:: ../examples/flatpak-autotools/elements/hello.bst
+.. literalinclude:: ../../examples/flatpak-autotools/elements/hello.bst
:language: yaml
We use another :mod:`local <sources.local>` source to obtain the sample
@@ -128,7 +128,7 @@ To build the project, run :ref:`bst build <invoking_build>` in the
following way:
.. raw:: html
- :file: sessions/flatpak-autotools-build.html
+ :file: ../sessions/flatpak-autotools-build.html
Run the hello world program
@@ -141,4 +141,4 @@ To just run the program, run :ref:`bst shell <invoking_shell>` in the
following way:
.. raw:: html
- :file: sessions/flatpak-autotools-shell.html
+ :file: ../sessions/flatpak-autotools-shell.html