aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2018-07-18 17:11:57 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2018-08-27 23:35:29 +0300
commitfb770e1e3d17d548c34817001733f2a13f24ce9f (patch)
tree7e9bf40d6ff7cc23256ec913fb831b35be126906 /docs
parent1ffc8de5e8cc79dbaa54fd1ac02b6b4c5edac7a1 (diff)
downloadmeson-fb770e1e3d17d548c34817001733f2a13f24ce9f.zip
meson-fb770e1e3d17d548c34817001733f2a13f24ce9f.tar.gz
meson-fb770e1e3d17d548c34817001733f2a13f24ce9f.tar.bz2
Add support for custom dist scripts.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md9
-rw-r--r--docs/markdown/Reference-tables.md2
-rw-r--r--docs/markdown/snippets/distscript.md12
3 files changed, 23 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 6d2b2da..e830557 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -1416,6 +1416,15 @@ The `meson` object allows you to introspect various properties of the
system. This object is always mapped in the `meson` variable. It has
the following methods.
+- `add_dist_script` causes the script given as argument to run during
+ `dist` operation after the distribution source has been generated
+ but before it is archived. Note that this runs the script file that
+ is in the _staging_ directory, not the one in the source
+ directory. If the script file can not be found in the staging
+ directory, it is a hard error. This command can only invoked from
+ the main project, calling it from a subproject is a hard
+ error. Available since 0.48.0.
+
- `add_install_script(script_name, arg1, arg2, ...)` causes the script
given as an argument to be run during the install step, this script
will have the environment variables `MESON_SOURCE_ROOT`,
diff --git a/docs/markdown/Reference-tables.md b/docs/markdown/Reference-tables.md
index 9aa8609..46bcc3d 100644
--- a/docs/markdown/Reference-tables.md
+++ b/docs/markdown/Reference-tables.md
@@ -33,6 +33,8 @@ These are return values of the `get_id` method in a compiler object.
| MESON_BUILD_ROOT | Absolute path to the build dir |
| MESONINTROSPECT | Command to run to run the introspection command, may be of the form `python /path/to/meson introspect`, user is responsible for splitting the path if necessary. |
| MESON_SUBDIR | Current subdirectory, only set for `run_command` |
+| MESON_DIST_ROOT | Points to the root of the staging directory, only set when running `dist` scripts |
+
## CPU families
diff --git a/docs/markdown/snippets/distscript.md b/docs/markdown/snippets/distscript.md
new file mode 100644
index 0000000..37d05fe
--- /dev/null
+++ b/docs/markdown/snippets/distscript.md
@@ -0,0 +1,12 @@
+## Dist scripts
+
+You can now specify scripts that are run as part of the `dist`
+target. An example usage would go like this:
+
+```meson
+project('foo', 'c')
+
+# other stuff here
+
+meson.add_dist_script('dist_cleanup.py')
+```