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