Imported Upstream version 2.55.1
[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   ]
38
39   ignore_decorators = [
40     'GLIB_VAR',
41     'G_GNUC_INTERNAL',
42     'G_GNUC_WARN_UNUSED_RESULT',
43     'GLIB_AVAILABLE_IN_ALL',
44     'GLIB_AVAILABLE_IN_2_26',
45     'GLIB_AVAILABLE_IN_2_28',
46     'GLIB_AVAILABLE_IN_2_30',
47     'GLIB_AVAILABLE_IN_2_32',
48     'GLIB_AVAILABLE_IN_2_34',
49     'GLIB_AVAILABLE_IN_2_36',
50     'GLIB_AVAILABLE_IN_2_38',
51     'GLIB_AVAILABLE_IN_2_40',
52     'GLIB_AVAILABLE_IN_2_42',
53     'GLIB_AVAILABLE_IN_2_44',
54     'GLIB_AVAILABLE_IN_2_46',
55     'GLIB_AVAILABLE_IN_2_48',
56     'GLIB_AVAILABLE_IN_2_50',
57     'GLIB_AVAILABLE_IN_2_52',
58     'GLIB_AVAILABLE_IN_2_54',
59     'GLIB_AVAILABLE_IN_2_56',
60     'GLIB_DEPRECATED_IN_2_26',
61     'GLIB_DEPRECATED_IN_2_26_FOR',
62     'GLIB_DEPRECATED_IN_2_28',
63     'GLIB_DEPRECATED_IN_2_28_FOR',
64     'GLIB_DEPRECATED_IN_2_30',
65     'GLIB_DEPRECATED_IN_2_30_FOR',
66     'GLIB_DEPRECATED_IN_2_32',
67     'GLIB_DEPRECATED_IN_2_32_FOR',
68     'GLIB_DEPRECATED_IN_2_34',
69     'GLIB_DEPRECATED_IN_2_34_FOR',
70     'GLIB_DEPRECATED_IN_2_36',
71     'GLIB_DEPRECATED_IN_2_36_FOR',
72     'GLIB_DEPRECATED_IN_2_38',
73     'GLIB_DEPRECATED_IN_2_38_FOR',
74     'GLIB_DEPRECATED_IN_2_40',
75     'GLIB_DEPRECATED_IN_2_40_FOR',
76     'GLIB_DEPRECATED_IN_2_42',
77     'GLIB_DEPRECATED_IN_2_42_FOR',
78     'GLIB_DEPRECATED_IN_2_44',
79     'GLIB_DEPRECATED_IN_2_44_FOR',
80     'GLIB_DEPRECATED_IN_2_46',
81     'GLIB_DEPRECATED_IN_2_46_FOR',
82     'GLIB_DEPRECATED_IN_2_48',
83     'GLIB_DEPRECATED_IN_2_48_FOR',
84     'GLIB_DEPRECATED_IN_2_50',
85     'GLIB_DEPRECATED_IN_2_50_FOR',
86     'GLIB_DEPRECATED_IN_2_52',
87     'GLIB_DEPRECATED_IN_2_52_FOR',
88     'GLIB_DEPRECATED_IN_2_54',
89     'GLIB_DEPRECATED_IN_2_54_FOR',
90     'GLIB_DEPRECATED_IN_2_56',
91     'GLIB_DEPRECATED_IN_2_56_FOR',
92   ]
93
94   docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
95   version_conf = configuration_data()
96   version_conf.set('GLIB_VERSION', meson.project_version())
97   configure_file(
98     input: 'version.xml.in',
99     output: 'version.xml',
100     configuration: version_conf
101   )
102
103   gnome.gtkdoc('glib',
104                main_xml : 'glib-docs.xml',
105                namespace : 'g',
106                mode : 'none',
107                src_dir : [ 'glib', 'gmodule' ],
108                dependencies : libglib_dep,
109                scan_args : [
110                  '--rebuild-types',
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                  # TODO: gobject/gio extra dirs
144                ],
145                install: true)
146 endif
147
148 if get_option('man')
149   manpages = ['glib-gettextize', 'gtester', 'gtester-report']
150   foreach page : manpages
151     custom_target(page + '-man',
152       input: page + '.xml',
153       output: page + '.1',
154       command: xsltproc_command,
155       install: true,
156       install_dir: man1_dir)
157   endforeach
158 endif