diff options
author | Christoph Reiter <reiter.christoph@gmail.com> | 2019-09-28 17:29:35 +0200 |
---|---|---|
committer | Christoph Reiter <reiter.christoph@gmail.com> | 2019-09-30 17:22:37 +0200 |
commit | efbd35d290d35e37994d441c9f2e4c0dffcd9cec (patch) | |
tree | 24f6f060cc812fb1eed1495a8220c157fadfa19d /meson.build | |
parent | 1cb3b2b27f824f3bbdab1a2e3fedf45a39689019 (diff) | |
download | gobject-introspection-efbd35d290d35e37994d441c9f2e4c0dffcd9cec.tar.gz |
meson: change "doctool" from a boolean to a feature option
Similar to !180 this should prevent devs from not running all tests by
accident.
This also adds some checks for the required doctool dependencies, mako and markdown.
Diffstat (limited to 'meson.build')
-rw-r--r-- | meson.build | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/meson.build b/meson.build index c71d2d84..6e704776 100644 --- a/meson.build +++ b/meson.build @@ -172,7 +172,24 @@ if not cairo_deps_found warning('Not building with cairo support, not all tests will be run') endif -with_doctool = get_option('doctool') +# doctool +doctool_option = get_option('doctool') + +with_doctool = true +if doctool_option.disabled() + with_doctool = false +else + has_mako = run_command(python, ['-c', 'import mako']).returncode() == 0 + has_markdown = run_command(python, ['-c', 'import markdown']).returncode() == 0 + if not has_mako or not has_markdown + if doctool_option.enabled() + error('doctool requires markdown and mako') + else + with_doctool = false + endif + endif +endif + if not with_doctool warning('Not building with doctool support, not all tests will be run') endif |