• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1if get_option('gtk_doc')
2  subdir('xml')
3
4  ignore_headers = [
5    'fam',
6    'fen',
7    'gdbus-2.0',
8    'gvdb',
9    'inotify',
10    'kqueue',
11    'libasyncns',
12    'tests',
13    'win32',
14    'xdgmime',
15    'gappinfoprivate.h',
16    'gapplicationimpl.h',
17    'gasynchelper.h',
18    'gcontenttypeprivate.h',
19    'gcontextspecificgroup.h',
20    'gcredentialsprivate.h',
21    'gdbus-daemon-generated.h',
22    'gdbusactiongroup-private.h',
23    'gdbusauth.h',
24    'gdbusauthmechanismanon.h',
25    'gdbusauthmechanismexternal.h',
26    'gdbusauthmechanism.h',
27    'gdbusauthmechanismsha1.h',
28    'gdbusdaemon.h',
29    'gdbusprivate.h',
30    'gdelayedsettingsbackend.h',
31    'gdocumentportal.h',
32    'gdummyfile.h',
33    'gdummyproxyresolver.h',
34    'gdummytlsbackend.h',
35    'gfileattribute-priv.h',
36    'gfileinfo-priv.h',
37    'ghttpproxy.h',
38    'giomodule-priv.h',
39    'gioprivate.h',
40    'giowin32-priv.h',
41    'gio_probes.h',
42    'gio_trace.h',
43    'gio-tool.h',
44    'glocaldirectorymonitor.h',
45    'glocalfileenumerator.h',
46    'glocalfile.h',
47    'glocalfileinfo.h',
48    'glocalfileinputstream.h',
49    'glocalfileiostream.h',
50    'glocalfilemonitor.h',
51    'glocalfileoutputstream.h',
52    'glocalvfs.h',
53    'gmountprivate.h',
54    'gnativevolumemonitor.h',
55    'gnetworkingprivate.h',
56    'gnetworkmonitorbase.h',
57    'gnetworkmonitornetlink.h',
58    'gnetworkmonitornm.h',
59    'gnetworkmonitorportal.h',
60    'gnotificationbackend.h',
61    'gnotification-private.h',
62    'gopenuriportal.h',
63    'gpollfilemonitor.h',
64    'gportalsupport.h',
65    'gproxyresolverportal.h',
66    'gregistrysettingsbackend.h',
67    'gresourcefile.h',
68    'gsettingsbackendinternal.h',
69    'gsettings-mapping.h',
70    'gsettingsschema-internal.h',
71    'gsocketinputstream.h',
72    'gsocketoutputstream.h',
73    'gsocks4aproxy.h',
74    'gsocks4proxy.h',
75    'gsocks5proxy.h',
76    'gsubprocesslauncher-private.h',
77    'gthreadedresolver.h',
78    'gtrashportal.h',
79    'gunionvolumemonitor.h',
80    'gunixmount.h',
81    'gunixresolver.h',
82    'gunixvolume.h',
83    'gunixvolumemonitor.h',
84    'gwin32networkmonitor.h',
85    'gwin32appinfo.h',
86    'gwin32mount.h',
87    'gwin32resolver.h',
88    'gwin32volumemonitor.h',
89    'thumbnail-verify.h',
90    'xdp-dbus.h',
91  ]
92
93  sections_files = files('gio-sections-common.txt')
94
95  if host_system == 'windows'
96    ignore_headers += [
97      'gfiledescriptorbased.h',
98      'gunixconnection.h',
99      'gunixcredentialsmessage.h',
100      'gunixmounts.h',
101      'gunixfdlist.h',
102      'gunixfdmessage.h',
103      'gunixinputstream.h',
104      'gunixoutputstream.h',
105      'gunixsocketaddress.h',
106      'gdesktopappinfo.h',
107      'gosxappinfo.h',
108    ]
109    sections_files += files('gio-sections-win32.txt')
110    platform_file = files('gio-docs-win32.xml')
111  else
112    if glib_have_cocoa
113      ignore_headers += ['gdesktopappinfo.h']
114    else
115      ignore_headers += ['gosxappinfo.h']
116    endif
117
118    ignore_headers += [
119      'gwin32inputstream.h',
120      'gwin32outputstream.h',
121      'gwin32registrykey.h',
122    ]
123    platform_file = files('gio-docs-unix.xml')
124  endif
125
126  ignore_sources = [
127    'kqueue',
128    'tests',
129    'gdbus-daemon-generated.c',
130    'xdp-dbus.c',
131  ]
132
133  # FIXME: ExampleAnimal docs aren't built
134
135  docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
136  version_conf = configuration_data()
137  version_conf.set('VERSION', meson.project_version())
138  configure_file(
139    input: 'version.xml.in',
140    output: 'version.xml',
141    configuration: version_conf
142  )
143
144  # FIXME: configure_file() does not support more than one file in input
145  # argument. If input argument is omitted then meson checks that all items in
146  # the command array are strings. But if we have an input then extra files
147  # can be passed in command array.
148  # See https://github.com/mesonbuild/meson/issues/5893
149  concat_files_helper = find_program('concat-files-helper.py')
150  configure_file(
151    output : 'gio-sections.txt',
152    input : sections_files[0],
153    command : [concat_files_helper, '@OUTPUT@'] + sections_files,
154  )
155
156  configure_file(
157    output : 'gio-docs-platform.xml',
158    input : platform_file,
159    copy : true,
160  )
161
162  gnome.gtkdoc('gio',
163    main_xml : 'gio-docs.xml',
164    namespace : 'g',
165    mode : 'none',
166    dependencies : [libgio_dep, libgobject_dep, libglib_dep],
167    src_dir : 'gio',
168    scan_args : gtkdoc_common_scan_args + [
169      '--rebuild-types',
170      '--ignore-headers=' + ' '.join(ignore_headers),
171    ],
172    mkdb_args : [
173      '--ignore-files=' + ' '.join(ignore_sources),
174    ],
175    content_files : [
176      'overview.xml',
177      'migrating-posix.xml',
178      'migrating-gnome-vfs.xml',
179      'migrating-gconf.xml',
180      'migrating-gdbus.xml',
181      'gio-querymodules.xml',
182      'glib-compile-schemas.xml',
183      'glib-compile-resources.xml',
184      'gapplication.xml',
185      'gsettings.xml',
186      'gresource.xml',
187      'gdbus.xml',
188      'gdbus-codegen.xml',
189    ],
190    expand_content_files : [
191      'overview.xml',
192      'migrating-posix.xml',
193      'migrating-gnome-vfs.xml',
194      'migrating-gconf.xml',
195      'migrating-gdbus.xml',
196      'gdbus-codegen.xml',
197    ],
198    html_assets : [
199      'gvfs-overview.png',
200      'menu-example.png',
201      'menu-model.png',
202    ],
203    fixxref_args: [
204      '--html-dir=' + docpath,
205      '--extra-dir=' + join_paths('gio', '..', 'glib', 'html'),
206      '--extra-dir=' + join_paths('gio', '..', 'gobject', 'html'),
207    ],
208    install: true
209  )
210endif
211
212
213if get_option('man')
214  manpages = ['gapplication', 'gio-querymodules', 'glib-compile-schemas',
215              'glib-compile-resources', 'gsettings', 'gresource', 'gdbus',
216              'gio', 'gdbus-codegen']
217  foreach page : manpages
218    custom_target(page + '-man',
219      input: page + '.xml',
220      output: page + '.1',
221      command: xsltproc_command,
222      install: true,
223      install_dir: man1_dir)
224  endforeach
225endif
226