diff options
author | Mathieu Bridon <bochecha@daitauha.fr> | 2017-12-08 10:31:04 +0100 |
---|---|---|
committer | Tristan Van Berkom <tristan.van.berkom@gmail.com> | 2017-12-20 21:03:17 +0000 |
commit | 917b09ef07bd83a78b2292f6259451459cfdd54c (patch) | |
tree | 2c3ed4ea4374c47e157f48bf39af34c09bee10d5 | |
parent | e807c705ea8356d9534cda2757816aa491d16091 (diff) | |
download | buildstream-project-name.tar.gz |
project: Export the name as a variableproject-name
This is often useful, for example when the main element needs to do
something with a path like /etc/%{project-name}/ .
-rw-r--r-- | buildstream/_project.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/buildstream/_project.py b/buildstream/_project.py index 279966da9..fc8fa06f9 100644 --- a/buildstream/_project.py +++ b/buildstream/_project.py @@ -233,6 +233,9 @@ class Project(): # Load base variables self._variables = _yaml.node_get(config, Mapping, 'variables') + # Add the project name as a default variable + self._variables['project-name'] = self.name + # Extend variables with automatic variables and option exports self._variables['max-jobs'] = multiprocessing.cpu_count() |