Merge branch '1454-gvdb-corruption' into 'master'
[dconf.git] / docs / meson.build
blobd510464e12ffd1c68329fe4829a26d171c80252a
1 if get_option('gtk_doc')
2   gnome.gtkdoc(
3     'dconf',
4     main_xml: 'dconf-docs.xml',
5     src_dir: [
6       common_inc,
7       client_inc
8     ],
9     dependencies: libdconf_dep,
10     scan_args: '--rebuild-types',
11     gobject_typesfile: 'dconf.types',
12     install: true,
13     install_dir: join_paths(dconf_prefix, gnome.gtkdoc_html_dir('dconf')),
14   )
15 endif
17 if get_option('man')
18   xsltproc = find_program('xsltproc', required: false)
19   assert(xsltproc.found(), 'xsltproc is required for man generation')
21   xsltproc_cmd = [
22     xsltproc,
23     '--output', '@OUTPUT@',
24     '--nonet',
25     '--stringparam', 'man.output.quietly', '1',
26     '--stringparam', 'funcsynopsis.style', 'ansi',
27     '--stringparam', 'man.th.extra1.suppress', '1',
28     '--stringparam', 'man.authors.section.enabled', '0',
29     '--stringparam', 'man.copyright.section.enabled', '0',
30     'http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl',
31     '@INPUT@',
32   ]
34   mans = [
35     ['dconf-service.xml', 'dconf-service', '1'],
36     ['dconf-tool.xml', 'dconf', '1'],
37     ['dconf-overview.xml', 'dconf', '7'],
38   ]
40   foreach man: mans
41     output = '@0@.@1@'.format(man[1], man[2])
42     man_dir = 'man' + man[2]
44     custom_target(
45       output,
46       input: man[0],
47       output: output,
48       command: xsltproc_cmd,
49       install: true,
50       install_dir: join_paths(dconf_mandir, man_dir),
51     )
52   endforeach
53 endif