[glib: 3/4] build: Factor out common gtkdoc flags
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glib: 3/4] build: Factor out common gtkdoc flags
- Date: Wed, 6 Mar 2019 12:30:39 +0000 (UTC)
commit 6761bb2f57aa16a07e6811a0228499c4afa71369
Author: Philip Withnall <withnall endlessm com>
Date: Wed Mar 6 11:59:03 2019 +0000
build: Factor out common gtkdoc flags
Those lists were getting very long. We can’t quite entirely automate the
list generation since Meson doesn’t have a range() function, but we can
at least combine three of them into one.
Signed-off-by: Philip Withnall <withnall endlessm com>
docs/reference/gio/meson.build | 68 +-------------------------------------
docs/reference/glib/meson.build | 68 +-------------------------------------
docs/reference/gobject/meson.build | 68 +-------------------------------------
docs/reference/meson.build | 35 ++++++++++++++++++++
meson.build | 4 +--
5 files changed, 39 insertions(+), 204 deletions(-)
---
diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build
index 5244050cc..b67915c95 100644
--- a/docs/reference/gio/meson.build
+++ b/docs/reference/gio/meson.build
@@ -118,70 +118,6 @@ if get_option('gtk_doc')
]
endif
- 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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- 'GLIB_AVAILABLE_IN_2_62',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
- 'GLIB_DEPRECATED_IN_2_62',
- 'GLIB_DEPRECATED_IN_2_62_FOR',
- ]
-
# FIXME: More win32 headers were added to fix building gio-scan
# FIXME: ExampleAnimal docs aren't built
@@ -201,10 +137,8 @@ if get_option('gtk_doc')
mode : 'none',
dependencies : [libgio_dep, libgobject_dep, libglib_dep],
src_dir : 'gio',
- scan_args : [
+ scan_args : gtkdoc_common_scan_args + [
'--rebuild-types',
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/glib/meson.build b/docs/reference/glib/meson.build
index ff41ed324..1d4009f8d 100644
--- a/docs/reference/glib/meson.build
+++ b/docs/reference/glib/meson.build
@@ -40,70 +40,6 @@ if get_option('gtk_doc')
'gvalgrind.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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- 'GLIB_AVAILABLE_IN_2_62',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
- 'GLIB_DEPRECATED_IN_2_62',
- 'GLIB_DEPRECATED_IN_2_62_FOR',
- ]
-
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -119,9 +55,7 @@ if get_option('gtk_doc')
mode : 'none',
src_dir : [ 'glib', 'gmodule' ],
dependencies : libglib_dep,
- scan_args : [
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
+ scan_args : gtkdoc_common_scan_args + [
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build
index e7267bda0..096c9036f 100644
--- a/docs/reference/gobject/meson.build
+++ b/docs/reference/gobject/meson.build
@@ -10,70 +10,6 @@ if get_option('gtk_doc')
'glib-enumtypes.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_AVAILABLE_IN_2_58',
- 'GLIB_AVAILABLE_IN_2_60',
- 'GLIB_AVAILABLE_IN_2_62',
- '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',
- 'GLIB_DEPRECATED_IN_2_58',
- 'GLIB_DEPRECATED_IN_2_58_FOR',
- 'GLIB_DEPRECATED_IN_2_60',
- 'GLIB_DEPRECATED_IN_2_60_FOR',
- 'GLIB_DEPRECATED_IN_2_62',
- 'GLIB_DEPRECATED_IN_2_62_FOR',
- ]
-
docpath = join_paths(glib_datadir, 'gtk-doc', 'html')
version_conf = configuration_data()
version_conf.set('GLIB_VERSION', meson.project_version())
@@ -92,10 +28,8 @@ if get_option('gtk_doc')
dependencies : [libgobject_dep, libglib_dep],
include_directories : [gtkdocincl],
src_dir : 'gobject',
- scan_args : [
+ scan_args : gtkdoc_common_scan_args + [
'--rebuild-types',
- '--deprecated-guards=G_DISABLE_DEPRECATED',
- '--ignore-decorators=' + '|'.join(ignore_decorators),
'--ignore-headers=' + ' '.join(ignore_headers),
],
content_files : [
diff --git a/docs/reference/meson.build b/docs/reference/meson.build
new file mode 100644
index 000000000..e4dbf3f12
--- /dev/null
+++ b/docs/reference/meson.build
@@ -0,0 +1,35 @@
+# The list of minor versions in the 2.x.x series which have had
+# GLIB_AVAILABLE_IN_* macros. This should include the current unreleased stable
+# version.
+#
+# FIXME: It would be good to be able to generate this list:
+# https://github.com/mesonbuild/meson/issues/5026
+stable_2_series_versions = [
+ '26', '28', '30', '32', '34', '36', '38',
+ '40', '42', '44', '46', '48', '50', '52', '54', '56', '58',
+ '60', '62',
+]
+
+ignore_decorators = [
+ 'GLIB_VAR',
+ 'G_GNUC_INTERNAL',
+ 'G_GNUC_WARN_UNUSED_RESULT',
+ 'GLIB_AVAILABLE_IN_ALL',
+]
+
+foreach version : stable_2_series_versions
+ ignore_decorators += [
+ 'GLIB_AVAILABLE_IN_2_' + version,
+ 'GLIB_DEPRECATED_IN_2_' + version,
+ 'GLIB_DEPRECATED_IN_2_' + version + '_FOR',
+ ]
+endforeach
+
+gtkdoc_common_scan_args = [
+ '--deprecated-guards=G_DISABLE_DEPRECATED',
+ '--ignore-decorators=' + '|'.join(ignore_decorators),
+]
+
+subdir('gio')
+subdir('glib')
+subdir('gobject')
\ No newline at end of file
diff --git a/meson.build b/meson.build
index 1851749f0..52c0ec44a 100644
--- a/meson.build
+++ b/meson.build
@@ -2045,6 +2045,4 @@ if get_option('man')
endif
gnome = import('gnome')
-subdir('docs/reference/glib')
-subdir('docs/reference/gobject')
-subdir('docs/reference/gio')
+subdir('docs/reference')
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]