doc: Split API reference per platform

We can only include win32 APIs when building for Windows because gtkdoc
needs to compile the GObject classes for introspection.
This commit is contained in:
Xavier Claessens
2019-07-09 13:25:49 -04:00
parent e8a123059f
commit 255f64cad8
7 changed files with 174 additions and 123 deletions

View File

@@ -81,15 +81,17 @@ if get_option('gtk_doc')
'gunixresolver.h',
'gunixvolume.h',
'gunixvolumemonitor.h',
'gwin32networkmonitor.h',
'gwin32appinfo.h',
'gwin32mount.h',
'gwin32registrykey.h',
'gwin32resolver.h',
'gwin32volumemonitor.h',
'thumbnail-verify.h',
'xdp-dbus.h',
]
sections_files = files('gio-sections-common.txt')
if host_system == 'windows'
ignore_headers += [
'gfiledescriptorbased.h',
@@ -104,6 +106,8 @@ if get_option('gtk_doc')
'gdesktopappinfo.h',
'gosxappinfo.h',
]
sections_files += files('gio-sections-win32.txt')
platform_file = files('gio-docs-win32.xml')
else
if glib_have_cocoa
ignore_headers += ['gdesktopappinfo.h']
@@ -112,10 +116,11 @@ if get_option('gtk_doc')
endif
ignore_headers += [
'gwin32networkmonitor.h',
'gwin32inputstream.h',
'gwin32outputstream.h',
'gwin32registrykey.h',
]
platform_file = files('gio-docs-unix.xml')
endif
ignore_sources = [
@@ -125,8 +130,6 @@ if get_option('gtk_doc')
'xdp-dbus.c',
]
# FIXME: More win32 headers were added to fix building gio-scan
# FIXME: ExampleAnimal docs aren't built
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
@@ -138,6 +141,19 @@ if get_option('gtk_doc')
configuration: version_conf
)
concat_files_helper = find_program('concat-files-helper.py')
configure_file(
output : 'gio-sections.txt',
input : sections_files,
command : [concat_files_helper, '@OUTPUT@', '@INPUT@'],
)
configure_file(
output : 'gio-docs-platform.xml',
input : platform_file,
copy : true,
)
gnome.gtkdoc('gio',
main_xml : 'gio-docs.xml',
namespace : 'g',