From a369e61d2a20493e6fcde9b6ac7e800174487a41 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Fri, 6 Sep 2019 11:00:52 +0200 Subject: [PATCH] build: use regexp in gtkdoc --ignore-decorators option gtkdoc-scan supports regular expressions in the --ignore-decorators command-line option. Since it is easier to use a regexp than grepping macros from a source file, revert the ugly solution from commit 2d941dc95a1d ('build: fix errors when building with gtk-doc 1.32'). (cherry picked from commit 11cf082a6233a5c2f17da1b49457a66266062678) --- docs/libnm/Makefile.am | 4 +--- docs/libnm/meson.build | 5 +---- tools/decorators.sh | 7 ------- 3 files changed, 2 insertions(+), 14 deletions(-) delete mode 100755 tools/decorators.sh diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am index ded32f821..20dc8de57 100644 --- a/docs/libnm/Makefile.am +++ b/docs/libnm/Makefile.am @@ -18,10 +18,8 @@ DOC_SOURCE_DIR= \ $(top_srcdir)/libnm \ $(top_builddir)/libnm -decorators := $(shell $(top_srcdir)/tools/decorators.sh $(top_srcdir)/libnm-core/nm-version.h) - # Extra options to supply to gtkdoc-scan. -SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators "$(decorators)" +SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators="NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?" # Extra options to supply to gtkdoc-mkdb. MKDB_OPTIONS=--sgml-mode --output-format=xml diff --git a/docs/libnm/meson.build b/docs/libnm/meson.build index 3403b339d..b4a23729b 100644 --- a/docs/libnm/meson.build +++ b/docs/libnm/meson.build @@ -32,9 +32,6 @@ configure_file( configuration: version_conf, ) -result = run_command(join_paths(meson.source_root(), 'tools', 'decorators.sh'), - join_paths(meson.source_root(), 'libnm-core', 'nm-version.h')) - gnome.gtkdoc( doc_module, main_xml: doc_module + '-docs.xml', @@ -46,7 +43,7 @@ gnome.gtkdoc( scan_args: [ '--rebuild-types', '--rebuild-sections', - '--ignore-decorators=' + result.stdout().strip(), + '--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?', '--ignore-headers=' + ' '.join(private_headers), ], scanobjs_args: '--type-init-func="g_type_init();"',