aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorAleksey Filippov <alekseyf@google.com>2018-01-18 16:44:06 +0000
committerAleksey Filippov <alekseyf@google.com>2018-02-05 01:28:07 +0000
commit8ca3cc0c3db481b467233151e481a190cbb84c31 (patch)
treee3f247cfdaa3db28ef073d5f6513fbae1da2fb80 /docs
parent86ee89b400fc4acbb506cc44d5a287958397edf9 (diff)
downloadmeson-8ca3cc0c3db481b467233151e481a190cbb84c31.zip
meson-8ca3cc0c3db481b467233151e481a190cbb84c31.tar.gz
meson-8ca3cc0c3db481b467233151e481a190cbb84c31.tar.bz2
Add elide_directory keyword for install_subdir() function
If elide_directory=true install_subdir() installs directory contents instead of directory itself, eliding name of the source directory. Closes #2869.
Diffstat (limited to 'docs')
-rw-r--r--docs/markdown/Reference-manual.md28
-rw-r--r--docs/markdown/snippets/install_subdir-elide_directory.md4
2 files changed, 31 insertions, 1 deletions
diff --git a/docs/markdown/Reference-manual.md b/docs/markdown/Reference-manual.md
index 390371b..e5fcb67 100644
--- a/docs/markdown/Reference-manual.md
+++ b/docs/markdown/Reference-manual.md
@@ -772,7 +772,7 @@ installed with a `.gz` suffix.
### install_subdir()
``` meson
- void install_subdir(subdir_name, install_dir : ..., exclude_files : ..., exclude_directories : ...)
+ void install_subdir(subdir_name, install_dir : ..., exclude_files : ..., exclude_directories : ..., elide_directory : ...)
```
Installs the entire given subdirectory and its contents from the
@@ -786,6 +786,32 @@ The following keyword arguments are supported:
- `exclude_directories`: a list of directory names that should not be installed.
Names are interpreted as paths relative to the `subdir_name` location.
- `install_dir`: the location to place the installed subdirectory.
+- `elide_directory`: install directory contents. `elide_directory=false` by default.
+ Since 0.45.0
+
+For a given directory `foo`:
+```
+foo/
+ bar/
+ file1
+ file2
+```
+`install_subdir('foo', install_dir : 'share', elide_directory : false)` creates
+```
+share/
+ foo/
+ bar/
+ file1
+ file2
+```
+
+`install_subdir('foo', install_dir : 'share', elide_directory : true)` creates
+```
+share/
+ bar/
+ file1
+ file2
+```
### is_variable()
diff --git a/docs/markdown/snippets/install_subdir-elide_directory.md b/docs/markdown/snippets/install_subdir-elide_directory.md
new file mode 100644
index 0000000..516a286
--- /dev/null
+++ b/docs/markdown/snippets/install_subdir-elide_directory.md
@@ -0,0 +1,4 @@
+## install_subdir() supports elide_directory
+
+If elide_directory=true install_subdir() installs directory contents
+instead of directory itself, eliding name of the source directory.