Imported Upstream version 2.53.5
[platform/upstream/glib.git] / docs / reference / glib / meson.build
1 if get_option('with-docs') != 'no'
2   subdir('xml')
3
4   ignore_headers = [
5     'gallocator.h',
6     'gdatasetprivate.h',
7     'glibintl.h',
8     'gbsearcharray.h',
9     'glib-private.h',
10     'gmoduleconf.h',
11     'gthreadprivate.h',
12     'gunibreak.h',
13     'gunicomp.h',
14     'gunidecomp.h',
15     'gunichartables.h',
16     'glib_probes.h',
17     'glib_trace.h',
18     'libcharset.h',
19     'gdebug.h',
20     'gprintfint.h',
21     'gmirroringtable.h',
22     'gscripttable.h',
23     'glib-mirroring-tab',
24     'gnulib',
25     'pcre',
26     'update-pcre',
27     'gbytesprivate.h',
28     'gvariant-internal.h',
29     'gvariant-serialiser.h',
30     'gvariant-core.h',
31     'gvarianttypeinfo.h',
32     'gwakeup.h',
33     'gtranslit-data.h',
34     'glib-init.h',
35     'gconstructor.h',
36     'valgrind.h',
37   ]
38
39   docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
40   version_conf = configuration_data()
41   version_conf.set('GLIB_VERSION', meson.project_version())
42   configure_file(
43     input: 'version.xml.in',
44     output: 'version.xml',
45     configuration: version_conf
46   )
47
48   gnome.gtkdoc('glib',
49                main_xml : 'glib-docs.xml',
50                namespace : 'g',
51                mode : 'none',
52                src_dir : [ 'glib', 'gmodule' ],
53                dependencies : libglib_dep,
54                scan_args : [
55                  '--rebuild-types',
56                  '--deprecated-guards=G_DISABLE_DEPRECATED',
57                  '--ignore-decorators=GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT',
58                  '--ignore-headers=' + ' '.join(ignore_headers),
59                ],
60                content_files : [
61                  'cross.xml',
62                  'running.xml',
63                  'building.xml',
64                  'changes.xml',
65                  'compiling.xml',
66                  'programming.xml',
67                  'resources.xml',
68                  'regex-syntax.xml',
69                  'glib-gettextize.xml',
70                  'gtester.xml',
71                  'gtester-report.xml',
72                  'gvariant-varargs.xml',
73                  'gvariant-text.xml',
74                ],
75                expand_content_files : [
76                  'compiling.xml',
77                ],
78                html_assets : [
79                  'file-name-encodings.png',
80                  'mainloop-states.gif',
81                  'Sorted_binary_tree_breadth-first_traversal.svg',
82                  'Sorted_binary_tree_inorder.svg',
83                  'Sorted_binary_tree_postorder.svg',
84                  'Sorted_binary_tree_preorder.svg',
85                ],
86                fixxref_args: [
87                  '--html-dir=' + docpath,
88                  # TODO: gobject/gio extra dirs
89                ],
90                install: true)
91 endif
92
93 if get_option('with-man') != 'no' and xsltproc.found()
94   manpages = ['glib-gettextize', 'gtester', 'gtester-report']
95   foreach page : manpages
96     custom_target(page + '-man',
97       input: page + '.xml',
98       output: page + '.1',
99       command: xsltproc_command,
100       install: true,
101       install_dir: man1_dir)
102   endforeach
103 endif