diff options
author | Alexander Kanavin <alex.kanavin@gmail.com> | 2019-04-24 13:26:09 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2019-04-25 00:05:20 +0100 |
commit | 07d29e7cec4e03ef1063f29d03aaf54cdc331489 (patch) | |
tree | c6b2b2dcb524840abfd923695269869559f72a11 /meta/classes/gtk-doc.bbclass | |
parent | 8833afc0e05445978d942cfdc67f5c805dec9415 (diff) | |
download | poky-07d29e7cec4e03ef1063f29d03aaf54cdc331489.tar.gz |
gtk-doc.bbclass: unify option setting for meson-based recipes
This is done similarly to gobject-introspection work by Andreas Müller,
and allows dropping duplicate clutter from the recipes.
(From OE-Core rev: ff578f4451a0a199202e576b647840910b4d3f59)
Signed-off-by: Alexander Kanavin <alex.kanavin@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/gtk-doc.bbclass')
-rw-r--r-- | meta/classes/gtk-doc.bbclass | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/meta/classes/gtk-doc.bbclass b/meta/classes/gtk-doc.bbclass index 707d74d108..7dd662bf86 100644 --- a/meta/classes/gtk-doc.bbclass +++ b/meta/classes/gtk-doc.bbclass | |||
@@ -10,13 +10,24 @@ | |||
10 | GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ | 10 | GTKDOC_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', \ |
11 | bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" | 11 | bb.utils.contains('MACHINE_FEATURES', 'qemu-usermode', 'True', 'False', d), 'False', d)}" |
12 | 12 | ||
13 | # meson: default option name to enable/disable gtk-doc. This matches most | ||
14 | # project's configuration. In doubts - check meson_options.txt in project's | ||
15 | # source path. | ||
16 | GTKDOC_MESON_OPTION ?= 'docs' | ||
17 | GTKDOC_MESON_ENABLE_FLAG ?= 'true' | ||
18 | GTKDOC_MESON_DISABLE_FLAG ?= 'false' | ||
19 | |||
20 | # Auto enable/disable based on GTKDOC_ENABLED | ||
13 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \ | 21 | EXTRA_OECONF_prepend_class-target = "${@bb.utils.contains('GTKDOC_ENABLED', 'True', '--enable-gtk-doc --enable-gtk-doc-html --disable-gtk-doc-pdf', \ |
14 | '--disable-gtk-doc', d)} " | 22 | '--disable-gtk-doc', d)} " |
23 | EXTRA_OEMESON_prepend_class-target = "-D${GTKDOC_MESON_OPTION}=${@bb.utils.contains('GTKDOC_ENABLED', 'True', '${GTKDOC_MESON_ENABLE_FLAG}', '${GTKDOC_MESON_DISABLE_FLAG}', d)} " | ||
15 | 24 | ||
16 | # When building native recipes, disable gtkdoc, as it is not necessary, | 25 | # When building native recipes, disable gtkdoc, as it is not necessary, |
17 | # pulls in additional dependencies, and makes build times longer | 26 | # pulls in additional dependencies, and makes build times longer |
18 | EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " | 27 | EXTRA_OECONF_prepend_class-native = "--disable-gtk-doc " |
19 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " | 28 | EXTRA_OECONF_prepend_class-nativesdk = "--disable-gtk-doc " |
29 | EXTRA_OEMESON_prepend_class-native = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} " | ||
30 | EXTRA_OEMESON_prepend_class-nativesdk = "-D${GTKDOC_MESON_OPTION}=${GTKDOC_MESON_DISABLE_FLAG} " | ||
20 | 31 | ||
21 | # Even though gtkdoc is disabled on -native, gtk-doc package is still | 32 | # Even though gtkdoc is disabled on -native, gtk-doc package is still |
22 | # needed for m4 macros. | 33 | # needed for m4 macros. |