aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorCharles Brunet <charles.brunet@optelgroup.com>2023-02-09 07:19:52 -0500
committerXavier Claessens <xclaesse@gmail.com>2023-02-14 10:50:10 -0500
commit04f233a80d570c90c1a152114cbf3bdad6a61607 (patch)
tree3910652b33a1867f8ec1cf26f1c5a495a9d8320f /docs
parent70286a93b00868d705647dcbfbd82ab0822040e8 (diff)
downloadmeson-04f233a80d570c90c1a152114cbf3bdad6a61607.zip
meson-04f233a80d570c90c1a152114cbf3bdad6a61607.tar.gz
meson-04f233a80d570c90c1a152114cbf3bdad6a61607.tar.bz2
allow install script to run in dry-run mode
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/snippets/run_script_dry_run.md8
-rw-r--r--docs/yaml/builtins/meson.yaml12
2 files changed, 20 insertions, 0 deletions
diff --git a/docs/markdown/snippets/run_script_dry_run.md b/docs/markdown/snippets/run_script_dry_run.md
new file mode 100644
index 0000000..aee32c7
--- /dev/null
+++ b/docs/markdown/snippets/run_script_dry_run.md
@@ -0,0 +1,8 @@
+## Allow custom install scripts to run with `--dry-run` option
+
+An new `dry_run` keyword is added to `meson.add_install_script()`
+to allow a custom install script to run when meson is invoked
+with `meson install --dry-run`.
+
+In dry run mode, the `MESON_INSTALL_DRY_RUN` environment variable
+is set.
diff --git a/docs/yaml/builtins/meson.yaml b/docs/yaml/builtins/meson.yaml
index 1dd746f..5ef445d 100644
--- a/docs/yaml/builtins/meson.yaml
+++ b/docs/yaml/builtins/meson.yaml
@@ -64,6 +64,9 @@ methods:
*(since 0.54.0)* If `meson install` is called with the `--quiet` option, the
environment variable `MESON_INSTALL_QUIET` will be set.
+ *(since 1.1.0)* If `meson install` is called with the `--dry-run` option, the
+ environment variable `MESON_INSTALL_DRY_RUN` will be set.
+
Meson uses the `DESTDIR` environment variable as set by the
inherited environment to determine the (temporary) installation
location for files. Your install script must be aware of this while
@@ -125,6 +128,15 @@ methods:
to install only a subset of the files.
By default the script has no install tag which means it is not being run when
`meson install --tags` argument is specified.
+
+ dry_run:
+ type: bool
+ since: 1.1.0
+ default: false
+ description: |
+ If `true` the script will be run even if `--dry-run` option is provided to
+ the `meson install` command. The script can use the `MESON_INSTALL_DRY_RUN`
+ variable to determine if it is in dry run mode or not.
- name: add_postconf_script
returns: void