aboutsummaryrefslogtreecommitdiff
path: root/docs/markdown/snippets
diff options
context:
space:
mode:
authorXavier Claessens <xavier.claessens@collabora.com>2021-03-01 22:05:19 -0500
committerXavier Claessens <xclaesse@gmail.com>2021-03-18 08:41:21 -0400
commit3990754bf55727ef5593769b48f0a03c6b7a3671 (patch)
treeb00148182600db24bd01b0041de5274b15437433 /docs/markdown/snippets
parent848e360450c397f1dcfc4d8d3f614df05806699a (diff)
downloadmeson-3990754bf55727ef5593769b48f0a03c6b7a3671.zip
meson-3990754bf55727ef5593769b48f0a03c6b7a3671.tar.gz
meson-3990754bf55727ef5593769b48f0a03c6b7a3671.tar.bz2
Allow add_dist_script() in subprojects
Fixes: #8440.
Diffstat (limited to 'docs/markdown/snippets')
-rw-r--r--docs/markdown/snippets/dist_script.md14
1 files changed, 14 insertions, 0 deletions
diff --git a/docs/markdown/snippets/dist_script.md b/docs/markdown/snippets/dist_script.md
new file mode 100644
index 0000000..93b97aa
--- /dev/null
+++ b/docs/markdown/snippets/dist_script.md
@@ -0,0 +1,14 @@
+## `meson.add_dist_script()` allowd in subprojects
+
+`meson.add_dist_script()` can now be invoked from a subproject, it was a hard
+error in earlier versions. Subproject dist scripts will only be executed
+when running `meson dist --include-subprojects`. `MESON_PROJECT_SOURCE_ROOT`,
+`MESON_PROJECT_BUILD_ROOT` and `MESON_PROJECT_DIST_ROOT` environment variables
+are set when dist scripts are run. They are identical to `MESON_SOURCE_ROOT`,
+`MESON_BUILD_ROOT` and `MESON_DIST_ROOT` for main project scripts, but for
+subproject scripts they have the path to the root of the subproject appended,
+usually `subprojects/<subproject-name>`.
+
+Note that existing dist scripts likely need to be modified to use those new
+environment variables instead of `MESON_DIST_ROOT` to work properly when used
+from a subproject.