William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 1 | # gi-docgen is a new gnome documentation generator, which |
| 2 | # seems to be a successor to gtk-doc: |
| 3 | # https://gitlab.gnome.org/GNOME/gi-docgen |
| 4 | |
| 5 | # This variable is set to True if api-documentation is in |
| 6 | # DISTRO_FEATURES, and False otherwise. |
| 7 | GIDOCGEN_ENABLED ?= "${@bb.utils.contains('DISTRO_FEATURES', 'api-documentation', 'True', 'False', d)}" |
| 8 | # When building native recipes, disable gi-docgen, as it is not necessary, |
| 9 | # pulls in additional dependencies, and makes build times longer |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 10 | GIDOCGEN_ENABLED:class-native = "False" |
| 11 | GIDOCGEN_ENABLED:class-nativesdk = "False" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 12 | |
| 13 | # meson: default option name to enable/disable gi-docgen. This matches most |
| 14 | # projects' configuration. In doubts - check meson_options.txt in project's |
| 15 | # source path. |
| 16 | GIDOCGEN_MESON_OPTION ?= 'gtk_doc' |
| 17 | GIDOCGEN_MESON_ENABLE_FLAG ?= 'true' |
| 18 | GIDOCGEN_MESON_DISABLE_FLAG ?= 'false' |
| 19 | |
| 20 | # Auto enable/disable based on GIDOCGEN_ENABLED |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 21 | EXTRA_OEMESON:prepend = "-D${GIDOCGEN_MESON_OPTION}=${@bb.utils.contains('GIDOCGEN_ENABLED', 'True', '${GIDOCGEN_MESON_ENABLE_FLAG}', '${GIDOCGEN_MESON_DISABLE_FLAG}', d)} " |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 22 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 23 | DEPENDS:append = "${@' gi-docgen-native gi-docgen' if d.getVar('GIDOCGEN_ENABLED') == 'True' else ''}" |
William A. Kennington III | ac69b48 | 2021-06-02 12:28:27 -0700 | [diff] [blame] | 24 | |