diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2019-12-03 22:05:07 -0500 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2019-12-05 16:52:22 -0500 |
commit | b87209946859a642f048391ca6cb6ef57edf0522 (patch) | |
tree | 6dea0d577b7c044a800f669c43db83a0cf8502ad /docs/markdown | |
parent | 691a74aec2a34540cce8c1a86f4874bd0814a65c (diff) | |
download | meson-b87209946859a642f048391ca6cb6ef57edf0522.zip meson-b87209946859a642f048391ca6cb6ef57edf0522.tar.gz meson-b87209946859a642f048391ca6cb6ef57edf0522.tar.bz2 |
find_program(): Add 'dirs' keyword argument
Fixes: #1576
Diffstat (limited to 'docs/markdown')
-rw-r--r-- | docs/markdown/Reference-manual.md | 3 | ||||
-rw-r--r-- | docs/markdown/snippets/find_program.md | 9 |
2 files changed, 12 insertions, 0 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md index dd0b3f4..9762955 100644 --- a/docs/markdown/Reference-manual.md +++ b/docs/markdown/Reference-manual.md @@ -701,6 +701,9 @@ Keyword arguments are the following: If the output is more complicated than that, the version checking will have to be done manually using [`run_command()`](#run_command). +- `dirs` *(since 0.53.0)* Extra list of absolute paths where to look for program + names. + Meson will also autodetect scripts with a shebang line and run them with the executable/interpreter specified in it both on Windows (because the command invocator will reject the command otherwise) and diff --git a/docs/markdown/snippets/find_program.md b/docs/markdown/snippets/find_program.md new file mode 100644 index 0000000..2bef824 --- /dev/null +++ b/docs/markdown/snippets/find_program.md @@ -0,0 +1,9 @@ +## Search directories for `find_program()` + +It is now possible to give a list of absolute paths where `find_program()` should +also search, using the `dirs` keyword argument. + +For example on Linux `/sbin` and `/usr/sbin` are not always in the `$PATH`: +```meson +prog = find_program('mytool', dirs : ['/usr/sbin', '/sbin']) +``` |