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