Imported Upstream version 2.59.0
[platform/upstream/glib.git] / docs / reference / glib / meson.build
1 if get_option('gtk_doc')
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     'grcboxprivate.h',
12     'gstdioprivate.h',
13     'gthreadprivate.h',
14     'gunibreak.h',
15     'gunicomp.h',
16     'gunidecomp.h',
17     'gunichartables.h',
18     'glib_probes.h',
19     'glib_trace.h',
20     'libcharset.h',
21     'gdebug.h',
22     'gprintfint.h',
23     'gmirroringtable.h',
24     'gscripttable.h',
25     'glib-mirroring-tab',
26     'gnulib',
27     'pcre',
28     'update-pcre',
29     'gbytesprivate.h',
30     'gvariant-internal.h',
31     'gvariant-serialiser.h',
32     'gvariant-core.h',
33     'gvarianttypeinfo.h',
34     'gwakeup.h',
35     'gtranslit-data.h',
36     'glib-init.h',
37     'gconstructor.h',
38     'valgrind.h',
39     'gutilsprivate.h',
40     'gvalgrind.h',
41   ]
42
43   ignore_decorators = [
44     'GLIB_VAR',
45     'G_GNUC_INTERNAL',
46     'G_GNUC_WARN_UNUSED_RESULT',
47     'GLIB_AVAILABLE_IN_ALL',
48     'GLIB_AVAILABLE_IN_2_26',
49     'GLIB_AVAILABLE_IN_2_28',
50     'GLIB_AVAILABLE_IN_2_30',
51     'GLIB_AVAILABLE_IN_2_32',
52     'GLIB_AVAILABLE_IN_2_34',
53     'GLIB_AVAILABLE_IN_2_36',
54     'GLIB_AVAILABLE_IN_2_38',
55     'GLIB_AVAILABLE_IN_2_40',
56     'GLIB_AVAILABLE_IN_2_42',
57     'GLIB_AVAILABLE_IN_2_44',
58     'GLIB_AVAILABLE_IN_2_46',
59     'GLIB_AVAILABLE_IN_2_48',
60     'GLIB_AVAILABLE_IN_2_50',
61     'GLIB_AVAILABLE_IN_2_52',
62     'GLIB_AVAILABLE_IN_2_54',
63     'GLIB_AVAILABLE_IN_2_56',
64     'GLIB_DEPRECATED_IN_2_26',
65     'GLIB_DEPRECATED_IN_2_26_FOR',
66     'GLIB_DEPRECATED_IN_2_28',
67     'GLIB_DEPRECATED_IN_2_28_FOR',
68     'GLIB_DEPRECATED_IN_2_30',
69     'GLIB_DEPRECATED_IN_2_30_FOR',
70     'GLIB_DEPRECATED_IN_2_32',
71     'GLIB_DEPRECATED_IN_2_32_FOR',
72     'GLIB_DEPRECATED_IN_2_34',
73     'GLIB_DEPRECATED_IN_2_34_FOR',
74     'GLIB_DEPRECATED_IN_2_36',
75     'GLIB_DEPRECATED_IN_2_36_FOR',
76     'GLIB_DEPRECATED_IN_2_38',
77     'GLIB_DEPRECATED_IN_2_38_FOR',
78     'GLIB_DEPRECATED_IN_2_40',
79     'GLIB_DEPRECATED_IN_2_40_FOR',
80     'GLIB_DEPRECATED_IN_2_42',
81     'GLIB_DEPRECATED_IN_2_42_FOR',
82     'GLIB_DEPRECATED_IN_2_44',
83     'GLIB_DEPRECATED_IN_2_44_FOR',
84     'GLIB_DEPRECATED_IN_2_46',
85     'GLIB_DEPRECATED_IN_2_46_FOR',
86     'GLIB_DEPRECATED_IN_2_48',
87     'GLIB_DEPRECATED_IN_2_48_FOR',
88     'GLIB_DEPRECATED_IN_2_50',
89     'GLIB_DEPRECATED_IN_2_50_FOR',
90     'GLIB_DEPRECATED_IN_2_52',
91     'GLIB_DEPRECATED_IN_2_52_FOR',
92     'GLIB_DEPRECATED_IN_2_54',
93     'GLIB_DEPRECATED_IN_2_54_FOR',
94     'GLIB_DEPRECATED_IN_2_56',
95     'GLIB_DEPRECATED_IN_2_56_FOR',
96   ]
97
98   docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
99   version_conf = configuration_data()
100   version_conf.set('GLIB_VERSION', meson.project_version())
101   configure_file(
102     input: 'version.xml.in',
103     output: 'version.xml',
104     configuration: version_conf
105   )
106
107   gnome.gtkdoc('glib',
108                main_xml : 'glib-docs.xml',
109                namespace : 'g',
110                mode : 'none',
111                src_dir : [ 'glib', 'gmodule' ],
112                dependencies : libglib_dep,
113                scan_args : [
114                  '--deprecated-guards=G_DISABLE_DEPRECATED',
115                  '--ignore-decorators=' + '|'.join(ignore_decorators),
116                  '--ignore-headers=' + ' '.join(ignore_headers),
117                ],
118                content_files : [
119                  'cross.xml',
120                  'running.xml',
121                  'building.xml',
122                  'changes.xml',
123                  'compiling.xml',
124                  'programming.xml',
125                  'resources.xml',
126                  'regex-syntax.xml',
127                  'glib-gettextize.xml',
128                  'gtester.xml',
129                  'gtester-report.xml',
130                  'gvariant-varargs.xml',
131                  'gvariant-text.xml',
132                ],
133                expand_content_files : [
134                  'compiling.xml',
135                ],
136                html_assets : [
137                  'file-name-encodings.png',
138                  'mainloop-states.gif',
139                  'Sorted_binary_tree_breadth-first_traversal.svg',
140                  'Sorted_binary_tree_inorder.svg',
141                  'Sorted_binary_tree_postorder.svg',
142                  'Sorted_binary_tree_preorder.svg',
143                ],
144                fixxref_args: [
145                  '--html-dir=' + docpath,
146                ],
147                install: true)
148 endif
149
150 if get_option('man')
151   manpages = ['glib-gettextize', 'gtester', 'gtester-report']
152   foreach page : manpages
153     custom_target(page + '-man',
154       input: page + '.xml',
155       output: page + '.1',
156       command: xsltproc_command,
157       install: true,
158       install_dir: man1_dir)
159   endforeach
160 endif