diff options
author | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-05-21 12:36:01 +0300 |
---|---|---|
committer | Arkadiusz Hiler <arkadiusz.hiler@intel.com> | 2019-05-23 15:14:08 +0300 |
commit | 736b099862f61b115b3845309b860cb66915fe2a (patch) | |
tree | 41dd86b1a58178349c305245e53950754efda2c7 /man | |
parent | 29cb27e662948b1d0710e9fdaceb5bb221746ff8 (diff) |
meson: Start using 'feature' options
Meson 0.47 comes with a new type of option called 'feature' so instead of:
type : 'combo',
value : 'auto',
choices : ['auto', 'true', 'false'],
We can:
type : 'feature',
The main difference is that the feature takes auto, enabled and disabled
instead of auto, true and false.
get_option() on a feature returns opaque object that can be passed as
a 'required' argument of a dependency. Auto is equivalent to 'required
: false', enabled is equivalent to 'required : true' and disabled
introduces new behavior forcing the dependency to be considered not
found.
This allows us to streamline a lot of logic regarding optional IGT
features.
This patch bumps required meson version to 0.47.0
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Simon Ser <simon.ser@intel.com>
Signed-off-by: Arkadiusz Hiler <arkadiusz.hiler@intel.com>
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'man')
-rw-r--r-- | man/meson.build | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/man/meson.build b/man/meson.build index a6b08900..35faad28 100644 --- a/man/meson.build +++ b/man/meson.build @@ -1,3 +1,5 @@ +build_man = get_option('build_man') + manpages = [ 'intel_aubdump', 'intel_audio_dump', @@ -22,10 +24,10 @@ defs_rst = configure_file(input : 'defs.rst.in', output : 'defs.rst', configuration : config) -rst2man = find_program('rst2man-3', 'rst2man', required : _man_required) +rst2man = find_program('rst2man-3', 'rst2man', required : build_man) rst2man_script = find_program('rst2man.sh') -if _build_man and rst2man.found() +if rst2man.found() foreach manpage : manpages custom_target(manpage + '.1', build_by_default : true, @@ -36,10 +38,10 @@ if _build_man and rst2man.found() install : true, install_dir : join_paths(mandir, 'man1')) endforeach - build_info += 'Build man pages: Yes' + build_info += 'Build man pages: true' else if _man_required error('Cannot build man pages due to missing dependencies') endif - build_info += 'Build man pages: No' + build_info += 'Build man pages: false' endif |