summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTiago Gomes <tiago.gomes@codethink.co.uk>2018-09-10 15:10:50 +0100
committerTiago Gomes <tiago.avv@gmail.com>2018-09-14 15:43:47 +0000
commit06001fefa9d1112e4aa440513cd118cd7e64bc07 (patch)
tree00f31005634abf33fc8927438e59b9826168e5d5
parent4aa0dd0b7eb2d047900cbe5a38449ca1c2902946 (diff)
downloadbuildstream-06001fefa9d1112e4aa440513cd118cd7e64bc07.tar.gz
docs: document protected variables
And remove then from the defaults as they are dynamically set by BuildStream.
-rw-r--r--buildstream/data/projectconfig.yaml15
-rw-r--r--doc/source/format_declaring.rst22
2 files changed, 22 insertions, 15 deletions
diff --git a/buildstream/data/projectconfig.yaml b/buildstream/data/projectconfig.yaml
index 039bcca2d..247a4536a 100644
--- a/buildstream/data/projectconfig.yaml
+++ b/buildstream/data/projectconfig.yaml
@@ -20,21 +20,7 @@ fail-on-overlap: False
# Variable Configuration
#
variables:
-
- # Maximum number of parallel build processes within a given
- # build, support for this is conditional on the element type
- # and the build system used (any element using 'make' can
- # implement this).
- #
- # Note: this value defaults to the number of cores available
- max-jobs: 4
-
- # Note: These variables are defined later on in element.py and _project.py
- element-name: ""
- project-name: ""
-
# Path configuration, to be used in build instructions.
- #
prefix: "/usr"
exec_prefix: "%{prefix}"
bindir: "%{exec_prefix}/bin"
@@ -93,7 +79,6 @@ variables:
find "%{install-root}" -name '*.pyc' -exec \
dd if=/dev/zero of={} bs=1 count=4 seek=4 conv=notrunc ';'
-
# Base sandbox environment, can be overridden by plugins
environment:
PATH: /usr/bin:/bin:/usr/sbin:/sbin
diff --git a/doc/source/format_declaring.rst b/doc/source/format_declaring.rst
index 4631ee3e8..a809676fc 100644
--- a/doc/source/format_declaring.rst
+++ b/doc/source/format_declaring.rst
@@ -420,3 +420,25 @@ dependency and that all referenced variables are declared, the following is fine
install-commands:
- |
%{make-install} RELEASE_TEXT="%{release-text}"
+
+
+Variables declared by BuildStream
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+BuildStream declares a set of :ref:`builtin <project_builtin_defaults>`
+variables that may be overridden. In addition, the following
+read-only variables are also dynamically declared by BuildStream:
+
+* ``element-name``
+
+ The name of the element being processed (e.g base/alpine.bst).
+
+* ``project-name``
+
+ The name of project where BuildStream is being used.
+
+* ``max-jobs``
+
+ Maximum number of parallel build processes within a given
+ build, support for this is conditional on the element type
+ and the build system used (any element using 'make' can
+ implement this).