From ee00d22bd526f938b6499739014c8d81b8a9f6f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?I=C3=B1igo=20Mart=C3=ADnez?= Date: Mon, 13 Sep 2021 23:35:40 +0200 Subject: 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 --- man/meson.build | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'man') 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 -- cgit v1.2.1