Debian Codegraph @

subprojects/meson-docs/docs/yaml/functions/install_subdir.yaml

raw
1 name: install_subdir
2 returns: void
3 description: |
4 Installs the entire given subdirectory and its contents from the
5 source tree to the location specified by the keyword argument
6 `install_dir`.
7
8 *(since 0.45.0, deprecated since 0.60.0)* If the subdirectory does not exist
9 in the source tree, an empty directory is created in the specified location.
10 A newly created subdirectory may only be created in the keyword argument
11 `install_dir`. There are a number of flaws with this method, and it was never
12 intentionally designed to work this way, please use [[install_emptydir]]
13 instead.
14
15 example: |
16 For a given directory `foo`:
17 ```text
18 foo/
19 bar/
20 file1
21 file2
22 ```
23 `install_subdir('foo', install_dir : 'share', strip_directory : false)` creates
24 ```text
25 share/
26 foo/
27 bar/
28 file1
29 file2
30 ```
31
32 `install_subdir('foo', install_dir : 'share', strip_directory : true)` creates
33 ```text
34 share/
35 bar/
36 file1
37 file2
38 ```
39
40 `install_subdir('foo/bar', install_dir : 'share', strip_directory : false)` creates
41 ```text
42 share/
43 bar/
44 file1
45 ```
46
47 `install_subdir('foo/bar', install_dir : 'share', strip_directory : true)` creates
48 ```text
49 share/
50 file1
51 ```
52
53 `install_subdir('new_directory', install_dir : 'share')` creates
54 ```text
55 share/
56 new_directory/
57 ```
58
59 warnings:
60 - the `install_mode` kwarg ignored integer values between 0.59.0 -- 1.1.0.
61
62 posargs:
63 subdir_name:
64 type: str
65 description: The sub-directory to install
66
67 kwargs:
68 install_mode:
69 type: list[str | int | bool]
70 since: 0.47.0
71 description: |
72 Specify the file mode in symbolic format
73 and optionally the owner/uid and group/gid for the installed files.
74
75 See the `install_mode` kwarg of [[install_data]] for more information.
76
77 install_tag:
78 type: str
79 since: 0.60.0
80 description: |
81 A string used by the `meson install --tags` command
82 to install only a subset of the files. By default these files have no install
83 tag which means they are not being installed when `--tags` argument is specified.
84
85 exclude_files:
86 type: list[str]
87 description: |
88 A list of file names that should not be installed.
89 Names are interpreted as paths relative to the `subdir_name` location.
90
91 exclude_directories:
92 type: list[str]
93 since: 0.47.0
94 description: |
95 A list of directory names that should not be installed.
96 Names are interpreted as paths relative to the `subdir_name` location.
97
98 install_dir:
99 type: str
100 description: Where to install to.
101
102 strip_directory:
103 type: bool
104 since: 0.45.0
105 default: false
106 description: |
107 Install directory contents.
108 If `strip_directory=true` only the last component of the source path is used.
109
110 follow_symlinks:
111 type: bool
112 since: 1.3.0
113 default: true
114 description: |
115 If true, dereferences links and copies their target instead. The default
116 value will become false in the future.