docs: Add version and deprecation decorators to gtk-doc ignore list

This allows gtk-doc to recognise a whole lot more API than it could
before. Maintaining the lists between 6 build files is going to be a bit
of a pain, but they only need to be modified once a cycle.

Signed-off-by: Philip Withnall <withnall@endlessm.com>

https://bugzilla.gnome.org/show_bug.cgi?id=789087

https://bugzilla.gnome.org/show_bug.cgi?id=790015
This commit is contained in:
Philip Withnall 2017-11-07 13:33:40 +00:00
parent f33ca578b1
commit a12fbd227f
6 changed files with 178 additions and 8 deletions

View File

@ -7,8 +7,9 @@ DOC_MODULE=gio
DOC_MAIN_SGML_FILE=gio-docs.xml DOC_MAIN_SGML_FILE=gio-docs.xml
# Extra options to supply to gtkdoc-scan # Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \ SCAN_OPTIONS = \
--ignore-decorators="G_GNUC_WARN_UNUSED_RESULT" --deprecated-guards="G_DISABLE_DEPRECATED" \
--ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# The directory containing the source code. Relative to $(srcdir) # The directory containing the source code. Relative to $(srcdir)
DOC_SOURCE_DIR =$(top_srcdir)/gio $(top_builddir)/gio DOC_SOURCE_DIR =$(top_srcdir)/gio $(top_builddir)/gio

View File

@ -82,6 +82,62 @@ if get_option('with-docs') != 'no'
'thumbnail-verify.h', 'thumbnail-verify.h',
'xdp-dbus.h', 'xdp-dbus.h',
] ]
ignore_decorators = [
'GLIB_VAR',
'G_GNUC_INTERNAL',
'G_GNUC_WARN_UNUSED_RESULT',
'GLIB_AVAILABLE_IN_ALL',
'GLIB_AVAILABLE_IN_2_26',
'GLIB_AVAILABLE_IN_2_28',
'GLIB_AVAILABLE_IN_2_30',
'GLIB_AVAILABLE_IN_2_32',
'GLIB_AVAILABLE_IN_2_34',
'GLIB_AVAILABLE_IN_2_36',
'GLIB_AVAILABLE_IN_2_38',
'GLIB_AVAILABLE_IN_2_40',
'GLIB_AVAILABLE_IN_2_42',
'GLIB_AVAILABLE_IN_2_44',
'GLIB_AVAILABLE_IN_2_46',
'GLIB_AVAILABLE_IN_2_48',
'GLIB_AVAILABLE_IN_2_50',
'GLIB_AVAILABLE_IN_2_52',
'GLIB_AVAILABLE_IN_2_54',
'GLIB_AVAILABLE_IN_2_56',
'GLIB_DEPRECATED_IN_2_26',
'GLIB_DEPRECATED_IN_2_26_FOR',
'GLIB_DEPRECATED_IN_2_28',
'GLIB_DEPRECATED_IN_2_28_FOR',
'GLIB_DEPRECATED_IN_2_30',
'GLIB_DEPRECATED_IN_2_30_FOR',
'GLIB_DEPRECATED_IN_2_32',
'GLIB_DEPRECATED_IN_2_32_FOR',
'GLIB_DEPRECATED_IN_2_34',
'GLIB_DEPRECATED_IN_2_34_FOR',
'GLIB_DEPRECATED_IN_2_36',
'GLIB_DEPRECATED_IN_2_36_FOR',
'GLIB_DEPRECATED_IN_2_38',
'GLIB_DEPRECATED_IN_2_38_FOR',
'GLIB_DEPRECATED_IN_2_40',
'GLIB_DEPRECATED_IN_2_40_FOR',
'GLIB_DEPRECATED_IN_2_42',
'GLIB_DEPRECATED_IN_2_42_FOR',
'GLIB_DEPRECATED_IN_2_44',
'GLIB_DEPRECATED_IN_2_44_FOR',
'GLIB_DEPRECATED_IN_2_46',
'GLIB_DEPRECATED_IN_2_46_FOR',
'GLIB_DEPRECATED_IN_2_48',
'GLIB_DEPRECATED_IN_2_48_FOR',
'GLIB_DEPRECATED_IN_2_50',
'GLIB_DEPRECATED_IN_2_50_FOR',
'GLIB_DEPRECATED_IN_2_52',
'GLIB_DEPRECATED_IN_2_52_FOR',
'GLIB_DEPRECATED_IN_2_54',
'GLIB_DEPRECATED_IN_2_54_FOR',
'GLIB_DEPRECATED_IN_2_56',
'GLIB_DEPRECATED_IN_2_56_FOR',
]
# FIXME: More win32 headers were added to fix building gio-scan # FIXME: More win32 headers were added to fix building gio-scan
# FIXME: ExampleAnimal docs aren't built # FIXME: ExampleAnimal docs aren't built
@ -105,7 +161,7 @@ if get_option('with-docs') != 'no'
scan_args : [ scan_args : [
'--rebuild-types', '--rebuild-types',
'--deprecated-guards=G_DISABLE_DEPRECATED', '--deprecated-guards=G_DISABLE_DEPRECATED',
'--ignore-decorators=G_GNUC_WARN_UNUSED_RESULT', '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers), '--ignore-headers=' + ' '.join(ignore_headers),
], ],
content_files : [ content_files : [

View File

@ -14,7 +14,9 @@ DOC_SOURCE_DIR = \
$(top_builddir)/glib $(top_builddir)/gmodule $(top_builddir)/glib $(top_builddir)/gmodule
# Extra options to supply to gtkdoc-scan # Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" --ignore-decorators="GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT" SCAN_OPTIONS = \
--deprecated-guards="G_DISABLE_DEPRECATED" \
--ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# Extra options to supply to gtkdoc-mkdb # Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --name-space=g MKDB_OPTIONS=--output-format=xml --name-space=g

View File

@ -36,6 +36,61 @@ if get_option('with-docs') != 'no'
'valgrind.h', 'valgrind.h',
] ]
ignore_decorators = [
'GLIB_VAR',
'G_GNUC_INTERNAL',
'G_GNUC_WARN_UNUSED_RESULT',
'GLIB_AVAILABLE_IN_ALL',
'GLIB_AVAILABLE_IN_2_26',
'GLIB_AVAILABLE_IN_2_28',
'GLIB_AVAILABLE_IN_2_30',
'GLIB_AVAILABLE_IN_2_32',
'GLIB_AVAILABLE_IN_2_34',
'GLIB_AVAILABLE_IN_2_36',
'GLIB_AVAILABLE_IN_2_38',
'GLIB_AVAILABLE_IN_2_40',
'GLIB_AVAILABLE_IN_2_42',
'GLIB_AVAILABLE_IN_2_44',
'GLIB_AVAILABLE_IN_2_46',
'GLIB_AVAILABLE_IN_2_48',
'GLIB_AVAILABLE_IN_2_50',
'GLIB_AVAILABLE_IN_2_52',
'GLIB_AVAILABLE_IN_2_54',
'GLIB_AVAILABLE_IN_2_56',
'GLIB_DEPRECATED_IN_2_26',
'GLIB_DEPRECATED_IN_2_26_FOR',
'GLIB_DEPRECATED_IN_2_28',
'GLIB_DEPRECATED_IN_2_28_FOR',
'GLIB_DEPRECATED_IN_2_30',
'GLIB_DEPRECATED_IN_2_30_FOR',
'GLIB_DEPRECATED_IN_2_32',
'GLIB_DEPRECATED_IN_2_32_FOR',
'GLIB_DEPRECATED_IN_2_34',
'GLIB_DEPRECATED_IN_2_34_FOR',
'GLIB_DEPRECATED_IN_2_36',
'GLIB_DEPRECATED_IN_2_36_FOR',
'GLIB_DEPRECATED_IN_2_38',
'GLIB_DEPRECATED_IN_2_38_FOR',
'GLIB_DEPRECATED_IN_2_40',
'GLIB_DEPRECATED_IN_2_40_FOR',
'GLIB_DEPRECATED_IN_2_42',
'GLIB_DEPRECATED_IN_2_42_FOR',
'GLIB_DEPRECATED_IN_2_44',
'GLIB_DEPRECATED_IN_2_44_FOR',
'GLIB_DEPRECATED_IN_2_46',
'GLIB_DEPRECATED_IN_2_46_FOR',
'GLIB_DEPRECATED_IN_2_48',
'GLIB_DEPRECATED_IN_2_48_FOR',
'GLIB_DEPRECATED_IN_2_50',
'GLIB_DEPRECATED_IN_2_50_FOR',
'GLIB_DEPRECATED_IN_2_52',
'GLIB_DEPRECATED_IN_2_52_FOR',
'GLIB_DEPRECATED_IN_2_54',
'GLIB_DEPRECATED_IN_2_54_FOR',
'GLIB_DEPRECATED_IN_2_56',
'GLIB_DEPRECATED_IN_2_56_FOR',
]
docpath = join_paths(glib_datadir, 'gtk-doc', 'html') docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data() version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version()) version_conf.set('GLIB_VERSION', meson.project_version())
@ -54,7 +109,7 @@ if get_option('with-docs') != 'no'
scan_args : [ scan_args : [
'--rebuild-types', '--rebuild-types',
'--deprecated-guards=G_DISABLE_DEPRECATED', '--deprecated-guards=G_DISABLE_DEPRECATED',
'--ignore-decorators=GLIB_VAR|G_GNUC_WARN_UNUSED_RESULT', '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers), '--ignore-headers=' + ' '.join(ignore_headers),
], ],
content_files : [ content_files : [

View File

@ -12,8 +12,9 @@ DOC_MAIN_SGML_FILE=gobject-docs.xml
DOC_SOURCE_DIR =$(top_srcdir)/gobject $(top_builddir)/gobject DOC_SOURCE_DIR =$(top_srcdir)/gobject $(top_builddir)/gobject
# Extra options to supply to gtkdoc-scan # Extra options to supply to gtkdoc-scan
SCAN_OPTIONS=--deprecated-guards="G_DISABLE_DEPRECATED" \ SCAN_OPTIONS = \
--ignore-decorators="G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT" --deprecated-guards="G_DISABLE_DEPRECATED" \
--ignore-decorators="GLIB_VAR|G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT|GLIB_AVAILABLE_IN_ALL|GLIB_AVAILABLE_IN_2_26|GLIB_AVAILABLE_IN_2_28|GLIB_AVAILABLE_IN_2_30|GLIB_AVAILABLE_IN_2_32|GLIB_AVAILABLE_IN_2_34|GLIB_AVAILABLE_IN_2_36|GLIB_AVAILABLE_IN_2_38|GLIB_AVAILABLE_IN_2_40|GLIB_AVAILABLE_IN_2_42|GLIB_AVAILABLE_IN_2_44|GLIB_AVAILABLE_IN_2_46|GLIB_AVAILABLE_IN_2_48|GLIB_AVAILABLE_IN_2_50|GLIB_AVAILABLE_IN_2_52|GLIB_AVAILABLE_IN_2_54|GLIB_AVAILABLE_IN_2_56|GLIB_DEPRECATED_IN_2_26|GLIB_DEPRECATED_IN_2_26_FOR|GLIB_DEPRECATED_IN_2_28|GLIB_DEPRECATED_IN_2_28_FOR|GLIB_DEPRECATED_IN_2_30|GLIB_DEPRECATED_IN_2_30_FOR|GLIB_DEPRECATED_IN_2_32|GLIB_DEPRECATED_IN_2_32_FOR|GLIB_DEPRECATED_IN_2_34|GLIB_DEPRECATED_IN_2_34_FOR|GLIB_DEPRECATED_IN_2_36|GLIB_DEPRECATED_IN_2_36_FOR|GLIB_DEPRECATED_IN_2_38|GLIB_DEPRECATED_IN_2_38_FOR|GLIB_DEPRECATED_IN_2_40|GLIB_DEPRECATED_IN_2_40_FOR|GLIB_DEPRECATED_IN_2_42|GLIB_DEPRECATED_IN_2_42_FOR|GLIB_DEPRECATED_IN_2_44|GLIB_DEPRECATED_IN_2_44_FOR|GLIB_DEPRECATED_IN_2_46|GLIB_DEPRECATED_IN_2_46_FOR|GLIB_DEPRECATED_IN_2_48|GLIB_DEPRECATED_IN_2_48_FOR|GLIB_DEPRECATED_IN_2_50|GLIB_DEPRECATED_IN_2_50_FOR|GLIB_DEPRECATED_IN_2_52|GLIB_DEPRECATED_IN_2_52_FOR|GLIB_DEPRECATED_IN_2_54|GLIB_DEPRECATED_IN_2_54_FOR|GLIB_DEPRECATED_IN_2_56|GLIB_DEPRECATED_IN_2_56_FOR"
# Extra options to supply to gtkdoc-mkdb # Extra options to supply to gtkdoc-mkdb
MKDB_OPTIONS=--output-format=xml --name-space=g MKDB_OPTIONS=--output-format=xml --name-space=g

View File

@ -8,6 +8,61 @@ if get_option('with-docs') != 'no'
'gtype-private.h' 'gtype-private.h'
] ]
ignore_decorators = [
'GLIB_VAR',
'G_GNUC_INTERNAL',
'G_GNUC_WARN_UNUSED_RESULT',
'GLIB_AVAILABLE_IN_ALL',
'GLIB_AVAILABLE_IN_2_26',
'GLIB_AVAILABLE_IN_2_28',
'GLIB_AVAILABLE_IN_2_30',
'GLIB_AVAILABLE_IN_2_32',
'GLIB_AVAILABLE_IN_2_34',
'GLIB_AVAILABLE_IN_2_36',
'GLIB_AVAILABLE_IN_2_38',
'GLIB_AVAILABLE_IN_2_40',
'GLIB_AVAILABLE_IN_2_42',
'GLIB_AVAILABLE_IN_2_44',
'GLIB_AVAILABLE_IN_2_46',
'GLIB_AVAILABLE_IN_2_48',
'GLIB_AVAILABLE_IN_2_50',
'GLIB_AVAILABLE_IN_2_52',
'GLIB_AVAILABLE_IN_2_54',
'GLIB_AVAILABLE_IN_2_56',
'GLIB_DEPRECATED_IN_2_26',
'GLIB_DEPRECATED_IN_2_26_FOR',
'GLIB_DEPRECATED_IN_2_28',
'GLIB_DEPRECATED_IN_2_28_FOR',
'GLIB_DEPRECATED_IN_2_30',
'GLIB_DEPRECATED_IN_2_30_FOR',
'GLIB_DEPRECATED_IN_2_32',
'GLIB_DEPRECATED_IN_2_32_FOR',
'GLIB_DEPRECATED_IN_2_34',
'GLIB_DEPRECATED_IN_2_34_FOR',
'GLIB_DEPRECATED_IN_2_36',
'GLIB_DEPRECATED_IN_2_36_FOR',
'GLIB_DEPRECATED_IN_2_38',
'GLIB_DEPRECATED_IN_2_38_FOR',
'GLIB_DEPRECATED_IN_2_40',
'GLIB_DEPRECATED_IN_2_40_FOR',
'GLIB_DEPRECATED_IN_2_42',
'GLIB_DEPRECATED_IN_2_42_FOR',
'GLIB_DEPRECATED_IN_2_44',
'GLIB_DEPRECATED_IN_2_44_FOR',
'GLIB_DEPRECATED_IN_2_46',
'GLIB_DEPRECATED_IN_2_46_FOR',
'GLIB_DEPRECATED_IN_2_48',
'GLIB_DEPRECATED_IN_2_48_FOR',
'GLIB_DEPRECATED_IN_2_50',
'GLIB_DEPRECATED_IN_2_50_FOR',
'GLIB_DEPRECATED_IN_2_52',
'GLIB_DEPRECATED_IN_2_52_FOR',
'GLIB_DEPRECATED_IN_2_54',
'GLIB_DEPRECATED_IN_2_54_FOR',
'GLIB_DEPRECATED_IN_2_56',
'GLIB_DEPRECATED_IN_2_56_FOR',
]
docpath = join_paths(glib_datadir, 'gtk-doc', 'html') docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data() version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version()) version_conf.set('GLIB_VERSION', meson.project_version())
@ -26,7 +81,7 @@ if get_option('with-docs') != 'no'
src_dir : 'gobject', src_dir : 'gobject',
scan_args : [ scan_args : [
'--deprecated-guards=G_DISABLE_DEPRECATED', '--deprecated-guards=G_DISABLE_DEPRECATED',
'--ignore-decorators=G_GNUC_INTERNAL|G_GNUC_WARN_UNUSED_RESULT', '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers), '--ignore-headers=' + ' '.join(ignore_headers),
], ],
content_files : [ content_files : [