From 3990754bf55727ef5593769b48f0a03c6b7a3671 Mon Sep 17 00:00:00 2001 From: Xavier Claessens Date: Mon, 1 Mar 2021 22:05:19 -0500 Subject: Allow add_dist_script() in subprojects Fixes: #8440. --- docs/markdown/snippets/dist_script.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 docs/markdown/snippets/dist_script.md (limited to 'docs/markdown/snippets') 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/`. + +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. -- cgit v1.1