diff options
author | Iñigo Martínez <inigomartinez@gmail.com> | 2021-09-13 23:35:40 +0200 |
---|---|---|
committer | Iñigo Martínez <inigomartinez@gmail.com> | 2021-10-25 15:56:32 +0200 |
commit | ee00d22bd526f938b6499739014c8d81b8a9f6f3 (patch) | |
tree | 6fe155e891c27c642f46e9486a8d208ba1311015 /man | |
parent | 131cd41d343e76c13b825262fcb47d9e94c70b32 (diff) | |
download | gvfs-ee00d22bd526f938b6499739014c8d81b8a9f6f3.tar.gz |
build: Use dictionary for easier unpack
Dictionaries can be used to ease `foreach` statements due to their
natural unpacking system[0].
This system has been used to ease some loops.
[0] https://mesonbuild.com/Syntax.html#foreach-with-a-dictionary
Diffstat (limited to 'man')
-rw-r--r-- | man/meson.build | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/man/meson.build b/man/meson.build index a333194a..f64da677 100644 --- a/man/meson.build +++ b/man/meson.build @@ -14,20 +14,20 @@ xsltproc_cmd = [ '@INPUT@', ] -mans = [ - ['gvfs', '7'], - ['gvfsd', '1'], - ['gvfsd-fuse', '1'], - ['gvfsd-metadata', '1'], -] +mans = { + 'gvfs': '7', + 'gvfsd': '1', + 'gvfsd-fuse': '1', + 'gvfsd-metadata': '1', +} -foreach man: mans +foreach program, section: mans custom_target( - man[0] + man[1], - input: man[0] + '.xml', - output: '@BASENAME@.' + man[1], + program + section, + input: program + '.xml', + output: '@BASENAME@.' + section, command: xsltproc_cmd, install: true, - install_dir: gvfs_mandir / ('man' + man[1]), + install_dir: gvfs_mandir / ('man' + section), ) endforeach |