gtk2/docs/reference/gdk/meson.build
Emmanuele Bassi 0ba2a3a191 Generate GTK API reference(s) with gi-docgen
Stop using gtk-doc, and switch to gi-docgen.

The gi-docgen tool generates API references through the introspection
data, which has various benefits:

 - it does not parse C code
 - it does not generate and run C code to introspect types at build time
 - it does not present a different API from the one we're exporting

Additionally, gi-docgen:

 - does not generate DocBook XML in order to generate HTML
 - does not go through xsltproc
 - parses proper Markdown

Which makes it markedly faster than gtk-doc has ever been.
2021-03-11 16:37:30 +00:00

64 lines
1.7 KiB
Meson

expand_content_md_files = [
]
gdk4_toml = configure_file(input: 'gdk4.toml.in', output: 'gdk4.toml', configuration: toml_conf)
if get_option('gtk_doc')
custom_target('gdk4-doc',
input: [ gdk4_toml, gdk_gir[0] ],
output: 'gdk4',
command: [
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
depend_files: [ expand_content_md_files ],
build_by_default: true,
)
if x11_enabled
custom_target('gdk4-x11-doc',
input: [ gdk4_toml, gdk_x11_gir[0] ],
output: 'gdk4-x11',
command: [
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
depends: [ gdk_gir[0] ],
depend_files: [ expand_content_md_files ],
build_by_default: true,
)
endif
if wayland_enabled
custom_target('gdk4-wayland-doc',
input: [ gdk4_toml, gdk_wayland_gir[0] ],
output: 'gdk4-wayland',
command: [
gidocgen,
'generate',
'--add-include-path=@0@'.format(meson.current_build_dir() / '../../../gtk'),
'--config=@INPUT0@',
'--output-dir=@OUTPUT@',
'--no-namespace-dir',
'--content-dir=@0@'.format(meson.current_source_dir()),
'@INPUT1@',
],
depends: [ gdk_gir[0] ],
depend_files: [ expand_content_md_files ],
build_by_default: true,
)
endif
endif