]>
Commit | Line | Data |
---|---|---|
c1e3ea0f JP |
1 | From a369e61d2a20493e6fcde9b6ac7e800174487a41 Mon Sep 17 00:00:00 2001 |
2 | From: Beniamino Galvani <bgalvani@redhat.com> | |
3 | Date: Fri, 6 Sep 2019 11:00:52 +0200 | |
4 | Subject: [PATCH] build: use regexp in gtkdoc --ignore-decorators option | |
5 | ||
6 | gtkdoc-scan supports regular expressions in the --ignore-decorators | |
7 | command-line option. Since it is easier to use a regexp than grepping | |
8 | macros from a source file, revert the ugly solution from commit | |
9 | 2d941dc95a1d ('build: fix errors when building with gtk-doc 1.32'). | |
10 | ||
11 | (cherry picked from commit 11cf082a6233a5c2f17da1b49457a66266062678) | |
12 | --- | |
13 | docs/libnm/Makefile.am | 4 +--- | |
14 | docs/libnm/meson.build | 5 +---- | |
15 | tools/decorators.sh | 7 ------- | |
16 | 3 files changed, 2 insertions(+), 14 deletions(-) | |
17 | delete mode 100755 tools/decorators.sh | |
18 | ||
19 | diff --git a/docs/libnm/Makefile.am b/docs/libnm/Makefile.am | |
20 | index ded32f8218..20dc8de571 100644 | |
21 | --- a/docs/libnm/Makefile.am | |
22 | +++ b/docs/libnm/Makefile.am | |
23 | @@ -18,10 +18,8 @@ DOC_SOURCE_DIR= \ | |
24 | $(top_srcdir)/libnm \ | |
465502c5 JB |
25 | $(top_builddir)/libnm |
26 | ||
c1e3ea0f JP |
27 | -decorators := $(shell $(top_srcdir)/tools/decorators.sh $(top_srcdir)/libnm-core/nm-version.h) |
28 | - | |
465502c5 | 29 | # Extra options to supply to gtkdoc-scan. |
c1e3ea0f JP |
30 | -SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators "$(decorators)" |
31 | +SCAN_OPTIONS=--rebuild-types --rebuild-sections --ignore-decorators="NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?" | |
465502c5 JB |
32 | |
33 | # Extra options to supply to gtkdoc-mkdb. | |
34 | MKDB_OPTIONS=--sgml-mode --output-format=xml | |
c1e3ea0f JP |
35 | diff --git a/docs/libnm/meson.build b/docs/libnm/meson.build |
36 | index 3403b339d7..b4a23729bb 100644 | |
37 | --- a/docs/libnm/meson.build | |
38 | +++ b/docs/libnm/meson.build | |
39 | @@ -32,9 +32,6 @@ configure_file( | |
40 | configuration: version_conf, | |
41 | ) | |
42 | ||
43 | -result = run_command(join_paths(meson.source_root(), 'tools', 'decorators.sh'), | |
44 | - join_paths(meson.source_root(), 'libnm-core', 'nm-version.h')) | |
45 | - | |
46 | gnome.gtkdoc( | |
47 | doc_module, | |
48 | main_xml: doc_module + '-docs.xml', | |
49 | @@ -46,7 +43,7 @@ gnome.gtkdoc( | |
50 | scan_args: [ | |
51 | '--rebuild-types', | |
52 | '--rebuild-sections', | |
53 | - '--ignore-decorators=' + result.stdout().strip(), | |
54 | + '--ignore-decorators=NM_AVAILABLE_IN_\d_\d\d?|NM_DEPRECATED_IN_\d_\d\d?', | |
55 | '--ignore-headers=' + ' '.join(private_headers), | |
56 | ], | |
57 | scanobjs_args: '--type-init-func="g_type_init();"', | |
58 | -- | |
59 | 2.22.0 | |
60 |