mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-01-02 14:40:13 +01:00
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 commit2d941dc95a('build: fix errors when building with gtk-doc 1.32'). (cherry picked from commit11cf082a62) (cherry picked from commita369e61d2a)
This commit is contained in:
parent
1a3fccc682
commit
97e89e7d34
3 changed files with 2 additions and 14 deletions
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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();"',
|
||||
|
|
|
|||
|
|
@ -1,7 +0,0 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Extract NM_DEPRECATED_IN_* and NM_AVAILABLE_IN_* macros from a
|
||||
# header file and output them in a way suitable to be passed to
|
||||
# 'gtkdoc-scan --ignore-decorators'
|
||||
|
||||
grep -o "NM_DEPRECATED_IN_[0-9]_[0-9]\+$\|NM_AVAILABLE_IN_[0-9]_[0-9]\+$" "$1" | sed ':a;N;$!ba;s/\n/|/g'
|
||||
Loading…
Add table
Reference in a new issue